Upgrading a juju 2.1.x controller to 2.2.1 blocked several times with errors like the following:
2017-06-26 05:13:23 ERROR juju.worker.upgradesteps worker.go:375 upgrade from 2.1.3 to 2.2.1 for "machine-0" failed (will retry): Create common resource deployment: listing virtual machines: compute.VirtualMachinesClient#List: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="ResourceGroupNotFound" Message="Resource group 'juju-mymodel-model-UUID' could not be found."
The only solution found was to remove these models manually from the controller using the following script: http://pastebin.ubuntu.com/24954497/
This script was invoked as "id=YOUR_UUID_HERE ./script" for each azure resource group which could not be found.
Is it possible that all these errors are because users have manually removed the model's resources rather than removing the model within juju itself?