destroying Azure environment took down other environment
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
High
|
Ian Booth | ||
1.21 |
Fix Released
|
High
|
Ian Booth |
Bug Description
Two environments were active in Azure using the same credentials but different storage-
Similar to the report in bug 1335885 I got a warning that the security group could not be deleted as it referenced the storage account associated with the azure-ci-1 environment.
The two environments had six and five machines respectively. After the destroy-environment was run all 11 cloud services and virtual machines were gone. The environments/
The full JUJU_HOME environment as it existed *before* the destroy-environment was executed can be found at chinstrap:
One thing to note is the first environment used the default True value for availability-
I have tried unsuccessfully to reproduce the issue using minimal environments. One attempt involved bootstrapping two Azure environments with no other machines and tearing down the first. Another involved using juju-quickstart to bring up two environments, each with a second machine deploying the juju-gui. A final attempt repeated the last but had availability-
% juju --version
1.20.12-
WORK AROUND:
Avoid dash-numbers in envs names because they can appear to be machines and groups in another env. azure-ci-a or azure-ci-01 are safe.
description: | updated |
description: | updated |
Changed in juju-core: | |
assignee: | nobody → Ian Booth (wallyworld) |
Changed in juju-core: | |
status: | Triaged → In Progress |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
I suspect the envs names are the issue here. There were problems in openstack in the past were machines from another env were taken down because one name is a subset of the other. Juju appends "-1", "-2" to the machines and groups is creates, and the other env has "-1"; it looks like a subset.
In my own experience, I avoid -number. I use letters or some other characters to separate like a 0, -01.