model teardown fails if a charm is trying to spin up storage

Bug #2015422 reported by Jordan Barrett
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
High
Simon Richardson

Bug Description

If you deploy a charm with attached storage, and then immediately remove the model (before the charm can reach a steady state), the model will fail to teardown, and get stuck indefinitely
```
$ juju add-model foo
Added 'foo' model on localhost/localhost with credential 'localhost' for user 'admin'
$ juju deploy ubuntu
Located charm "ubuntu" in charm-hub, revision 22
Deploying "ubuntu" from charm-hub charm "ubuntu", revision 22 in channel stable on ubuntu@20.04/stable
$ juju destroy-model --no-prompt --destroy-storage foo
Destroying model
Waiting for model to be removed, 1 machine(s), 1 application(s), 1 filesystems(s)...
Waiting for model to be removed, 1 machine(s), 1 application(s).................
................................................................................
................................................................................
................................................................................
# gets stuck here forever
```

This has been causing failures in our CI. The storage part is essential - this issue is not seen with revision 21 of the ubuntu charm, which doesn't include storage. I hypothesise that because we destroy it before it's fully created, the storage is ending up in a weird intermediate state which blocks teardown of the model.

Observed on multiple versions of Juju (2.9, 3.0, 3.1, 3.2), on LXD and AWS.

Revision history for this message
Joseph Phillips (manadart) wrote :

I wonder if this has anything to do with the changes to storage provisioning that Simon worked on.

Changed in juju:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Simon Richardson (simonrichardson)
Revision history for this message
Joseph Phillips (manadart) wrote :

Assigned to Simon to see if we can get a quick diagnosis.

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.