Unable to add datastore in Datastore Profile.
search cancel

Unable to add datastore in Datastore Profile.

book

Article ID: 388524

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

Symptoms:

  • The UI reports errors similar to:

    "Timeout in remote operation after 80 seconds. Operation PATCH..."

  • The provisioning-service app logs show entries similar to:

    [ERROR: duplicate key value violates unique constraint "uq_storage_profile_association_state_storage_item_id_storage_de"...

Environment

VMware Aria Automation 8.x

Cause

This can be caused by temporary datastore unavailability due to infrastructure issues.

Resolution

Workaround:

 

  • Take a VMware Aria Automation snapshot or backup the provisioning-db

    vracli db dump provisioning-db > /tmp/provisioning-db.dump

  • Connect to the primary node via SSH and access provisiong-db:

    vracli dev psql provisioning-db

  • Execute query to validate if any association has any deleted datastore:

    select * from storage_profile_association_state where document_update_action = 'DELETE';

  • Delete all entries with Deleted association:

    DELETE from storage_profile_association_state where document_self_link in (select document_self_link from storage_profile_association_state where document_update_action = 'DELETE');

  • Validate if all unwanted entries are removed - should return nothing:

    select * from storage_profile_association_state where document_update_action = 'DELETE';

  • Check if it is possible to add the datastore to the storage profile in the UI.
  • If the issue persists revert to snapshot.