kubectl get pods -A command lists the upgrade component workflow in an error state.kubectl logs vcenter-role-sync-h6vcx-execute-script-####### -n vmsp-platform) revealed that the connection to the vCenter server was failing due to an incorrect user name or password.time-YYYY-MM-DD level-INFO msg-"waiting for signals" argo-true signalPath-/var/run/argo/ctr/main/signal YYYY-MM-DD INFO : ############# === vCenter Role Sync Pre-Upgrade Step === YYYY-MM-DD INFO : ############# Retrieving API payload from secret task-#############YYYY-MM-DD INFO : ############# Found admin credentials for user: [email protected] YYYY-MM-DD INFO : ############# Target version: not specified YYYY-MM-DD INFO : ############# vCenter server: <vCenter.example.com> YYYY-MM-DD INFO : ############# Attempting secure certificate validation for vCenter connection YYYY-MM-DD INFO : #############Certificate validation enabled using known_hosts file at /tmp/govc_known_hosts govc: ServerFaultCode: Cannot complete login due to an incorrect user name or password. YYYY-MM-DD ERROR : ############# Failed to connect to vCenter server <vCenter.example.com> YYYY-MM-DD ERROR : ######### Script exited unexpectedly at line 1 with exit code 1 YYYY-MM-DD INFO : ############# Workflow stage: component-patch-upgrade-deploy YYYY-MM-DD INFO : ############# Calling get_message_count ... YYYY-MM-DD INFO : ######### get_message_count returned: 0, output: '54' YYYY-MM-DD INFO : ############# Existing messages: 54 time-YYYY-MM-DD level-INFO msg-"sub-process exited" argo-true error-"exit status 1" time=YYYY-MM-DD level=INFO msg="no need to save parameter - on overlapping volume" argo=true src=/tmp/output.txt time=YYYY-MM-DD level=INFO msg="no need to save parameter - on overlapping volume" argo=true src=/tmp/error.txt time=YYYY-MM-DD level=INFO msg="file signal handler exiting due to context cancellation" argo=true Error: exit status 1 (END)VCF Operations 9.1.1
The failure occurred because the vCenter credentials stored in the patch task secret were incorrect. This issue ideally occurs when the SDDC manager rotated the credentials shortly after the patch upgrade was initiated, which caused all subsequent task retries to fail when attempting to authenticate with vCenter.
To resolve this issue, patch the secret with the correct/updated vCenter credentials following the instructions provided below:
kubectl get task -n vmsp-platformkubectl get secret <secret_name> -n vmsp-platform -o yaml > <secret_name>.backup.yamlAPIDATA=$(kubectl get secret <secret_name> -n vmsp-platform -o jsonpath='{.data.apidata}' | base64 -d)NEW_APIDATA=$(printf '%s' "$APIDATA" | jq -c \ --arg u "$(printf '%s' "vc_username" | base64 | tr -d '\n')" \ --arg p "$(printf '%s' "vc_password" | base64 | tr -d '\n')" \ '.spec.configuration.vcAdminAccount.username = $u | .spec.configuration.vcAdminAccount.password = $p')kubectl patch secret {secret_name> -n vmsp-platform --type merge \ -p "{\"data\":{\"apidata\":\"$(printf '%s' "$NEW_APIDATA" | base64 | tr -d '\n')\"}}"Once the secret is patched, retry the upgrade.
Reference code in the error is dynamic and can change on every occurrence.