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

Fix detection of docker cgroup on RHEL #25907

Merged
merged 1 commit into from
May 21, 2016

Conversation

ncdc
Copy link
Member

@ncdc ncdc commented May 19, 2016

Check docker's pid file, then fallback to pidof when trying to determine the pid for docker. The
latest docker RPM for RHEL changes /usr/bin/docker from an executable to a shell script (to support
/usr/bin/docker-current and /usr/bin/docker-latest). The pidof check for docker fails in this case,
so we check /var/run/docker.pid first (the default location), and fallback to pidof if that fails.

@kubernetes/sig-node @kubernetes/rh-cluster-infra

Check docker's pid file, then fallback to pidof when trying to determine the pid for docker. The
latest docker RPM for RHEL changes /usr/bin/docker from an executable to a shell script (to support
/usr/bin/docker-current and /usr/bin/docker-latest). The pidof check for docker fails in this case,
so we check /var/run/docker.pid first (the default location), and fallback to pidof if that fails.
@ncdc ncdc added sig/node Categorizes an issue or PR as relevant to SIG Node. release-note Denotes a PR that will be considered when it comes time to generate release notes. labels May 19, 2016
@k8s-github-robot k8s-github-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label May 19, 2016
@derekwaynecarr
Copy link
Member

derekwaynecarr commented May 19, 2016

LGTM.

/cc @vishh - we need to ensure that the unit for docker.service on systemd machines has Memory and CPU accounting enabled per here: #17688 (comment)

otherwise, runtime stats are not accurate for docker runtime (it will default to / as the since that will be the cpu cgroup in /proc/../cgroup file) when accounting is off. We really should ensure that cpu and memory accounting is enabled in a follow-on and there cgroup name is the same...

@derekwaynecarr
Copy link
Member

derekwaynecarr commented May 19, 2016

For reference:
https://access.redhat.com/solutions/907283

@dchen1107
Copy link
Member

LGTM Thanks for fixing this.

@dchen1107 dchen1107 added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label May 19, 2016
@vishh
Copy link
Contributor

vishh commented May 19, 2016

LGTM. @derekwaynecarr If metrics are not available, we will be returning 0 value today I think.

@derekwaynecarr
Copy link
Member

Today it returns runtime stats for root cgroup. Confirmed today.

On Thursday, May 19, 2016, Kubernetes Bot notifications@github.com wrote:

GCE e2e build/test passed for commit 6744a74
6744a74
.


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#25907 (comment)

@k8s-github-robot
Copy link

@k8s-bot test this [submit-queue is verifying that this PR is safe to merge]

@k8s-bot
Copy link

k8s-bot commented May 21, 2016

GCE e2e build/test passed for commit 6744a74.

@k8s-github-robot
Copy link

Automatic merge from submit-queue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm "Looks good to me", indicates that a PR is ready to be merged. release-note Denotes a PR that will be considered when it comes time to generate release notes. sig/node Categorizes an issue or PR as relevant to SIG Node. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants