Cannot bootstrap or destroy local env after cancelling bootstrap
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
High
|
Andrew Wilkins |
Bug Description
Cancelling local bootstrap (ie. by not authenticating for sudo) leaves an inconsistent state, so that you can't subsequently bootstrap or destroy-environment without manually deleting files.
This looks related but different to bug 1272590
{{{
# Run bootstrap, but then prompted for password because my sudoers only
# allows this user to run juju from various locations. Cancelled to find
# out exactly what juju wants to run:
$ juju bootstrap
[sudo] password for michael:
Sorry, user michael is not allowed to execute '/bin/bash -s' as root on dev.lcy02.
$ juju bootstrap
ERROR Get http://
# Can't destroy environment...
$ juju destroy-environment local -y
ERROR Get http://
$ juju destroy-environment local -y --force
ERROR exit status 1
ERROR exit status 1
$ juju bootstrap
ERROR Get http://
$ which juju
/home/michael/
$ bzr revno /home/michael/
2262
# Update sudoers, new shell, remove the local state and everything is fine:
$ rm -rf $HOME/.juju/local && rm $HOME/.
$ juju bootstrap
Logging to /home/michael/
Fetching tools: wget --no-verbose -O $bin/tools.tar.gz 'http://
Starting MongoDB server (juju-db-
Bootstrapping Juju machine agent
Starting Juju machine agent (juju-agent-
$ juju status
environment: local
machines:
"0":
agent-state: started
agent-version: 1.17.1.1
dns-name: localhost
instance-id: localhost
series: saucy
services: {}
}}}
Related branches
- Juju Engineering: Pending requested
-
Diff: 228 lines (+110/-33)2 files modifiedprovider/local/environ.go (+46/-19)
provider/local/environ_test.go (+64/-14)
description: | updated |
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → High |
tags: | added: destroy-environment local-provider lxc |
tags: | added: regression |
Changed in juju-core: | |
milestone: | none → 1.18.0 |
Changed in juju-core: | |
status: | Triaged → In Progress |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
milestone: | 1.18.0 → 1.17.5 |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
We still need to investigate this, but bootstrap now deletes the .jenv if the bootstrap did fail to complete. /bugs.launchpad .net/juju- core/+bug/ 1247152 was part of that
https:/