mirror of
https://github.com/containers/podman.git
synced 2025-06-24 11:28:24 +08:00
auto update: return restart error
Return the error when restarting the unit failed during an update. The task is correctly marked to have failed but we really need to return the error to the user. [NO NEW TESTS NEEDED] - The flakes in #17607 will reveal errors. Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
This commit is contained in:
@ -203,6 +203,9 @@ func (u *updater) updateUnit(ctx context.Context, unit string, tasks []*task) []
|
||||
|
||||
// Jump to the next unit on successful update or if rollbacks are disabled.
|
||||
if updateError == nil || !u.options.Rollback {
|
||||
if updateError != nil {
|
||||
errors = append(errors, fmt.Errorf("restarting unit %s during update: %w", unit, updateError))
|
||||
}
|
||||
return errors
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user