Pivotal Knowledge Base

Follow

Cannot deploy due to prior install being stuck in 'Running' state

Environment

Pivotal Cloud Foundry: 1.9, 1.10, 1.11

Symptom

Ops Manager VM was stuck during installation and had to be rebooted in order to remedy hung state.

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. 

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.

Comments

Powered by Zendesk