VMware Cloud Community
accsa1626
Contributor
Contributor

Upgrade vra 7.5 fail

HI, I´m updating my environment from 7.3 to 7.5, and the same fail in the post-scripts with the error:

"Update failed (code 0-2)"

Checking some log I found this:

NOTICE:  Found extension citext and it exists in pg_catalog

There are errors while upgrading the webapps database. Check /var/log/vcac/vcac-config.log for more information.

+ res=2

+ echo 'Script /etc/bootstrap/postupdate.d/20-vcac failed, error status 2'

+ exit 2

and this:

Upgrade:

Command execution failed with unexpected error: liquibase.exception.MigrationFailedException: Migration failed for change set liquibase/catalog-service-BUG2067627.xml::1::BUG2067627:

     Reason: liquibase.exception.DatabaseException:

     Error executing SQL ALTER TABLE public.cat_tenant ALTER COLUMN id TYPE CITEXT: ERROR: could not create unique index "cat_tenant_pkey"

    Detail: Key (id)=(LabAca) is duplicated..

Check de DB:

      id       |        lastsync                    |     name

---------------+-----------------------------+------------

LabAca  | 2017-05-29 05:54:24.057 | LabAca

labaca    | 2018-11-15 10:24:39.504 | LabAca

test         | 2017-04-28 17:09:25.642 | test

Finally i found it, the error is clear (duplicated id in postgress DB table), but I can´t delete the first register because foreign restrictions.

Any idea of how I can fix this?

Regards for any ideas.

Reply
0 Kudos
2 Replies
prestonville
Enthusiast
Enthusiast

Hi. I am running a 7.3 to 7.5 upgrade and had the same error. Dup[licate tenant key. Was wondering how you fixed this?

Also any chance you could post the SQL cmd to list the duplicate entry as I can't get the table to list (my syntax is wrong) .

Thanks.

Reply
0 Kudos
prestonville
Enthusiast
Enthusiast

Have found the reasons for this error.

  • Duplicate entry for tenant created in cat_tenant table by API call from vRO. The vRA host configured in the vRO was registered to the tenant but was spelt with uppercase leading character but the tenant in vRA UI is spelt all lowercase. all worked ok to add and view vRA UI objects but reservations (etc) created by API calls created the 2nd entry in the tenant table, vRA UI displayed them all ok as it ignored the case difference. Upgrade failed as found 2 entries for same tenant in tenant table. Had to contact support and got some SQL cmds as had to alter references on one of the tenant names in about 6 tables as all linked then able to delete one of the cat_tenant entries.
Reply
0 Kudos