From e63b797f3827676303c639837957a06c1bbbbac8 Mon Sep 17 00:00:00 2001 From: Julia Nedialkova Date: Fri, 27 Sep 2019 17:02:56 +0300 Subject: [PATCH] Handle ENODEV when accessing the freezer.state file ...when checking if a container is paused Signed-off-by: Julia Nedialkova --- libcontainer/container_linux.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcontainer/container_linux.go b/libcontainer/container_linux.go index 6ff4d96a5f5..7a3b82aea65 100644 --- a/libcontainer/container_linux.go +++ b/libcontainer/container_linux.go @@ -1824,7 +1824,7 @@ func (c *linuxContainer) isPaused() (bool, error) { data, err := ioutil.ReadFile(filepath.Join(fcg, filename)) if err != nil { // If freezer cgroup is not mounted, the container would just be not paused. - if os.IsNotExist(err) { + if os.IsNotExist(err) || err == syscall.ENODEV { return false, nil } return false, newSystemErrorWithCause(err, "checking if container is paused")