Skip to content

Commit

Permalink
Handle ENODEV when accessing the freezer.state file
Browse files Browse the repository at this point in the history
...when checking if a container is paused

Signed-off-by: Julia Nedialkova <julianedialkova@hotmail.com>
  • Loading branch information
yulianedyalkova committed Sep 27, 2019
1 parent 84373aa commit e63b797
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libcontainer/container_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit e63b797

Please sign in to comment.