How can I issue a redeploy command in juju after a bundle failed to deploy and the machines are not starting?
Hi John, assuming you don’t have anything else in the model (highly recommended to dedicate a bundle to a model) the simplest way is to just remove the model.
juju destroy-model <model-name>
This should release/remove any associated machines.
Somewhat related. What about the juju retry-provisioning
command? Is it possible to use that to make Juju retry when a machine failed to deploy in MAAS and you have released/fixed it?
Instead of destroying the entire cloud (destroying the model) because of one failed machine I would recommend using the “remove-machine” command to remove the “down” machine, followed by using the “add-machine” command and “deploy” commands to redeploy to that specific machine.
Specifically, If you are using a bundle you’ll want to redeploy the bundle as you did at the start and use the -map-machines=existing flag. This should cause the controller to re-engage (provision) the previously defunct machine (if it is in a truly “ready” state now), while keeping the already provisioned machines as specified in the model.