Unable to delete a workflow
search cancel

Unable to delete a workflow

book

Article ID: 380967

calendar_today

Updated On:

Products

VMware Aria Suite

Issue/Introduction

In VCO sometimes stale entries of workflows that seem to have been running for a while can't seem to be deleted. 

Environment

VRA 8.16.2

 

Resolution

Attempt #1:

Within Swagger, there is a delete workflow run API

https://<fqdn>/vco/api/docs

Delete Workflow Run API: /workflows/{workflowId}/executions/{executionId}/

You will need an ExecutionID and a WorkflowID to delete the workflow. 

If attempt #1 fails..

Attempt #2:

// Login database
ssh root@<vra-host>

// backup catalog-db
vracli db dump catalog-db | xz -c > catalog-db.xz

// connect to catalog-db
vracli dev psql catalog-db

// Find requests of this deployment. The request with "IN-PROGRESS" status is the hanging one.
catalog-db-# select id, name, status from dep_request where deployment_id = '<deployment_id>' order by created_at desc; 

// reset IN-PROGRESS request to 'FAILED': 
update dep_request set status = 'FAILED' where id = '<request_id>' and deployment_id = '<deployment_id>';