-
Notifications
You must be signed in to change notification settings - Fork 40k
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
Conversation
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.
LGTM. /cc @vishh - we need to ensure that the unit for 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... |
For reference: |
LGTM Thanks for fixing this. |
LGTM. @derekwaynecarr If metrics are not available, we will be returning |
Today it returns runtime stats for root cgroup. Confirmed today. On Thursday, May 19, 2016, Kubernetes Bot notifications@github.com wrote:
|
@k8s-bot test this [submit-queue is verifying that this PR is safe to merge] |
GCE e2e build/test passed for commit 6744a74. |
Automatic merge from submit-queue |
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