Comment 3 for bug 1885557

Revision history for this message
Ian Booth (wallyworld) wrote :

juju destroy-model needs to be changed so that instead of removing the resource group corresponding to the model, we purge the contents. This removes any machines, networks, etc that had been created in the model but leaves the resource group itself. That works fine. However...

There's an issue with destroy-controller. At destroy time, we have the controller-uuid. What is done now is we find all of the resource groups with that tag and destroy the content of those resource groups, ie clean up all the models of the controller.

But, if an existing resource group is used, there's no Juju tags added and the current mechanism of doing a bulk query for all relevant resource groups to clean up can't work. And there's no easy way around it - we don't have access to the models to know any bespoke resource groups when destroying is done and changing that is impractical, not least because it's provider specific and only relevant to Azure.

So the only current workaround would be to ensure destroy-model is called on any models using existing resource groups before running juju destroy-controller. Or you will need to manually purge those resource groups later.