Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't try to read freezer.state from the current directory #1387

Merged
merged 1 commit into from
Apr 25, 2017

Conversation

avagin
Copy link
Contributor

@avagin avagin commented Mar 22, 2017

If we try to pause a container on the system without freezer cgroups,
we can found that runc tries to open ./freezer.state. It is obviously wrong.

$ ./runc pause test
no such directory for freezer.state

$ echo FROZEN > freezer.state
$ ./runc pause test
container not running or created: paused

Signed-off-by: Andrei Vagin avagin@virtuozzo.com

If we try to pause a container on the system without freezer cgroups,
we can found that runc tries to open ./freezer.state. It is obviously wrong.

$ ./runc pause test
no such directory for freezer.state

$ echo FROZEN > freezer.state
$ ./runc pause test
container not running or created: paused

Signed-off-by: Andrei Vagin <avagin@virtuozzo.com>
@rh-atomic-bot
Copy link

258/265 passed on RHEL - Failed.
249/263 passed on CentOS - Failed.
263/264 passed on Fedora - Failed.
Log - https://aos-ci.s3.amazonaws.com/opencontainers/runc/runc-integration-tests-prs/304/fullresults.xml

@dqminh
Copy link
Contributor

dqminh commented Apr 17, 2017

So the end result is the same ( because if freezer cgroup is not mounted, then we go into os.IsNotExist(err) and we return false, nil anyway ? This just saves an open call right ?

@avagin
Copy link
Contributor Author

avagin commented Apr 18, 2017

@dqminh The difference is in a case when a current directory contains a freezer.state file. Without this changes, you can write anything in this file and runc will use it.

@dqminh
Copy link
Contributor

dqminh commented Apr 20, 2017

LGTM

Approved with PullApprove

1 similar comment
@hqhq
Copy link
Contributor

hqhq commented Apr 25, 2017

LGTM

Approved with PullApprove

@hqhq hqhq merged commit 94cfb79 into opencontainers:master Apr 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants