Upgrade from 7.2 to 7.3 fails when the primary appliance is rebooted after upgrade of first vRA node
search cancel

Upgrade from 7.2 to 7.3 fails when the primary appliance is rebooted after upgrade of first vRA node

book

Article ID: 314909

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Symptoms:
  • Upgrade from 7.2 to 7.3 fails when the primary appliance is rebooted after upgrade of first vRA node.
  • You do not see any of the vRA and VIDM services running.
  • In the logs, you see the entries similar to:
Reason: liquibase.exception.DatabaseException: Error executing SQL ALTER TABLE saas."EncryptionKeys" DROP CONSTRAINT encryptionkeys_pkey: 
ERROR: constraint "encryptionkeys_pkey" of relation "EncryptionKeys" does not exist:
Caused By: Error executing SQL ALTER TABLE saas."EncryptionKeys" DROP CONSTRAINT encryptionkeys_pkey: ERROR: constraint "encryptionkeys_pkey" of relation "EncryptionKeys" does not exist:
Caused By: ERROR: constraint "encryptionkeys_pkey" of relation "EncryptionKeys" does not exist
at liquibase.changelog.ChangeSet.execute(ChangeSet.java:347)
at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:27)


Environment

VMware vRealize Automation 7.3.x
VMware vRealize Automation 7.2.x

Cause

This issue occurs because the Liquibase scripts expects the encryptionkeys_pkey constraint to be existing on the table EncryptionKeys and when it does not exist, this failure happens.

Resolution

This is a known issue affecting VMware vRealize Automation 7.3.

Currently, there is no resolution.

Workaround:
To work around this issue, create the encryptionkeys_pkey on table EncryptionKeys and then perform upgrade.

Note: Take snapshot of your vRA machines before proceeding with these changes.

  1. Log in to the vRA database server and access the DB by running this command:
    su - postgres /opt/vmware/vpostgres/current/bin/psql vcac
     
  2. vcac=# set schema 'saas';
     
  3. vcac=# \x
     
  4. Check for the encryption keys by running this command:
    vcac=# select "id" from "EncryptionKeys";

    Note: Verify the results for any duplicate number. Only if there is a duplicate number then follow step 5 and 6 else jump to 7.
     
  5. vcac=# select * from "EncryptionKeys";
    Note down the uuid entry of the duplicated key with id and with keycontainer __GLOBAL_REST_KEY_CONTAINER__ (Not vsphere.local)
     
  6. Run this query Update saas."EncryptionKeys" set id=< New Id Number > where uuid='uuid noted above';
    Example: update saas."EncryptionKeys" set id=6 where uuid='cbd45656-####-####-####-########487';
  7. Run this command to alter table to create primary key:
    ALTER TABLE "EncryptionKeys" ADD CONSTRAINT "encryptionkeys_pkey" PRIMARY KEY(id);
     
  8. Ensure  that you can see the encryptionkeys_pkey constraint from output of below command:
    vcac=# \d+ "EncryptionKeys"
     
  9. Perform the upgrade now.