Handle ENODEV when accessing the freezer.state file

...when checking if a container is paused

Signed-off-by: Julia Nedialkova <julianedialkova@hotmail.com>
This commit is contained in:
Julia Nedialkova 2019-09-27 17:02:56 +03:00
parent 84373aaa56
commit e63b797f38
1 changed files with 1 additions and 1 deletions

View File

@ -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")