Merge lp:~jameinel/juju-core/openstack-filter-1257481 into lp:juju-core/1.16
Status: | Merged |
---|---|
Approved by: | John A Meinel |
Approved revision: | no longer in the source branch. |
Merged at revision: | 1998 |
Proposed branch: | lp:~jameinel/juju-core/openstack-filter-1257481 |
Merge into: | lp:juju-core/1.16 |
Diff against target: |
69 lines (+43/-1) 3 files modified
provider/openstack/export_test.go (+4/-0) provider/openstack/local_test.go (+38/-0) provider/openstack/provider.go (+1/-1) |
To merge this branch: | bzr merge lp:~jameinel/juju-core/openstack-filter-1257481 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Juju Engineering | Pending | ||
Review via email: mp+198218@code.launchpad.net |
Commit message
provider/
bug #1257481 is because of how we are matching machines, if you have 2
environments with similar names (one is a prefix of the other) then
you can have 'juju destroy-environment short-name' actually kill all
the instances of 'short-
However, we do put a little bit more data into how we name machines,
so we can make it harder to trigger that by accident.
The actual change is small and directly tested against HP and
Canonistack. I don't add a test because the actual test we would need
is to create 2 environments, and assert that AllInstances doesn't see
the instances in a similarly named environment.
I tried 2 regexes 'juju-ENV-
against canonistack, so I went with 'juju-ENV-
should be pretty restrictive. Even if you name one environment 'ENV'
and another environment 'ENV-machine' the \d will prevent them from
matching (because the actual machines will be
juju-ENV-
I think this is as safe as we can be with a name-based approach, even
though we've discussed moving into a 'record the nodes only in state
and only delete ones recorded there', this is a pretty easy workaround
to make things nicer for real people.
Description of the change
This is the same filter fix that was proposed for trunk, but the fix is reasonable to have for 1.16.