mirror of https://github.com/containers/podman.git
Make errors during refresh nonfatal
During refresh, we cannot hard-fail, as that would mean leaving a partially-configured state behind, leaving libpod unable to start without manual intervention. Instead, log errors refreshing individual containers and pods and continue. Individual containers and pods may be unusable and need to be removed manually, but libpod itself will continue to function. Signed-off-by: Matthew Heon <matthew.heon@gmail.com> Closes: #1252 Approved by: rhatdan
This commit is contained in:
parent
71c28c7cda
commit
7366697175
|
|
@ -628,16 +628,14 @@ func (r *Runtime) refresh(alivePath string) error {
|
|||
for _, ctr := range ctrs {
|
||||
ctr.lock.Lock()
|
||||
if err := ctr.refresh(); err != nil {
|
||||
ctr.lock.Unlock()
|
||||
return err
|
||||
logrus.Errorf("Error refreshing container %s: %v", ctr.ID(), err)
|
||||
}
|
||||
ctr.lock.Unlock()
|
||||
}
|
||||
for _, pod := range pods {
|
||||
pod.lock.Lock()
|
||||
if err := pod.refresh(); err != nil {
|
||||
pod.lock.Unlock()
|
||||
return err
|
||||
logrus.Errorf("Error refreshing pod %s: %v", pod.ID(), err)
|
||||
}
|
||||
pod.lock.Unlock()
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue