jujud won't start if apt-get of juju-mongodb package fails

Bug #1441904 reported by James Troup
8
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://paste.ubuntu.com/10777463/

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)
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)
tags: added: canonical-is upgrade-juju
Changed in juju-core:
status: New → Triaged
importance: Undecided → High
milestone: none → 1.23-beta4
Curtis Hovey (sinzui)
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
Revision history for this message
Menno Finlay-Smits (menno.smits) wrote : Re: juju upgrade-juju goes into an infinite loop if apt-get fails for any reason

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.

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)
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
Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :
Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :
Revision history for this message
Menno Finlay-Smits (menno.smits) wrote :
Changed in juju-core:
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.