Blocking endless loop when destroying models

Bug #2019004 reported by Juan M. Tirado
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Triaged
Undecided
Unassigned

Bug Description

Juju version: 3.2-rc1. Right now using the corresponding branch from GitHub.

When destroying a model with charms in a with storage in a pending stage, juju falls into an endless loop until reaching the 30 minutes timeout.

juju add-model removeme
Added 'removeme' model on localhost/localhost with credential 'localhost' for user 'admin'
juju deploy ubuntu --base ubuntu@22.04
Located charm "ubuntu" in charm-hub, revision 22
Deploying "ubuntu" from charm-hub charm "ubuntu", revision 22 in channel stable on ubuntu@22.04/stable
juju destroy-model removeme
WARNING This command will destroy the "removeme" model and all its resources

 - 1 machine will be destroyed
  - machine list: "0 ()"
 - 1 application will be removed
  - application list: "ubuntu"
 - 1 filesystem and 0 volume will be destroyed

To continue, enter the name of the model to be destroyed: removeme
Destroying model
Waiting for model to be removed, 1 machine(s), 1 application(s), 1 filesystems(s).......................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................

This will continue for 30 minutes until reaching the timeout. In the controller logs I see:

juju debug-log -m controller
...
machine-0: 12:59:22 WARNING juju.state cleanup failed in model eee33fcb-2ef9-4a6e-8eb0-1cc739641ea3 for dyingMachine("0"): destroying filesystem 0/0: filesystem is assigned to storage files/0
machine-0: 12:59:52 WARNING juju.state cleanup failed in model eee33fcb-2ef9-4a6e-8eb0-1cc739641ea3 for dyingMachine("0"): destroying filesystem 0/0: filesystem is assigned to storage files/0
machine-0: 13:00:05 ERROR juju.worker.dependency "compute-provisioner" manifold worker returned unexpected error: processing updated machines: ensuring machine dead id:0, details:0: machine 0 has unit "ubuntu/0" assigned
machine-0: 13:00:22 WARNING juju.state cleanup failed in model eee33fcb-2ef9-4a6e-8eb0-1cc739641ea3 for dyingMachine("0"): destroying filesystem 0/0: filesystem is assigned to storage files/0
....

tags: added: deploy destroy-model storage
Changed in juju:
milestone: none → 3.2-rc1
status: New → Triaged
Revision history for this message
Ian Booth (wallyworld) wrote :

If storage is not yet attached, the unit will block and not progress any subsequent hooks. You either need to wait for storage to be attached or use force.

Revision history for this message
Jordan Barrett (barrettj12) wrote :
Changed in juju:
milestone: 3.2-rc1 → none
Revision history for this message
Juan M. Tirado (tiradojm) wrote :

This is probably duplicated. Unfortunately, this is now breaking some of our integration tests.

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.