If a package is unavailable the apt layer retries forever

Bug #1705337 reported by David Lawson on 2017-07-19
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Apt layer
High
Unassigned
Charm Helpers
Undecided
Unassigned

Bug Description

If a package doesn't exist, for example because it's not available on a particular architecture, the apt layer sees the failure as a failure to acquire the dpkg lock and retries forever, leading to a permanently running hook, effectively. It appears to time out after five minutes, but is invoked with update-status which is run once a minute or so it appears, leading to a situation where it falls further and further behind on processing its hooks. I eventually got it to uninstall after a substantial struggle.

https://pastebin.canonical.com/193909/

Can we detect whether a package is unavailable and exit cleanly there?

Related branches

Haw Loeung (hloeung) wrote :

Speaking of invoked during update-status hooks, any chance the apt layer can be updated to do nothing on update-status?

Even without any packages to install, reading the apt cache is quite I/O intensive. We've seen this with non-reactive charms having multiple subordinates firing at the same time.

Stuart Bishop (stub) wrote :

@hloeung Certainly, but that would be a separate bug rather than derailing this one with unrelated discussion :)

Changed in layer-apt:
status: New → Triaged
importance: Undecided → High
Stuart Bishop (stub) wrote :

Some of this behaviour comes from charmhelpers. I think sorting this properly involves pulling some or all of this code into the apt layer where we can control things better

Stuart Bishop (stub) wrote :

I've lowered the max number of retries in charmhelpers, so this should be much less of a problem now (once the next charm-helpers release is made)

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers