Cannot Deploy due to Prior Install Being Stuck in 'Running' State
search cancel

Cannot Deploy due to Prior Install Being Stuck in 'Running' State

book

Article ID: 297630

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

Symptoms:

There is a RUNNING installation in the Changelog of Ops Manager that is no longer actually running.

A new deployment would not run because it detected RUNNING installation as already existing.

 

Environment


Cause

If Ops Manager is rebooted in the middle of an active installation, then the state may not be properly set to "Failed."

 

Resolution

In order to remedy the RUNNING install we need to perform the following steps manually to mark the install as failed:

1. Connect to the postgres database on Ops Manager

ssh into the ops manager machine
sudo su - tempest-web -s /bin/bash -c 'psql -d tempest_production'

2. Identify 'id' of install with status 'RUNNING'

SELECT * from installs;

3. Update status of install to properly set install as failed

 

BEGIN;
UPDATE installs SET 
  finished = true,
  finished_at = current_timestamp,
  status = 'failed'
WHERE id = <ID FROM PREVIOUS QUERY>;

4. Commit the transaction if there was no error

COMMIT;

If there is an error, rollback and try again

ROLLBACK;

After performing the above update, you will see the status of the installation change to Failed when pressing "Changelog" under the "Apply Changes" button in Ops Manager. You can now execute a new "Apply changes" and deploy and it will no longer be blocked by the prior stuck installation.