Failed bootstrap can prevent future bootstraps

Bug #1247152 reported by Aaron Bentley
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
juju-core
Fix Released
Low
Andrew Wilkins

Bug Description

$ juju bootstrap --constraints mem=2G
ERROR cannot ensure CA certificate: environment configuration with a certificate but no CA private key
# Fix environment
$ juju bootstrap --constraints mem=2G
ERROR environment has no bootstrap configuration data

Basically, juju wrote an empty .jenv file that must be manually deleted before bootstrap can succeed. Another way to cause this is to use sudo su $otheruser, which will cause a chown to fail (Bug #1245647) and leave an empty .jenv behind.

Either way, bootstrap failures should not impair future bootstraps. Either an empty jenv file should not be left behind, or empty jenv files should be tolerated.

Tags: jenv

Related branches

Aaron Bentley (abentley)
Changed in juju-core:
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Andrew Wilkins (axwalk) wrote :

I'm updating bootstrap to attempt to destroy the environment if bootstrap fails & the .jenv file didn't already exist (e.g. by using sync-tools). If that fails, then a warning will be displayed telling the user to run "juju destroy-environment --config-only". That's a new flag that tells juju to just delete the .jenv file.

Changed in juju-core:
status: Triaged → In Progress
assignee: nobody → Andrew Wilkins (axwalk)
milestone: none → 1.18.0
Ian Booth (wallyworld)
tags: added: jenv
Andrew Wilkins (axwalk)
Changed in juju-core:
milestone: 1.18.0 → 1.17.3
status: In Progress → Fix Committed
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.

Other bug subscribers

Remote bug watches

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