bootstrap without a jenv destroys an existing environment
Bug #1336843 reported by
Jay R. Wren
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
Medium
|
Katherine Cox-Buday |
Bug Description
Easy to reproduce:
1. create a new environment
2. bootstrap it
3. remove the environments/
4. bootstrap it again
5. instead of getting an "exists" message, you get a destroying message.
Use case for why this is bad:
Team Member A creates an environment for production and shares it with Team Member B (or all team for maintenance), by sharing the environment section of environments.yaml file, and keys and certificate files if needed.
Team Member B adds the environment to .juju/environme
Team Member B runs bootstrap, not realizing it already exists.
The production environment is destroyed.
Example output attached.
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → Medium |
tags: | added: bootstrap |
Changed in juju-core: | |
milestone: | none → 1.21-alpha1 |
assignee: | nobody → Katherine Cox-Buday (cox-katherine-e) |
Changed in juju-core: | |
status: | Triaged → In Progress |
Changed in juju-core: | |
milestone: | 1.21-alpha1 → 1.21-alpha2 |
Changed in juju-core: | |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Using 1.21-alpha2 the environment is no longer destroyed, but a new one is still created and no "environment already exists" message is displayed. See below.
~ % juju version utopic- amd64 1-trusty- amd64) 73-27-206. eu-west- 1.compute. amazonaws. com:22 138-68. eu-west- 1.compute. internal: 22 73-27-206. eu-west- 1.compute. amazonaws. com,54. 73.27.206' (ECDSA) to the list of known hosts. cloud-init- output. log on remote host 73-27-206. eu-west- 1.compute. amazonaws. com server- member- status: has-vote environments/ ec2.jenv 1-trusty- amd64) 170-170- 10.eu-west- 1.compute. amazonaws. com:22 159-254. eu-west- 1.compute. internal: 22 170-170- 10.eu-west- 1.compute. amazonaws. com,54. 170.170. 10' (ECDSA) to the list of known hosts. cloud-init- output. log on remote host
1.21-alpha2-
~ % juju bootstrap -e ec2 --upload-tools
Bootstrapping environment "ec2"
Starting new instance for initial state server
Launching instance
- i-68b9b32a
Building tools to upload (1.21-alpha2.
Installing Juju agent on bootstrap instance
Waiting for address
Attempting to connect to ec2-54-
Attempting to connect to ip-10-89-
Attempting to connect to 54.73.27.206:22
Attempting to connect to 10.89.138.68:22
Warning: Permanently added 'ec2-54-
Logging to /var/log/
Running apt-get update
Running apt-get upgrade
Installing package: curl
Installing package: cpu-checker
Installing package: bridge-utils
Installing package: rsyslog-gnutls
Bootstrapping Juju machine agent
Starting Juju machine agent (jujud-machine-0)
Bootstrap complete
~ % juju status -e ec2
environment: ec2
machines:
"0":
agent-state: started
agent-version: 1.21-alpha2.1
dns-name: ec2-54-
instance-id: i-68b9b32a
instance-state: running
series: trusty
hardware: arch=amd64 cpu-cores=1 cpu-power=100 mem=1740M root-disk=8192M
state-
services: {}
~ % rm ~/.juju/
~ % juju bootstrap -e ec2 --upload-tools
Bootstrapping environment "ec2"
Starting new instance for initial state server
Launching instance
- i-601c3e85
Building tools to upload (1.21-alpha2.
Installing Juju agent on bootstrap instance
Waiting for address
Attempting to connect to ec2-54-
Attempting to connect to ip-10-72-
Attempting to connect to 54.170.170.10:22
Attempting to connect to 10.72.159.254:22
Warning: Permanently added 'ec2-54-
Logging to /var/log/
Running apt-get update
Running apt-get upgrade
Installing package: curl
Installing package: cpu-checker
Installing package: bridge-utils
Installing package: rsyslog-gnutls
Bootstrapping Juju machine agent
Starting Juju machine agent (jujud-machine-0)
Bootstrap complete
WARNING expected one instance, got 2
At this point two EC2 instances are up and running.