[azure provider] Juju purges resource group VMs and other resources that do not belong to it
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| juju |
Critical
|
Ian Booth | ||
| 2.9 |
Critical
|
Ian Booth |
Bug Description
Hi,
[Problem]
When bootstrapping juju on azure if the bootstrap fails, juju will kill all resources inside that Resource Group (But keep the Resource Group)
[Reproducer]
1. Create a resource group (Outside of juju)
2. Configure the Azure Resource group via Policies to disable public IPs (This should cause juju to fail bootstrap)
3. Create a VM in that resource group as a jumphost
4. Follow juju docs to connect azure, preferably with an Azure Service Principal that has permissions to operate on the Resource Group
5. Bootstrap: juju bootstrap --debug --config use-public-ip=true --config resource-
The important part here is for juju to fail bootstrapping then begin cleanup.
[Workarounds]
None at time of writing
Peter De Sousa (pjds) wrote : | #1 |
Peter De Sousa (pjds) wrote : | #2 |
Screenshot of Activity Log in azure showing VMs being deleted
Changed in juju: | |
assignee: | nobody → Ian Booth (wallyworld) |
importance: | Undecided → Critical |
milestone: | none → 2.9-rc3 |
status: | New → Triaged |
Pedro Guimarães (pguimaraes) wrote : | #3 |
I believe this line is the root-cause of this issue: https:/
Ian Booth (wallyworld) wrote : | #4 |
purge was originally done because of a misplaced understanding that a BYO RG would be created empty specifically for that juju model; it is non-trivial for juju to figure out the dependencies so as to know what order to delete things in, but that's something that will need to be done.
Changed in juju: | |
milestone: | 2.9-rc3 → 2.8.7 |
status: | Triaged → In Progress |
Ian Booth (wallyworld) wrote : | #5 |
This is for 2.8
https:/
Changed in juju: | |
status: | In Progress → Fix Committed |
Changed in juju: | |
status: | Fix Committed → Fix Released |
Attached is the JSON dump from Azure showing the actions triggered by the Service Principal operated by juju.