model destruction failed because modelEntityRefs was missing some fields
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Canonical Juju |
Fix Released
|
High
|
John A Meinel | ||
2.5 |
Fix Released
|
High
|
John A Meinel |
Bug Description
Hi,
When trying to destroy a model on our 2.4.3 controller, we got the following error message :
ERROR cannot destroy model: failed to destroy model: state changing too quickly; try again soon
which is generally a sign that a transaction got aborted. When looking at aborted transactions related to the destruction of this model, I found the following :
https:/
Looking at this txn, the second and third assertions were true, but for the first one, the document looked like https:/
When I added "volumes" and "filesystems" fields to the modelEntityRefs document (set to []), the model destruction worked.
A lot of modelEntityRefs are missing these fields. Should every single document in this collection have these fields ? Do you have any idea how we got into this situation ?
Thanks !
Changed in juju: | |
milestone: | none → 2.5.1 |
status: | Confirmed → Triaged |
importance: | Undecided → High |
tags: | added: destroy-model |
Changed in juju: | |
milestone: | 2.5.1 → 2.5.2 |
Changed in juju: | |
milestone: | 2.5.2 → 2.6-beta1 |
assignee: | nobody → John A Meinel (jameinel) |
status: | Triaged → In Progress |
Changed in juju: | |
status: | Fix Committed → Fix Released |
I ran into the same issue with a different model, exact same symptoms and missing fields in mongodb.
I ran 'db.modelEntity Refs.update( {_id: "13c240e8- 04a7-4ae0- 8568-d3fdbfd6cf 72"}, { $set: { "volumes": [], "filesystems": [] }})', and after those volumes and filesystems fields were added, the modelEntityRefs documet for the model in question showed them and I could then delete it.