While upgrading VCF Automation from 9.1.0 to 9.1.1, the upgrade fails with "Step vsp_cluster_upgrade failed", or the VCFA user interface is inaccessible because the Prelude apps are missing.
The trigger is the unexpected deletion of the vcfa-bundle PackageDeployment (PD) in the prelude namespace, which removes the VCFA apps. A PD recreated from an old backup does not restore them. One or more of the following symptoms may occur:
The PD shows Failed with
failed to generate helmrelease for template <name>: ... executing "tmpl" at <lower>: invalid value; expected stringThe template named in the message changes between reconciles.
The vmsp-prelude-deployer Job fails with
failed to perform "FetchReference" ... charts/prelude/<chart>:<version>: not foundA HelmRelease fails with
Helm upgrade failed ... "<release>" has no deployed releasesThe upgrade precheck fails on the Postgres on-demand WAL backup with
curl: (56) OpenSSL SSL_read: ... ssl/tls alert unsupported certificateVCF Automation 9.1.x
Incomplete PD values. The PD was recreated from a backup found in a support bundle. That backup was stale and carried only vcfa.debug and vcfa.fipsMode, with no vcfa.fqdn or ingress.vcfa.fqdn. The vcfa-common, vksm, and health-status release templates call <lower> on that FQDN, so rendering fails. Packages are rendered in random order and processing stops at the first error, which is why the failing template keeps changing.
Missing apps and artifacts. The images and charts are gone from the cluster registry, so the vmsp-prelude-deployer Job cannot pull charts and exits with status 1.
Stuck HelmRelease. The uninstall triggered by the PD deletion was interrupted. The Helm release history of vksm-stack was left with its last revision in uninstalling and no deployed revision, so Helm rejects every upgrade.
Postgres backup certificate error. The upgrade precheck fails on the on-demand WAL backup because of an unsupported SSL/TLS certificate.
Follow the steps below to resolve the issue.
Step 1: Correct the PD values
vcfa-bundle PD from a support bundle taken before the deletion, or from any previous backup of the PD. Check that the backup contains the deployment values, at least the FQDN (vcfa.fqdn or ingress.vcfa.fqdn):grep -n -i fqdn vcfa-bundle-pd.yamlstatus section from the manifest, then restore it:kubectl apply -f vcfa-bundle-pd.yamlIf a PD named vcfa-bundle already exists with incomplete values, do not delete it, because deleting a PD removes the apps. Replace it instead:
kubectl replace -f vcfa-bundle-pd.yaml
kubectl get pd vcfa-bundle -n prelude -o yamlThe spec.values section should now hold the FQDN and ingress settings, and the <lower> render errors should stop.
Step 2: Re-stage the vcfa-bundle
kubectl get bundle -Akubectl get bundle <bundle-name> -n <namespace> -o jsonpath='{.spec.packages[0].labels}'kubectl patch bundle <bundle-name> -n <namespace> --type=json \
-p="[{\"op\":\"add\",\"path\":\"/spec/packages/0/labels\",\"value\":{\"packages.vmsp.vmware.com/force-push-timestamp\":\"$(date +%s)\"}}]"Note: If the first command returned existing labels, include them in the value, because this patch replaces the whole labels map.kubectl get bundle -Akubectl get pd -n preludekubectl get hr -n preludeSuccessful and the HelmReleases are Ready=True.Step 3: Recover a HelmRelease stuck with "has no deployed releases"
helm history vksm-stack -n preludekubectl get kafka,pvc,sts,deploy -n prelude | grep -i vksmkubectl get pv | grep -i vksmuninstalling (or every revision is failed or superseded), and no VKSM PersistentVolume is listed as Released or Available, back up and clear the Helm history:kubectl get secret -n prelude -l owner=helm,name=vksm-stack -o yaml > ~/vksm-stack-helm-secrets-backup.yaml
kubectl patch hr vksm-stack -n prelude --type merge -p '{"spec":{"suspend":true}}'
kubectl delete secret -n prelude -l owner=helm,name=vksm-stack
kubectl patch hr vksm-stack -n prelude --type merge -p '{"spec":{"suspend":false}}'
kubectl annotate hr vksm-stack -n prelude reconcile.fluxcd.io/requestedAt="$(date +%s)" --overwrite Unknown ("Running 'install' action") while it runs.Released or Available, do not delete anything and contact Engineering.helm uninstall. It can remove the Kafka volumes.kubectl apply -f ~/vksm-stack-helm-secrets-backup.yamlStep 4: Fix the Postgres backup certificate error
kubectl logs <pg-backup-vcfapostgres-backup-pod> -n preludeStep 5: Retry the upgrade to 9.1.1:
Successful and all HelmReleases are Ready=True, restart the upgrade.Verification:
Successful, all the HelmReleases are Ready=True, and vksm-stack has a deployed revision. Verify that the VCFA user interface is reachable.kubectl get pd vcfa-bundle -n prelude
kubectl get hr -n prelude
helm history vksm-stack -n preludePrevention:
Restrict who can delete PackageDeployments in the prelude namespace.
Keep a current copy of the PD, because a stale backup caused the missing FQDN issue
kubectl get pd vcfa-bundle -n prelude -o yaml > ~/vcfa-bundle-pd-backup.yamlIf a PD is deleted, check the Kubernetes audit logs to find out what/who deleted it.