← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1243101] Re: nova docker driver cannot find cgroup in /proc/mounts on RHEL

 

** Changed in: nova
       Status: Fix Committed => Fix Released

** Changed in: nova
    Milestone: None => icehouse-2

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
https://bugs.launchpad.net/bugs/1243101

Title:
  nova docker driver cannot find cgroup in /proc/mounts on RHEL

Status in OpenStack Compute (Nova):
  Fix Released

Bug description:
  I'm using the nova docker driver on RHEL 3.10.11-1.el6.x86_64 (rebuilt
  kernel). Based on the format of /proc/mounts on RHEL, the cgroup
  devices path cannot be found.

  On my box the line in /proc/mounts for cgroups looks like this:

  none /sys/fs/cgroup cgroup
  rw,relatime,perf_event,blkio,net_cls,freezer,devices,memory,cpuacct,cpu,cpuset,clone_children
  0 0

  In the docker driver the method which searches /proc/mounts for the
  cgroup path looks like this:

      def _find_cgroup_devices_path(self):
          for ln in open('/proc/mounts'):
              if ln.startswith('cgroup ') and 'devices' in ln:
                  return ln.split(' ')[1]

  Therefore the method cannot find my cgroup path. I hacked around this
  with a 1 LOC change to the _find_cgroup_devices_path method which
  looks for 'cgroup' as the 3rd item in the line split:

  if ln.split(' ')[2] == 'cgroup' and 'devices' in ln:

  The update method in its entirety looks like:

  169     def _find_cgroup_devices_path(self):
  170         for ln in open('/proc/mounts'):
  171             if ln.split(' ')[2] == 'cgroup' and 'devices' in ln:
  172                 return ln.split(' ')[1]

  Based on the format in /proc/mounts on my ubuntu box, this change
  *should* work on ubuntu as well as rhel.

  I did read that docker is only supported with devstack + unbuntu, so I
  realize this defect may get deferred or even closed. However I wanted
  to surface it as I believe future efforts of openstack + docker will
  need to consider non-ubuntu + devstack envs.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/1243101/+subscriptions