error when destroying model with storage without destroy-storage option should display before confirmation prompt

Bug #2012593 reported by Samuel Walladge
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Low
Unassigned

Bug Description

Note: this is more of a request/suggestion than a bug.

When forgetting to add the --destroy-storage option when destroying a model that has storage, one must type out the model name in confirmation, before immediately being shown the error:

```
$ juju destroy-model my-model
WARNING This command will destroy the "my-model" model and all its resources

 - 12 machines will be destroyed
...

To continue, enter the name of the model to be destroyed: my-model
Destroying model
ERROR cannot destroy model "my-model"

The model has persistent storage remaining:
     3 volumes

To destroy the storage, run the destroy-model
command again with the "--destroy-storage" option.
```

To avoid wasting time typing for the confirmation prompt, it would be great if this check for the --destroy-storage option would happen _before_ the confirmation prompt. ie fail faster.

Harry Pidcock (hpidcock)
Changed in juju:
importance: Undecided → Low
milestone: none → 3.2.2
status: New → Triaged
summary: error when destroying model with storage without destroy-storage option
- should display before confirmation prompty
+ should display before confirmation prompt
description: updated
Changed in juju:
milestone: 3.2.2 → 3.2.3
Changed in juju:
milestone: 3.2.3 → 3.2.4
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.