Comment 1 for bug 1829797

Revision history for this message
Richard Harding (rharding) wrote : Re: [Bug 1829797] [NEW] destroy-controller should prompt for --destroy-all-models and storage options

I'd prefer it just fails fast and says if you still want to do this rerun
the command with --destroy-all-models vs waiting until after the "Are you
sure" to check if it can/will do it.

In this way we don't need extra interactive bits to the command.

On Mon, May 20, 2019 at 6:45 PM Tim McNamara <email address hidden>
wrote:

> Public bug reported:
>
> When running juju destroy-controller on a system with live models, Juju
> aborts after taking users to a prompt. It should either abort
> immediately or continue the interactive session.
>
>
> Example:
>
> juju destroy-controller c-2
> WARNING! This command will destroy the "c-2" controller.
> This includes all machines, applications, data and other resources.
>
> Continue? (y/N):y
> Destroying controller
> ERROR cannot destroy controller "c-2"
>
> The controller has live hosted models. If you want
> to destroy all hosted models in the controller,
> run this command again with the --destroy-all-models
> option.
>
> Models:
> admin/default (alive), 2 machines, 1 application
> admin/misc (alive), 4 machines, 1 application
>
>
> Here is a possible alternative:
>
>
> juju destroy-controller c-2
> WARNING! This command will destroy the "c-2" controller.
> This includes all machines, applications, data and other resources.
>
> Continue? (y/N):y
> Destroying controller
> ERROR cannot destroy controller "c-2"
>
> The controller has live hosted models. Do you want
> to destroy all hosted models? Skip this step by
> running this command again with the --destroy-all-models
> option.
>
> Models:
> admin/default (alive), 2 machines, 1 application
> admin/misc (alive), 4 machines, 1 application
>
> Destroy all models? (y/N):y
>
>
> A similar stanza could be made for storage:
>
> Destroy storage? (destroy/release/Abort)
>
> ** Affects: juju
> Importance: Low
> Status: Triaged
>
>
> ** Tags: cli destroy-controller destroy-model usability
>
> --
> You received this bug notification because you are subscribed to juju.
> https://bugs.launchpad.net/bugs/1829797
>
> Title:
> destroy-controller should prompt for --destroy-all-models and storage
> options
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/juju/+bug/1829797/+subscriptions
>