Open
Description
Right now in Overlord.Loop()
, the error
return of the state engine's Ensure()
function are ignored:
pebble/internals/overlord/overlord.go
Lines 352 to 354 in 35e2b7c
Meanwhile, snapd handles errors - at least in the pressed case - in Ensure()
:
This has been implemented in snapd for preseeding: canonical/snapd#8190
As other components of Pebble might have the same issue (retrying Ensure()
forever not resulting in a change), and implementers of managers might believe that an error
returned from Ensure()
will be handled by the caller, it might make sense to at least allow an optional error handler to handle Ensure()
errors in the overlord loop.
Found with @flotter during code review.
Activity