summaryrefslogtreecommitdiff
path: root/libpod/boltdb_state.go
diff options
context:
space:
mode:
authorDaniel J Walsh <dwalsh@redhat.com>2018-06-19 07:50:30 -0400
committerAtomic Bot <atomic-devel@projectatomic.io>2018-06-29 14:32:57 +0000
commit3a90b5224df686e6efbf78e6b6cbb5333115ea82 (patch)
treee3413c7892446f8c17d6d2a2abd0ce9cba37a902 /libpod/boltdb_state.go
parent810f2b6061c710a15aaee46c758e71ea9a2920fa (diff)
downloadpodman-3a90b5224df686e6efbf78e6b6cbb5333115ea82.tar.gz
podman-3a90b5224df686e6efbf78e6b6cbb5333115ea82.tar.bz2
podman-3a90b5224df686e6efbf78e6b6cbb5333115ea82.zip
Returning joining namespace error should not be fatal
I got my database state in a bad way by killing a hanging container. It did not setup the network namespace correctly listing/remove bad containers becomes impossible. podman run alpine/nginx ^c got me in this state. I got into a state in the database where podman ps -a was returning errors and I could not get out of it, Makeing joining the network namespace a non fatal error fixes the issue. Signed-off-by: Daniel J Walsh <dwalsh@redhat.com> Closes: #918 Approved by: mheon
Diffstat (limited to 'libpod/boltdb_state.go')
-rw-r--r--libpod/boltdb_state.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/libpod/boltdb_state.go b/libpod/boltdb_state.go
index 3ee24122a..d7c950fa0 100644
--- a/libpod/boltdb_state.go
+++ b/libpod/boltdb_state.go
@@ -455,10 +455,12 @@ func (s *BoltState) UpdateContainer(ctr *Container) error {
// Open the new network namespace
ns, err := joinNetNS(netNSPath)
- if err != nil {
- return errors.Wrapf(err, "error joining network namespace for container %s", ctr.ID())
+ if err == nil {
+ newState.NetNS = ns
+ } else {
+ logrus.Errorf("error joining network namespace for container %s", ctr.ID())
+ ctr.valid = false
}
- newState.NetNS = ns
}
} else {
// The container no longer has a network namespace