I hit the same error in juju 2.8, actually I have deleted 1 machine and 1 volume, but it still says there is when running 'juju destroy-model' with --force option
$ juju destroy-model ssl-queens --force -y
Destroying model
Waiting for model to be removed, 1 machine(s), 1 volume(s)........^Cctrl+c detected, aborting...
$ juju destroy-model ssl-queens --force --no-wait --destroy-storage -y
Destroying model
Waiting for model to be removed, 1 machine(s), 1 volume(s)......^Cctrl+c detected, aborting...
$ juju version
2.8.6-focal-amd64
$ juju show-model ssl-queens |grep life -A 12
life: dying
status:
current: destroying
message: 'attempt 23 to destroy model failed (will retry): model not empty, found
1 machine, 1 volume (model not empty)'
since: "2020-11-26"
users:
admin:
display-name: admin
access: admin
last-connection: 2 minutes ago
sla: unsupported
agent-version: 2.8.5
Here are logs from controllers
2020-11-27 08:13:28 WARNING juju.state cleanup.go:212 cleanup failed in model e9932e84-9288-423f-8223-54582e823299 for machine("8"): machine 8 has attachments [volume-0]
2020-11-27 08:13:28 WARNING juju.state cleanup.go:212 cleanup failed in model e9932e84-9288-423f-8223-54582e823299 for machine("8"): machine 8 has attachments [volume-0]
2020-11-27 08:13:28 WARNING juju.state cleanup.go:212 cleanup failed in model e9932e84-9288-423f-8223-54582e823299 for forceStorage("e9932e84-9288-423f-8223-54582e823299"): removing volume 0: volume is not dead
Here are dirty records from monodb although I have deleted instances and volumes
$ juju destroy-model ssl-queens --destroy-storage --force --no-wait -y
Destroying model
Waiting for model to be removed.................................................
................................................................................
................................................................................
................................................................................
................................................................................
................................................................................
I hit the same error in juju 2.8, actually I have deleted 1 machine and 1 volume, but it still says there is when running 'juju destroy-model' with --force option
$ juju destroy-model ssl-queens --force -y s)..... ...^Cctrl+ c detected, aborting...
Destroying model
Waiting for model to be removed, 1 machine(s), 1 volume(
$ juju destroy-model ssl-queens --force --no-wait --destroy-storage -y s)..... .^Cctrl+ c detected, aborting...
Destroying model
Waiting for model to be removed, 1 machine(s), 1 volume(
$ juju version
2.8.6-focal-amd64
$ juju show-model ssl-queens |grep life -A 12 connection: 2 minutes ago
life: dying
status:
current: destroying
message: 'attempt 23 to destroy model failed (will retry): model not empty, found
1 machine, 1 volume (model not empty)'
since: "2020-11-26"
users:
admin:
display-name: admin
access: admin
last-
sla: unsupported
agent-version: 2.8.5
Here are logs from controllers
2020-11-27 08:13:28 WARNING juju.state cleanup.go:212 cleanup failed in model e9932e84- 9288-423f- 8223-54582e8232 99 for machine("8"): machine 8 has attachments [volume-0] 9288-423f- 8223-54582e8232 99 for machine("8"): machine 8 has attachments [volume-0] 9288-423f- 8223-54582e8232 99 for forceStorage( "e9932e84- 9288-423f- 8223-54582e8232 99"): removing volume 0: volume is not dead
2020-11-27 08:13:28 WARNING juju.state cleanup.go:212 cleanup failed in model e9932e84-
2020-11-27 08:13:28 WARNING juju.state cleanup.go:212 cleanup failed in model e9932e84-
Here are dirty records from monodb although I have deleted instances and volumes
juju:PRIMARY> db.machines. find({" model-uuid" :"e9932e84- 9288-423f- 8223-54582e8232 99"},{" volumes" : 0}) 9288-423f- 8223-54582e8232 99:8", "machineid" : "8", "model-uuid" : "e9932e84- 9288-423f- 8223-54582e8232 99", "nonce" : "machine- 0:19a52aeb- 733e-4380- 8fa8-4afabfef09 03", "series" : "xenial", "containertype" : "", "principals" : [ ], "life" : 1, "jobs" : [ 1 ], "passwordhash" : "YMpZm4yG+ 8+IrIOU1PE6hTrI ", "clean" : false, "force-destroyed" : true, "addresses" : [ { "value" : "10.5.2.155", "addresstype" : "ipv4", "networkscope" : "local-cloud", "origin" : "provider", "spaceid" : "0" } ], "machineaddresses" : [ { "value" : "10.5.2.155", "addresstype" : "ipv4", "networkscope" : "local-cloud", "origin" : "machine" }, { "value" : "252.2.155.1", "addresstype" : "ipv4", "networkscope" : "local-fan", "origin" : "machine" }, { "value" : "127.0.0.1", "addresstype" : "ipv4", "networkscope" : "local-machine", "origin" : "machine" }, { "value" : "::1", "addresstype" : "ipv6", "networkscope" : "local-machine", "origin" : "machine" } ], "preferredpubli caddress" : { "value" : "10.5.2.155", "addresstype" : "ipv4", "networkscope" : "local-cloud", "origin" : "provider", "spaceid" : "0" }, "preferredpriva teaddress" : { "value" : "10.5.2.155", "addresstype" : "ipv4", "networkscope" : "local-cloud", "origin" : "provider", "spaceid" : "0" }, "supportedconta inersknown" : true, "txn-revno" : NumberLong(20), "txn-queue" : [ "5fc0a458b3abc8 364068ed7c_ 6b015ea3" , "5fc0a731b3abc8 364069d2cc_ b550ab65" , "5fc0a7fab3abc8 36406a1689_ d3b48390" , "5fc0b3b6b3abc8 36406d8755_ fdf3c5db" , "5fc0b3e0b3abc8 36406d955b_ 50106b40" , "5fc0b514b3abc8 02bdc19bc3_ 253249d2" ], "tools" : { "version" : "2.8.5- xenial- amd64", "url" : "", "size" : NumberLong(0), "sha256" : "" }, "supportedconta iners" : [ "lxd", "kvm" ], "agent-started-at" : ISODate( "2020-11- 23T03:20: 06.172Z" ) }
{ "_id" : "e9932e84-
juju:PRIMARY> db.volumes. find({" model-uuid" :"e9932e84- 9288-423f- 8223-54582e8232 99"}).pretty( ) 9288-423f- 8223-54582e8232 99:0",
"model- uuid" : "e9932e84- 9288-423f- 8223-54582e8232 99",
"attachmentcou nt" : 1,
"5fc0cde4b3ab c802bdc87f02_ 9cf91910"
"size" : NumberLong(51200),
"pool" : "cinder",
"volumeid" : "4a26e0ec- 301c-4bff- 95eb-bfde1245f6 f5",
"persistent" : true
{
"_id" : "e9932e84-
"name" : "0",
"life" : 1,
"txn-revno" : NumberLong(793260),
"txn-queue" : [
],
"info" : {
}
}
I deleted them from mongdb again
juju:PRIMARY> db.machines. remove( {"model- uuid":" e9932e84- 9288-423f- 8223-54582e8232 99"}) find({" model-uuid" :"e9932e84- 9288-423f- 8223-54582e8232 99"},{" volumes" : 0}) remove( {"model- uuid":" e9932e84- 9288-423f- 8223-54582e8232 99"})
WriteResult({ "nRemoved" : 1 })
juju:PRIMARY> db.machines.
juju:PRIMARY> db.volumes.
WriteResult({ "nRemoved" : 1 })
But I still can't remove model with --force flag
$ juju destroy-model ssl-queens --destroy-storage --force --no-wait -y ....... ....... ....... ....... ....... ....... ...... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ... ....... ....... ....... ....... ....... ....... ....... ....... ....... ....... ...
Destroying model
Waiting for model to be removed.
.......
.......
.......
.......
.......