juju bootstrap in an existing environment destroys the environment

Bug #1340893 reported by James Troup
20
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
High
Katherine Cox-Buday
1.20
Fix Released
Critical
Katherine Cox-Buday

Bug Description

Using juju-core 1.18.1-0ubuntu1 from Ubuntu 14.04, I bootstrapped a
juju environment in MAAS (1.5.2+bzr2282-0ubuntu0.2). This completed
successfully and I had a running environment.

I then hit up-arrow too many times by mistake and ran 'juju bootstrap'
again. It failed (as expected) but also destroyed my existing
environment (neither expected nor desired) with no warning or
interaction.

Obviously, this is a catastrophically bad failure mode.

Full log: https://pastebin.canonical.com/113355/

James Troup (elmo)
tags: added: canonical-is
Martin Packman (gz)
Changed in juju-core:
status: New → Triaged
importance: Undecided → Critical
Revision history for this message
James Troup (elmo) wrote :

This bug has been fixed in later versions; I can no longer reproduce it with 1.20.1.

jujumanage@macon:~$ juju bootstrap
WARNING ignoring environments.yaml: using bootstrap config in file "/home/jujumanage/.juju/environments/maas.jenv"
ERROR environment is already bootstrapped
jujumanage@macon:~$ juju stat

However given the potential for data loss, I'd strongly suggest that we either SRU 1.20.1 or just the relevant patch to Ubuntu 14.04.

Ian Booth (wallyworld)
Changed in juju-core:
milestone: none → 1.20.2
Revision history for this message
Martin Packman (gz) wrote :

I can't trivially reproduce this with either the 1.18 or trunk branches. It may be maas-provider or timing specific.

Revision history for this message
Curtis Hovey (sinzui) wrote :

This bug is a duplicate of Jame's first report. Since the conversation is here, I made the older bug the duplicate instead.

tags: added: bootstrap
Changed in juju-core:
assignee: nobody → Katherine Cox-Buday (cox-katherine-e)
Changed in juju-core:
status: Triaged → In Progress
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.20.2 → 1.21-alpha1
Revision history for this message
Katherine Cox-Buday (cox-katherine-e) wrote :

It appears that this may have been a result of errors not propagating correctly when examining an environment's configuration. Due to the nature of the bug, we had difficulty reproducing the exact issue, but feel this should probably address it. Please let us know if this is not the case.

Changed in juju-core:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
Changed in juju-core:
importance: Critical → High
Curtis Hovey (sinzui)
Changed in juju-core:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.