Trigger a failing BOSH job
What?
When a BOSH VM is healthy, it is listed with the status “running”. Let’s use Monit to trigger a state change.
How?
- Run
watch bosh vms. (If you don’t havewatchinstalled, runbrew install watch) - In another buffer or tab,
bosh sshinto one of your Diego cells - Run
sudo -ito run as root - Run
monit summary(need root access to do this) - Run
monit stop all - Observe the state of the bosh VM in question.
- Run
monit start all
Expected Result
The Diego job for the cell you SSHed to should be listed as failing as soon as you stop the Monit jobs. When you run monit start all it should return to the running state.
Resources
Docs: BOSH CLI health commands Docs: BOSH Job Lifecycle Docs: Monit