juju destroy-environment destroys other environments
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
High
|
John A Meinel | ||
1.16 |
Fix Released
|
High
|
John A Meinel | ||
juju-core (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Saucy |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[Impact]
Users inadvertently destroy all environments that they own, not just the target one.
[Test Case]
juju bootstrap env1
juju bootstrap env2
juju destroy-
# both environments destroyed
[Regression Potential
Minimal, the fix tightens up the pattern match used to determine which machines to destroy.
[Original Bug Report]
I destroyed my "juju-ci" environment, and my "juju-ci-2" environment was also deleted. The environments had unique control-buckets.
$ juju destroy-environment -e juju-ci
WARNING: this command will destroy the "juju-ci" environment (type: openstack)
This includes all machines, services, data and other resources.
Continue [y/N]? y
$ juju status
ERROR Unable to connect to environment "juju-ci-2".
Please check your credentials or use 'juju bootstrap' to create a new environment.
Error details:
no instances found
Related branches
- Juju Engineering: Pending requested
-
Diff: 69 lines (+43/-1)3 files modifiedprovider/openstack/export_test.go (+4/-0)
provider/openstack/local_test.go (+38/-0)
provider/openstack/provider.go (+1/-1)
- Juju Engineering: Pending requested
-
Diff: 69 lines (+43/-1)3 files modifiedprovider/openstack/export_test.go (+4/-0)
provider/openstack/local_test.go (+38/-0)
provider/openstack/provider.go (+1/-1)
Changed in juju-core: | |
milestone: | none → 1.17.0 |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
Changed in juju-core (Ubuntu): | |
status: | New → Fix Released |
description: | updated |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 2013-12-04 1:17, Aaron Bentley wrote:
> Public bug reported:
>
> I destroyed my "juju-ci" environment, and my "juju-ci-2"
> environment was also deleted. The environments had unique
> control-buckets.
>
> $ juju destroy-environment -e juju-ci WARNING: this command will
> destroy the "juju-ci" environment (type: openstack) This includes
> all machines, services, data and other resources.
>
> Continue [y/N]? y $ juju status ERROR Unable to connect to
> environment "juju-ci-2". Please check your credentials or use 'juju
> bootstrap' to create a new environment.
>
> Error details: no instances found
I'm pretty sure we do a prefix match, and "juju-ci-machine-0" and 2-machine- 0" both match "juju-ci-". Probably we could force
"juju-ci-
the next bits and you'd only hit it if you did "juju-ci-machine" as
the other environment name.
I'm not 100% sure on that.
John
=:->
-----BEGIN PGP SIGNATURE----- www.enigmail. net/
fIUEACgkQJdeBCY SNAAO/RACgpAQIB 0XOytaMr7FPm/ ep16bP d/i4e32qQjBx6xi Hr
Version: GnuPG v1.4.13 (Cygwin)
Comment: Using GnuPG with Thunderbird - http://
iEYEARECAAYFAlK
YR8AoJHoiBTkXB0
=/ElA
-----END PGP SIGNATURE-----