You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
Right now in
Overlord.Loop()
, theerror
return of the state engine'sEnsure()
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()
:https://github.com/snapcore/snapd/blob/c59a5f6e87fe59596b14614bc422e0c3a132ca25/overlord/overlord.go#L463-L473
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 anerror
returned fromEnsure()
will be handled by the caller, it might make sense to at least allow an optional error handler to handleEnsure()
errors in the overlord loop.Found with @flotter during code review.
The text was updated successfully, but these errors were encountered: