Failed bootstrap can prevent future bootstraps
Bug #1247152 reported by
Aaron Bentley
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.
Related branches
lp:~axwalk/juju-core/juju-failed-bootstrap-destroy-jenv
- Juju Engineering: Pending requested
-
Diff: 213 lines (+69/-15)6 files modifiedcmd/juju/bootstrap.go (+18/-1)
cmd/juju/bootstrap_test.go (+22/-0)
cmd/juju/destroyenvironment_test.go (+4/-2)
cmd/juju/synctools.go (+9/-1)
environs/open.go (+7/-1)
provider/dummy/environs.go (+9/-10)
lp:~axwalk/juju-core/lp1247152-destroy-jenv-failed-prepare
- Juju Engineering: Pending requested
-
Diff: 58 lines (+18/-10)2 files modifiedenvirons/open.go (+13/-9)
environs/open_test.go (+5/-1)
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → Low |
tags: | added: jenv |
Changed in juju-core: | |
milestone: | 1.18.0 → 1.17.3 |
status: | In Progress → Fix Committed |
Changed in juju-core: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
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.