jujud won't start if apt-get of juju-mongodb package fails
Bug #1441904 reported by
James Troup
on 2015-04-08
This bug affects 1 person
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | juju-core |
High
|
Menno Finlay-Smits | ||
| | 1.23 |
High
|
Menno Finlay-Smits | ||
| | 1.24 |
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'
James Troup (elmo)
on 2015-04-08
| 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 |
Curtis Hovey (sinzui)
on 2015-04-09
| tags: | added: canonical-is upgrade-juju |
| Changed in juju-core: | |
| status: | New → Triaged |
| importance: | Undecided → High |
| milestone: | none → 1.23-beta4 |
Curtis Hovey (sinzui)
on 2015-04-10
| Changed in juju-core: | |
| milestone: | 1.23-beta4 → 1.23.0 |
Menno Finlay-Smits (menno.smits)
on 2015-04-13
| Changed in juju-core: | |
| assignee: | nobody → Menno Smits (menno.smits) |
| status: | Triaged → In Progress |
| Menno Finlay-Smits (menno.smits) wrote : Re: juju upgrade-juju goes into an infinite loop if apt-get fails for any reason | #1 |
| summary: |
- juju upgrade-juju goes into an infinite loop if apt-get fails for any - reason + juju won't start if apt-get of juju-mongodb package fails |
| summary: |
- juju won't start if apt-get of juju-mongodb package fails + jujud won't start if apt-get of juju-mongodb package fails |
Ian Booth (wallyworld)
on 2015-04-14
| Changed in juju-core: | |
| milestone: | 1.23.0 → 1.24-alpha1 |
Menno Finlay-Smits (menno.smits)
on 2015-04-30
| Changed in juju-core: | |
| milestone: | 1.24-alpha1 → 1.25.0 |
Menno Finlay-Smits (menno.smits)
on 2015-05-01
| no longer affects: | juju-core/1.22 |
| Menno Finlay-Smits (menno.smits) wrote : | #2 |
Fix for 1.23 here: https:/
| Menno Finlay-Smits (menno.smits) wrote : | #3 |
Fix for 1.24 here: https:/
| Menno Finlay-Smits (menno.smits) wrote : | #4 |
Fix for master here: https:/
Menno Finlay-Smits (menno.smits)
on 2015-05-06
| Changed in juju-core: | |
| status: | In Progress → Fix Committed |
Curtis Hovey (sinzui)
on 2015-05-06
| 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.