From 7366697175f64b734c9a6a652c3af511772b44d6 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Fri, 10 Aug 2018 10:35:25 -0400 Subject: 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 Closes: #1252 Approved by: rhatdan --- libpod/runtime.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/libpod/runtime.go b/libpod/runtime.go index 1a384fde2..3f5d56c4f 100644 --- a/libpod/runtime.go +++ b/libpod/runtime.go @@ -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() } -- cgit v1.2.3-54-g00ecf