VCF Operations 9.1 upgrade fails at step 9 of 14
The VCF Operations 9.1 PAK upgrade fails at run master postgres db upgrade. How to confirm it and recover with the KB 440200 script.
The VCF Operations 9.1 upgrade can stop on the primary node at step 9 of 14 with Failed resource key=pak_manager.action_failed, resource args=[run master postgres db upgrade]. The database upgrade script hits a foreign key error, and the way out is to go back to your snapshots and clean the data first.
Failed resource key=pak_manager.action_failed, resource args=[run master postgres db upgrade]The Steps Completed column reads 9 of 14, Applied Operating System Update.
Where it appears
Phase 1Where it fails
- Upload the 9.1 PAK fileVCF Operations admin UI > Software Update
- Step 9 of 14: run master postgres db upgradePrimary node fails
- Cluster back online
Confirm it is this issue
On the primary node, as root, check the database version. It should return major 1, minor 0, build 976:
su - postgres -c "/opt/vmware/vpostgres/current/bin/psql -d vcopsdb -p 5433 -c 'select * from version;'"Then look for the rows that break the upgrade script. At least one row should come back:
su - postgres -c "/opt/vmware/vpostgres/current/bin/psql -d vcopsdb -p 5433 -c 'SELECT * FROM vcf_entitlement_policy_warning AS vepw WHERE NOT EXISTS (SELECT 1 FROM vcf_entitlement AS ve WHERE ve.allocation_id = vepw.allocation_id);'"Cause
Entitlement policy warnings in the database point at entitlements that no longer exist. The upgrade script then fails on a foreign key constraint (KB 440200).
Fix
This needs the snapshots you took before the upgrade. Without them, stop and contact Broadcom support.
- Revert every node in the cluster to its pre-upgrade snapshot. Keep the snapshots.
- Power on all VCF Operations appliances, but do not bring the cluster online.
- Download
KB_440200_validation.bashfrom the KB and copy it to/rooton the primary node. - Make it executable and run it to clean the database entries:
chmod +x /root/KB_440200_validation.bash/root/KB_440200_validation.bash- In the admin UI, open Software Update and click INSTALL A SOFTWARE UPDATE to apply the 9.1 update again.
Verify
The update passes step 9 and completes, and the cluster comes back online on 9.1.
My take
This is the strongest argument I know for taking the VCF Operations snapshots seriously. The fix is simple with them and a support case without them.