Skip to content

Commit

Permalink
Merge pull request #41 from solidsnack/master
Browse files Browse the repository at this point in the history
Fix issue with CGroups on CentOS
  • Loading branch information
lingmann committed Jul 17, 2014
2 parents 7074ce3 + 0d792d3 commit bf3a836
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions deimos/containerizer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import logging
import os
import re
import subprocess

try: # Prefer system installation of Mesos protos if available
from mesos_pb2 import *
Expand Down
5 changes: 4 additions & 1 deletion deimos/docker.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit bf3a836

Please sign in to comment.