director_ctl
to cancel all queued BOSH tasks.bosh cancel task <#>
WARNING: Make sure you are absolutely certain that the queued tasks are not affecting any ongoing deployments. If you have a currently running deployment DO NOT CONTINUE. Contact Tanzu Support for assistance.
The steps outlines in this article cancel all queued tasks and if you have a running deployment, it may leave it in an inconsistent and potentially broken state. Again, do not continue if you have a deployment that is in progress.
If you are using a recent version of Ops Manager 2.7+, use the following command:
bosh cancel-tasks -s=queued
If the previous command is not available, please follow the following steps:
1. Login to BOSH Director VM using vcap
credentials (vcap
credentials can be found on the Operations Manager Director tile, Credentials tab):
ssh vcap@<Director_IP>
2. Switch to Superuser:
sudo su -
3. Enter the director console. The method of accessing the director console depends on the version of Operations Manager.
Operations Manager 2.1 or earlier
/var/vcap/jobs/director/bin/director_ctl console
Operations Manager 2.2 or later
/var/vcap/jobs/director/bin/console
4. Count the number of queued tasks with this command:
irb(main):001:0> Bosh::Director::Models::Task.where(state: "queued").count
5. Cancel all the queued BOSH tasks with this command:
irb(main):002:0> Bosh::Director::Models::Task.where(state: "queued").update(state: "cancelling")
For more information on BOSH tasks, refer to Reviewing Tasks.