jujud won't start if apt-get of juju-mongodb package fails
Bug #1441904 reported by
James Troup
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
juju-core |
Fix Released
|
High
|
Menno Finlay-Smits | ||
1.23 |
Fix Released
|
High
|
Menno Finlay-Smits | ||
1.24 |
Fix Released
|
High
|
Menno Finlay-Smits |
Bug Description
If apt-get fails for any reason, jujud on machine 0 will go into an
infinite retry loop and never recover or even abort, e.g.:
http://
To reproduce:
* Bootstrap an older (e.g. 1.18) environment
* 'juju ssh 0' and ensure apt-get will fail; e.g. make it a symlink to /bin/false
* 'juju upgrade-juju'
summary: |
- juju upgrade goes into an infinite loop if apt-get fails for any reason + juju upgrade-juju goes into an infinite loop if apt-get fails for any + reason |
description: | updated |
tags: | added: canonical-is upgrade-juju |
Changed in juju-core: | |
status: | New → Triaged |
importance: | Undecided → High |
milestone: | none → 1.23-beta4 |
Changed in juju-core: | |
milestone: | 1.23-beta4 → 1.23.0 |
Changed in juju-core: | |
assignee: | nobody → Menno Smits (menno.smits) |
status: | Triaged → In Progress |
Changed in juju-core: | |
milestone: | 1.23.0 → 1.24-alpha1 |
Changed in juju-core: | |
milestone: | 1.24-alpha1 → 1.25.0 |
no longer affects: | juju-core/1.22 |
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.
This problem isn't upgrade specific. Juju runs "apt-get install juju-mongodb" every time it starts as part of ensuring that mongodb is ready to start. Another way to trigger it is:
juju bootstrap # with say 1.23
juju ssh 0
make apt-get point to /bin/false
sudo restart jujud-machine-0
The problem also isn't new. juju has had this functionality since 1.19. I can trigger the problem with any version since then.
One possible way to deal with this is to make juju retry the apt-get command a number of times (already in place) and if that fails continue on anyway, the logic being that in most cases a valid juju-mongodb will already be in place even if the apt-get command fails. We shouldn't let the apt-get failure prevent juju from at least trying to start up.
I'm not sure there's much more we can do beyond that given that mongodb is required in order for the machine agent to do anything.
I'll track down people at the sprint today to discuss further.
Updating the bug title to reflect what I've found.