SDDC Manager upgrade from 5.2.x (VxRail) to 9.1.1 fails at "SDDC Manager Deployment Drift"
search cancel

SDDC Manager upgrade from 5.2.x (VxRail) to 9.1.1 fails at "SDDC Manager Deployment Drift"

book

Article ID: 461957

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer

Issue/Introduction

  • The SDDC Manager upgrade from 5.2.2 to 9.1.1 fails at the configuration drift step.

  • Compatibility precheck fails with a generic error message, "Failed to execute resource validation"
  • Retrying fails the same way, even after restoring a snapshot.
  • In /var/log/vmware/vcf/lcm/thirdparty/upgrades/<upgrade-id>/sddcmanager-migration-app/logs/sddcmanager_migration_app_upgrade.log below entries are seen: 
    YYYY-MM-DDTHH:MM:SS DEBUG [vcf_lcm,0000000000000000,0000] [c.v.v.m.a.CleanupLeftoverPasswordManagementTasks,pool-5-thread-6]  Checking for leftover VxRail password operations to clean up in the database
    YYYY-MM-DDTHH:MM:SS DEBUG [vcf_lcm,0000000000000000,0000] [c.v.v.m.a.CleanupLeftoverPasswordManagementTasks,pool-5-thread-6]  passwordManagementServiceApi API client base path: http://localhost/operationsmanager
    YYYY-MM-DDTHH:MM:SS DEBUG [vcf_lcm,0000000000000000,0000] [c.v.v.m.a.CleanupLeftoverPasswordManagementTasks,pool-5-thread-6]  Found 46 VxRail master transactions to clean up
    YYYY-MM-DDTHH:MM:SS ERROR [vcf_lcm,0000000000000000,0000] [c.v.v.m.a.CleanupLeftoverPasswordManagementTasks,pool-5-thread-6]  Caught API exception with code 500 while attempting to clean VxRail password management tasks: {"message":"Something went wrong. Please retry or contact the service provider and provide the reference token.","errorCode":"VCF_RUNTIME_ERROR","arguments":[],"referenceToken":"####"}
    YYYY-MM-DDTHH:MM:SS ERROR [vcf_lcm,0000000000000000,0000] [c.v.e.s.o.model.error.ErrorFactory,pool-5-thread-6]  [####] FAILED_TO_CLEANUP_LEFTOVER_PASSWORD_MANAGEMENT_TASKS Failed to cleanup leftover password management tasks
    com.vmware.evo.sddc.orchestrator.exceptions.OrchTaskException: Failed to cleanup leftover password management tasks
  • In /var/log/vmware/vcf/operationsmanager/operationsmanager.log, searching for the error ID printed next to the reference token shows AuthorizationDeniedException: Access Denied for /operationsmanager/security/password/vault/transactions/password-operations.
  • In /var/log/vmware/vcf/lcm/lcm-debug.log, it shows CompatibilityPrecheckAction: Error occurred while executing the out of band upgrade precheck with java.lang.RuntimeException: VCF Release 9.1.1.# not found in LCM Manifest (from TargetVersionVvsCompatibilityValidator).

Environment

  • VMware Cloud Foundation (VCF) 9.x

 

Cause

  • The upgrade step removes leftover VxRail password history (transactions with entity type VXRAIL_MANAGER) through internal calls to operationsmanager.Those calls are rejected with an authorization error (shown as HTTP 500) before they can delete anything, so the step fails.
  • The step only fails on environments that still have VxRail password transactions. 

Resolution

Refer the below steps to resolve the issue. 

  1. Restore the SDDC Manager from a snapshot taken before upgrade. 
  2. Take a new snapshot of the SDDC Manager virtual machine before making any change.
  3. Copy the attached script vxrail_password_cleanup_workaround.sh to the SDDC Manager appliance, for example to /home/vcf, and make it executable:
    chmod +x vxrail_password_cleanup_workaround.sh
  4. SSH to SDDC manager with vcf user and followed by root login.
  5. Run the script for a dry run:
    ./vxrail_password_cleanup_workaround.sh
    
    Sample output :
    
    root@sddc-manager [ /home/vcf ]# ./vxrail_password_cleanup_workaround.sh
    Step 1: identify the VxRail records
    46 vxrail masters, 24 operations touch them, 4 are VxRail-only
    workflow ids of VxRail-only operations: 4
    Dry run only. Re-run with --execute to delete.

    Note: The above output only reports what it would remove: the number of VxRail master transactions, the password operations that touch them, and how many are VxRail-only. Nothing is deleted. The numbers depend on the environment. 

  6. If the counts look right, run it again with --execute switch. It removes the task entries (a 404 means the entry is already gone and it is fine), deletes the rows in a single transaction, and checks that no VxRail master transactions are left. 
    ./vxrail_password_cleanup_workaround.sh --execute
    
    Sample Output:
    
    root@sddc-manager [ /home/vcf ]# ./vxrail_password_cleanup_workaround.sh --execute
    Step 1: identify the VxRail records
    46 vxrail masters, 24 operations touch them, 4 are VxRail-only
      workflow ids of VxRail-only operations: 4
    Step 2: remove the task entries (404 = already gone)
      DELETE <workflow-id> -> 404
      DELETE <workflow-id> -> 404
      DELETE <workflow-id> -> 404
      DELETE <workflow-id> -> 404
    Step 3: delete the rows
    Step 4: verify (must be 0)
    VxRail masters left: 0
    Done. Retry the failed config drift task.

    Note: If the delete step fails with an SQL error, the transaction rolls back and no rows are deleted.

  7. The script ends with "Done" when no VxRail master transactions are left.
  8. Initiate the upgrade/precheck of the SDDC manager. 

Note: If you see below error while running the script

usr/bin/env: 'bash\r' : No such file or directory
usr/bin/env: use -[v]S to pass options in shebang lines

Then please execute command below

sed -i 's/\r$//' vxrail_password_cleanup_workaround.sh

Additional Information

If the issue persists, contact support for further investigation: Contact Broadcom Support.

Attachments

vxrail_password_cleanup_workaround.sh get_app