-
Notifications
You must be signed in to change notification settings - Fork 26
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
Container info in /cgroups on CentOS 6.5 #40
Comments
I have the same problem, I tried changing the path in the deimos source but now I have a problem with memory attribute for the cgroups object |
I made a little change in deimos to work with centos 6.5 and kernel 3.15.* [root@tmparq deimos]# uname -a
|
Maybe something like this would work everywhere? diff --git a/deimos/docker.py b/deimos/docker.py
index b268624..7d5eef0 100644
--- a/deimos/docker.py
+++ b/deimos/docker.py
@@ -108,7 +108,10 @@ def cgroups(cid):
paths = []
paths += glob.glob("/sys/fs/cgroup/*/" + cid)
paths += glob.glob("/sys/fs/cgroup/*/docker/" + cid)
- return dict((s.split("/")[4], s) for s in paths)
+ paths += glob.glob("/cgroup/*/" + cid)
+ paths += glob.glob("/cgroup/*/docker/" + cid)
+ named_cgroups = [(s.split("/cgroup/")[1].split("/")[0], s) for s in paths]
+ return dict(named_cgroups)
def matching_image_for_host(distro=None, release=None, *args, **kwargs): |
@solidsnack, thank you. That corrects the issue succinctly, will that be included in a near future version? |
The text was updated successfully, but these errors were encountered: