Search the VMware Knowledge Base (KB)
View by Article ID

Requests get stuck at 'In Progress' or 'Pending Approval' status in vRA (2114385)

  • 4 Ratings

Symptoms

In the vRealize Automation Requests page, multiple tasks get stuck with the status In Progress or Pending Approval for a long time.

Cause

This issue occurs when a task hangs up or when the backing infrastructure for that task is changed or removed.

Resolution

To resolve this issue, clean up the postgres database for those tasks.
 
  1. Take a backup of the postgres database by running these commands:

    service vcac-server stop
    su -m -c "/opt/vmware/vpostgres/current/bin/pg_dumpall -c -f /PATH/vcac.sql" postgres
    bzip2 -z /PATH/vcac.sql
    service vcac-server start

  2. Connect to the database by running the command:

    /opt/vmware/vpostgres/current/bin/psql vcac postgres

    \connect vcac;


  3. To ensure the update is accurate, run all these cleanup scripts in a transaction:

    BEGIN;
    UPDATE comp_bprequest
    SET status = 'FAILED'
    WHERE external_request_id::uuid IN
        (SELECT id
         FROM cat_request
         WHERE STATE = 'IN_PROGRESS'
           AND (DATE_PART('day', now() - lastupdated) * 24 + DATE_PART('hour', now() - lastupdated) > '8'));

    UPDATE cat_request
    SET state = 'FAILED'
    WHERE id::uuid IN
        (SELECT id
         FROM cat_request
         WHERE STATE = 'IN_PROGRESS'
           AND (DATE_PART('day', now() - lastupdated) * 24 + DATE_PART('hour', now() - lastupdated) > '8'));

    UPDATE cat_resource
       SET
           status='DELETED'
    WHERE request_id in
     ( select id from cat_request where state in ( 'FAILED' ) );

  4. Verify that updates are successful by running Select queries:

    SELECT id,
           status
    FROM comp_bprequest
    WHERE external_request_id::uuid IN
        (SELECT id
         FROM cat_request
         WHERE STATE = 'IN_PROGRESS'
           AND (DATE_PART('day', now() - lastupdated) * 24 + DATE_PART('hour', now() - lastupdated) > '8'));

    SELECT count(*)
         FROM cat_request
         WHERE STATE = 'IN_PROGRESS'
           AND (DATE_PART('day', now() - lastupdated) * 24 + DATE_PART('hour', now() - lastupdated) > '8')

    SELECT count(*) FROM cat_resource WHERE request_id IN (SELECT id FROM cat_request WHERE state = 'IN_PROGRESS' AND type = 'CI') 
     count

  5. If count is '0' for all 3 of the select queries, then COMMIT else ROLLBACK;

    COMMIT / ROLLBACK; 

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 4 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 4 Ratings
Actions
KB: