[azure provider] Juju purges resource group VMs and other resources that do not belong to it

Bug #1904020 reported by Peter Jose De Sousa
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Canonical Juju
Fix Released
Critical
Ian Booth
2.9
Fix Released
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-group-name=JujuControllerRG --config network=SPOKE_NET/JujuControllerVNET /SUBNET --no-default-model azure/westeurope azure-controller

The important part here is for juju to fail bootstrapping then begin cleanup.

[Workarounds]

None at time of writing

Revision history for this message
Peter Jose De Sousa (pjds) wrote :

Attached is the JSON dump from Azure showing the actions triggered by the Service Principal operated by juju.

Revision history for this message
Peter Jose De Sousa (pjds) wrote :

Screenshot of Activity Log in azure showing VMs being deleted

John A Meinel (jameinel)
Changed in juju:
assignee: nobody → Ian Booth (wallyworld)
importance: Undecided → Critical
milestone: none → 2.9-rc3
status: New → Triaged
Revision history for this message
Pedro Guimarães (pguimaraes) wrote :
Revision history for this message
Ian Booth (wallyworld) wrote :

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
Revision history for this message
Ian Booth (wallyworld) wrote :
Ian Booth (wallyworld)
Changed in juju:
status: In Progress → Fix Committed
Changed in juju:
status: Fix Committed → Fix Released
Revision history for this message
John A Meinel (jameinel) wrote :

This was already released in a 2.9rc release

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.