Cannot destroy lxc env on trusty with juju-core 1.17.4-0ubuntu2
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
Critical
|
Andrew Wilkins |
Bug Description
Destroying an lxc env no longer works for me on trusty with juju-core 1.17.4-0ubuntu2 (I'm not sure if it has ever worked on Trusty tbh):
$ juju destroy-environment local
WARNING! this command will destroy the "local" environment (type: local)
This includes all machines, services, data and other resources.
Continue [y/N]? y
sudo: Sorry, you are not allowed to set the following environment variables: JUJU_HOME
ERROR failed to destroy environment "local"
If the environment is unusable, then you may run
juju destroy-environment --force
to forcefully destroy the environment. Upon doing so, review
your environment provider console for any resources that need
to be cleaned up.
ERROR exit status 1
$ juju destroy-environment --force local
WARNING! this command will destroy the "local" environment (type: local)
This includes all machines, services, data and other resources.
Continue [y/N]? y
sudo: Sorry, you are not allowed to set the following environment variables: JUJU_HOME
ERROR exit status 1
Related branches
- Juju Engineering: Pending requested
-
Diff: 24 lines (+2/-1)2 files modifiedprovider/local/environ.go (+1/-1)
provider/local/environ_test.go (+1/-0)
Changed in juju-core: | |
milestone: | none → 1.17.7 |
Changed in juju-core: | |
assignee: | nobody → Andrew Wilkins (axwalk) |
Changed in juju-core: | |
status: | Incomplete → In Progress |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
I can workaround this using hazmats suggestion of editing /etc/sudoers:
=== modified file 'sudoers' path="/ usr/local/ sbin:/usr/ local/bin: /usr/sbin: /usr/bin: /sbin:/ bin"
--- sudoers 2014-03-24 14:15:28 +0000
+++ sudoers 2014-03-24 14:15:53 +0000
@@ -8,6 +8,7 @@
#
Defaults editor=/usr/bin/vi
Defaults env_reset
+Defaults env_keep += "JUJU_HOME"
Defaults secure_
# Host alias specification