Error: Lock is unavailable: Deployment level lock cannot be acquired when performing Synchronize Inventory Versions
search cancel

Error: Lock is unavailable: Deployment level lock cannot be acquired when performing Synchronize Inventory Versions

book

Article ID: 373378

calendar_today

Updated On:

Products

VMware SDDC Manager / VCF Installer

Issue/Introduction

  • In the VCF Operations UI, a scheduled daily job to Synchronize Inventory Versions fails with error message: Acquire lock.



  • Expanding the Task list, following error message is observed:

    Lock is unavailable: Deployment level lock cannot be acquired.

Environment

  • SDDC 5.x.
  • VCF 9.x.

Cause

This issue occurs, due to a Stale Objects (such as vCenter, NSX) are available and in the SDDC Manager.

Resolution

To resolve this issue, follow the steps mentioned in the following options:

Option 1:

Manually restart the Failed task in the task panel after the other parallel operations complete.

Option 2:

Wait for the daily version synchronization to synchronize the inventory versions on the next scheduled run.

Workaround:

Option 1:

  1. Login to SDDC Manager UI or VCF Operations Manager UI with admin credentials > Navigate to Security > Password Management.
  2. Locate the Task with Task Status as Failed.
  3. Click on RESTART TASK.

Option 2:

If Option 1 fails, then remove the stale objects from the SDDC Database, following the steps below:

  1. Take Snapshot of the SDDC Manager appliance.
  2. SSH into the SDDC Manager appliance as vcf and then as root user.
  3. Validate the lock existence, using following command:

    psql -h localhost -U postgres -d platform -c "select * from lock;"

  4. Then delete the lock entries using the following command:

    psql -h localhost -U postgres -d platform -c "delete from lock where resource_type='deployment';"

  5. Login to SDDC Manager UI or VCF Operations Manager UI with admin credentials.
  6. Locate the Task with Task Status as Failed.
  7. Click on RESTART TASK.