Sneha Sinha Field Notes

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.

Software Update shows on the primary nodeFailed 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

  1. Phase 1Where it fails

    1. Upload the 9.1 PAK fileVCF Operations admin UI > Software Update
    2. Step 9 of 14: run master postgres db upgradePrimary node fails
    3. Cluster back online
This is the very first upgrade step of a 9.0 to 9.1 upgrade. Source: KB 440200.

Confirm it is this issue

On the primary node, as root, check the database version. It should return major 1, minor 0, build 976:

VCF Operations primary node, root (from KB 440200)
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:

VCF Operations primary node, root (from KB 440200)
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.

  1. Revert every node in the cluster to its pre-upgrade snapshot. Keep the snapshots.
  2. Power on all VCF Operations appliances, but do not bring the cluster online.
  3. Download KB_440200_validation.bash from the KB and copy it to /root on the primary node.
  4. Make it executable and run it to clean the database entries:
VCF Operations primary node, root (from KB 440200)
chmod +x /root/KB_440200_validation.bash
/root/KB_440200_validation.bash
  1. 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.