Failed bootstrap does not clean up failed environment w/o --force and error message is unhelpful

Bug #1506225 reported by Alexis Bruemmer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
juju-core
Invalid
High
Unassigned
1.25
Won't Fix
Undecided
Unassigned

Bug Description

When a bootstrap fails juju thinks the environment exists even though the bootstrapped failed. When bootstrap fails juju should clean up the environment.

Curtis Hovey (sinzui)
tags: added: bootstrap destroy-environment
Revision history for this message
Curtis Hovey (sinzui) wrote :

This is probably a duplicate of bug 1257758 or bug 1212177. In general, Juju is leaving jenv files on the local disk or something in provider storage/bucket/container.

Revision history for this message
Martin Packman (gz) wrote :

A paste of where the bootstrap failed and what the next bootstrap attempted claimed was the problem would help classify this bug.

Changed in juju-core:
status: New → Incomplete
summary: - Failed bootstrap does not clean up failed environment
+ Failed bootstrap does not clean up failed environment w/o --force and
+ error message is unhelpful
Revision history for this message
Alexis Bruemmer (alexis-bruemmer) wrote :

Further investigation this was really two problems, I will break the problem into two bugs. For the first bug here are the recreate steps:

1) juju switch local
2) juju bootstrap
3) wait until "Bootstrapping Juju machine agent" kill the bootstrap with ctrl-c

The bootstrap fails:

ERROR failed to bootstrap environment: exit status 1

4) attempt to bootstrap again:
~/gowork$ juju bootstrap
WARNING ignoring environments.yaml: using bootstrap config in file "/home/alexisb/.juju/environments/local.jenv"
WARNING This juju environment is already bootstrapped. If you want to start a new Juju
environment, first run juju destroy-environment to clean up, or switch to an
alternative environment.
ERROR environment is already bootstrapped

5) run "juju destroy-environment local" as suggested; after nearly a 5 minute delay get:
ERROR cannot connect to API: unable to connect to "wss://10.0.3.1:17070/environment/8e86ec81-2f62-42f2-8247-a82a4881724f/api"

This is an unhelpful error given what the user needs to run juju destroy-environment with the --force option.

Changed in juju-core:
assignee: nobody → Alexis Bruemmer (alexis-bruemmer)
status: Incomplete → In Progress
Revision history for this message
Alexis Bruemmer (alexis-bruemmer) wrote :
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 1.26-alpha1 → 1.26-alpha2
Changed in juju-core:
milestone: 1.26-alpha2 → 1.26-beta1
Changed in juju-core:
milestone: 1.26-beta1 → 2.0-alpha2
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-alpha2 → 2.0-beta1
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta1 → 2.0-beta2
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta2 → 2.0-beta3
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta3 → 2.0-beta4
Curtis Hovey (sinzui)
tags: added: jujuqa
Changed in juju-core:
milestone: 2.0-beta4 → 2.0-rc1
Ian Booth (wallyworld)
Changed in juju-core:
status: In Progress → Triaged
assignee: Alexis Bruemmer (alexis-bruemmer) → nobody
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta5 → 2.0-rc1
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta6 → 2.0-beta7
Curtis Hovey (sinzui)
Changed in juju-core:
milestone: 2.0-beta7 → 2.0-beta8
Changed in juju-core:
milestone: 2.0-beta8 → 2.0-rc1
Revision history for this message
Anastasia (anastasia-macmood) wrote :

Marking as
'Invalid' for Juju 2.0 since this area changed dramatically (for e.g. no more .jenv files)
and
'Won't Fix' for 1.25 is it is in support mode and we accept 'Critical' bugs only.

Changed in juju-core:
status: Triaged → Invalid
milestone: 2.0-rc1 → none
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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