Upgrade VCSA from 6.7 to 7.x fails at Starting vPostgres service "ERROR: extension "amcheck_next" does not exist"
search cancel

Upgrade VCSA from 6.7 to 7.x fails at Starting vPostgres service "ERROR: extension "amcheck_next" does not exist"

book

Article ID: 325198

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

Symptoms:

firstbootInfrastructure.log :

2021-03-21T08:25:21.376Z INFO firstbootInfrastructure [Failed] /usr/lib/vmware-vpostgres/firstboot/vpostgres-firstboot.py is complete
2021-03-21T08:25:21.379Z INFO firstbootInfrastructure No localized error detail found in /var/log/firstboot/vpostgres-firstboot.py_xxxxx_stderr.log, assuming internal error
2021-03-21T08:25:21.380Z WARNING firstbootInfrastructure Bug component info file does not exist
2021-03-21T08:25:21.380Z INFO firstbootInfrastructure Firstboot duration: 68 sec
2021-03-21T08:25:21.380Z INFO firstbootInfrastructure First boot is a failure
2021-03-21T08:25:21.381Z ERROR firstbootInfrastructure Installation of vCenter server failed with firstboot scripts
2021-03-21T08:25:21.381Z WARNING firstbootInfrastructure stopping status aggregation...

vpostgres-firstboot.py_xxxxx_stderr.log :

2021-03-21T08:25:21.356Z Upgrade import step failed
2021-03-21T08:25:21.356Z vPostgres firstboot(action=firstboot) failed

vcdb_import.err :

psql.bin:/storage/seat/cis-export-folder/vcdb/VCDB_schema.dump:100: ERROR: could not open extension control file "/opt/vmware/vpostgres/12/share/extension/amcheck_next.control": No such file or directory
psql.bin:/storage/seat/cis-export-folder/vcdb/VCDB_schema.dump:107: ERROR: extension "amcheck_next" does not exist

postgresql-21.log :

2021-03-21 08:24:49.569 UTC 605702d1.9ff7 0 VCDB postgres ERROR: could not open extension control file "/opt/vmware/vpostgres/12/share/extension/amcheck_next.control": No such file or directory
2021-03-21 08:24:49.569 UTC 605702d1.9ff7 0 VCDB postgres STATEMENT: CREATE EXTENSION IF NOT EXISTS amcheck_next WITH SCHEMA vc;
2021-03-21 08:24:49.569 UTC 605702d1.9ff7 0 VCDB postgres ERROR: extension "amcheck_next" does not exist
2021-03-21 08:24:49.569 UTC 605702d1.9ff7 0 VCDB postgres STATEMENT: COMMENT ON EXTENSION amcheck_next IS 'functions for verifying relation integrity';
2021-03-21 08:24:49.937 UTC 605702d0.9fd1 0 LOG: Updating instance status...

Environment

VMware vCenter Server Appliance 6.7.x

VMware vCenter Server Appliance 7.x

Cause

The  script used for DB consistency check will create the extension "amcheck_next" to perform DB consistency check.

Resolution

  1. Login to the vPostgres DB for VC 6.7: /opt/vmware/vpostgres/current/bin/psql -d VCDB -U postgres
  2. Run query: select * from pg_extension;       
  3. Make sure it lists "amcheck_next".
  4. Drop the extension: drop extension amcheck_next;                                                                           
  5. Retry the upgrade.

**********************************************************************************************************

Expected output:

VCDB=# select * from pg_extension;
   extname    | extowner | extnamespace | extrelocatable | extversion | extconfig | extcondition
--------------+----------+--------------+----------------+------------+-----------+--------------
 plpgsql      |       10 |           11 | f              | 1.0        |           |
 amcheck_next |       10 |        16388 | t              | 2          |           |
(2 rows)

VCDB=# drop extension amcheck_next;
DROP EXTENSION

Additional Information

Interacting with vPostgres DB:

https://knowledge.broadcom.com/external/article?legacyId=2147285