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

[docker] Add support for Docker 1.8 #1831

Merged
merged 1 commit into from
Aug 13, 2015
Merged

[docker] Add support for Docker 1.8 #1831

merged 1 commit into from
Aug 13, 2015

Conversation

remh
Copy link
Contributor

@remh remh commented Aug 13, 2015

Docker 1.8 adds cgroup bind mount by default ( See
https://github.com/docker/docker/blob/v1.8.0/CHANGELOG.md#runtime )

Which confuses the docker check when running in a container. This is a
tiny fix to make the docker check prefers mountpoint starting with
“/host”.

Also, use "with" syntax to open files.

self.log.debug("Opening cgroup file: %s" % stat_file)
try:
fp = open(stat_file)
return dict(map(lambda x: x.split(), fp.read().splitlines()))
with open(stat_file, 'r') as fp:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'r' is the default mode in open method. Nitpick, since it's specified here but not on :445.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switched line 445 as well, it's better to be explicit :)

@yannmh
Copy link
Member

yannmh commented Aug 13, 2015

LGTM 🌵

Docker 1.8 adds cgroup bind mount by default ( See
https://github.com/docker/docker/blob/v1.8.0/CHANGELOG.md#runtime )

Which confuses the docker check when running in a container. This is a
tiny fix to make the docker check prefers mountpoint starting with
“/host”.
remh added a commit that referenced this pull request Aug 13, 2015
[docker] Add support for Docker 1.8
@remh remh merged commit 59ac9da into master Aug 13, 2015
@remh remh deleted the remh/docker_1.8 branch September 15, 2015 19:01
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.

2 participants