vCenter Server update fails with error "Installation failed - Install in progress - You have reached maximum number of retries to resume the patching. Please restore the vCenter using the backup."
search cancel

vCenter Server update fails with error "Installation failed - Install in progress - You have reached maximum number of retries to resume the patching. Please restore the vCenter using the backup."

book

Article ID: 313301

calendar_today

Updated On:

Products

VMware vCenter Server VMware vCenter Server 7.0 VMware vCenter Server 8.0

Issue/Introduction

Updating vCenter fails with the below error:

var/log/vmware/applmgmt/update_microservice.log

- 9844 -  update_microservice::                     _runEvent: 395 -    ERROR - Event callback failed: UnboundLocalError("local variable 'taskFailStatus' referenced before assignment") 'Traceback (most recent call last):\n  File "/usr/lib/applmgmt/update/py/vmware/appliance/update/update_b2b.py", line 2600, in install\n    MAX_RESUME_THRESHOLD)\n  File "/usr/lib/applmgmt/update/py/vmware/appliance/update/update_b2b.py", line 2904, in _is_resume_threshold_reached\n    if resume_count and int(resume_count) >= resume_threshold:\nValueError: invalid literal for int() with base 10: \'resume-threshold\'\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n  File "/usr/lib/applmgmt/update/py/vmware/appliance/update/update_microservice.py", line 388, in _runEvent\n    coroutine.send(1)\n  File "/usr/lib/applmgmt/update/py/vmware/appliance/update/update_microservice.py", line 241, in stageAndInstallEventHandler\n    coroutine.send(i)\n  File "/usr/lib/applmgmt/update/py/vmware/appliance/update/update_b2b.py", line 2695, in install\n    task.update(taskFailStatus, task.progress.completed,\nUnboundLocalError: local variable \'taskFailStatus\' referenced before assignment\n'



 

Environment

VMware vCenter Server 7.x
VMware vCenter Server 8.x

Cause

The value for resume-count in the config table in DB gets updated with the string "resume-threshold" instead of an integer value.

Resolution

Currently there is no resolution.


Workaround:

To workaround the issue:

Try to unstage and retry stage-install.

1. Log in to your vCenter Appliance via SSH.

2. Run following command: software-packages unstage

3.Start the update process again.

Note: If the default shell was changed to /bin/bash, you can use /bin/appliancesh to enter the Appliance-Shell.
Note: Please ensure you have a working backup before attempting to update your vCenter Appliance.


OR

  1. Take a snapshot/backup of the vCenter appliance.

  2. Run the following commands on the VCSA via an SSH session:

service-control --stop applmgmt

rm -rf /storage/core/software-update/updates/*
rm -rf /storage/core/software-update/stage/*
rm -rf /storage/db/patching.db
mv /storage/core/software-packages/staged-configuration.json /storage/core
mv /etc/applmgmt/appliance/software_update_state.conf /storage/core

service-control --start applmgmt

  1. Retry the update.