diff options
author | Matthew Heon <matthew.heon@gmail.com> | 2018-08-10 10:35:25 -0400 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2018-08-10 17:49:09 +0000 |
commit | 7366697175f64b734c9a6a652c3af511772b44d6 (patch) | |
tree | 709abbb0f3cf717f57634831efa02694fdd1de56 | |
parent | 71c28c7cda91aca11e3767cba4e96adc04a3f3d0 (diff) | |
download | podman-7366697175f64b734c9a6a652c3af511772b44d6.tar.gz podman-7366697175f64b734c9a6a652c3af511772b44d6.tar.bz2 podman-7366697175f64b734c9a6a652c3af511772b44d6.zip |
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
-rw-r--r-- | libpod/runtime.go | 6 |
1 files 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() } |