Unable to remove missing resources from deployment on Aria Automation
book
Article ID: 373646
calendar_today
Updated On:
Products
VMware Aria Suite
Issue/Introduction
Resources that have been deleted from the endpoint or are in an invalid state still appear as active in the Aria Automation UI.
Actions performed on a deployment containing these stale resources (e.g., changing the project or owner) fail during the validation phase.
The request fails with an error message similar to: Action is not supported based on the current state. Reason: Validation Failure.
The Aria Automation UI does not provide an option to manually remove these stale resource records.
Environment
VMware Aria Automation 8.x
Cause
Day 2 actions (e.g., changing project or owner) will fail validation for any deployment that contains missing or deleted resources.
Resolution
Warning: The following procedure involves making direct modifications to the Automation database. Ensure you have a current backup or snapshot of the Aria Automation environment before proceeding.
The solution is to remove the stale resource records directly from the Aria Automation database.
Procedure
SSH to the Aria Automation appliance as the root user.
Run the following command to access the database command line:
vracli dev psql
Switch to the catalog database:
\c catalog-db
Identify and verify the stale resource record using its ID. Note: The resource ID can be found in the Aria Automation UI by inspecting the affected resource. For example:
Run the following query to confirm the record exists, replacing the example ID with your resource ID:
select * from dep_resource where id='########-####-####-####-############';
Run the following query to delete the resource record:
delete from dep_resource where id='<Resource ID from previous step>';
After the record is deleted, Day 2 actions on the associated deployment (e.g., changing project or owner) will succeed.