Expired license records seen on Aria suite lifecycle manager locker due to stale license information stored in Aria operations database
search cancel

Expired license records seen on Aria suite lifecycle manager locker due to stale license information stored in Aria operations database

book

Article ID: 411711

calendar_today

Updated On:

Products

VCF Operations/Automation (formerly VMware Aria Suite)

Issue/Introduction

  • Expired license entries available in Aria suite lifecycle manager locker and there is no option available to remove those expired licenses.

  • Running below API calls to remove the expired license from Swagger UI removes the expired licenses from locker. However, these re-appear in the locker when an inventory sync is run on the aria operations environment.
    • GET /lcm/locker/api/v2/licenses/alias/{alias}
    • Delete /lcm/locker/api/licenses/{vmid}

Environment

VMware Aria operations 8.x

Aria suite lifecycle manager 8.x

 

Cause

Stale expired license entries in Aria operations database

Resolution

Prerequisite:

  • Take a non-memory snapshot of all the nodes before proceeding with the below steps.

Steps to remove expired stale license entry from Aria operations database table 'vcenter_license_mapping'

  1. Connect to the PostgreSQL database by running the command below
    su - postgres -c "/opt/vmware/vpostgres/current/bin/psql -d vcopsdb -p 5433"
  2. Once in the Postgres DB, Check the license mappings table.
    select * from vcenter_license_mapping;
  3. Review the output and identify any expired licenses, note down the 'vc_id' of expired license you wish to remove.
  4. Delete stale license entries
    delete from vcenter_license_mapping where vc_id = '<vc_id>';
    Note: Replace the vc_id noted from step 3.
  5. Retry expired license deletion using Aria Suite Lifecycle Swagger APIs:
    1. Get the vmid of the expired license
      GET /lcm/locker/api/v2/licenses/alias/{alias}
    2. Delete the expired license
      DELETE /lcm/locker/api/licenses/{vmid}
  6. Verify license removal
    • Ensure that the expired license no longer appears in the Aria Suite Lifecycle > Locker > Licenses.
  7. Run inventory sync on Aria Operations
    • Perform an inventory sync to confirm that the expired licenses do not reappear in the Aria Suite Lifecycle locker.