On 10/03/2010 05:06 PM, Ward, David - 0663 - MITLL wrote:
> The 'cgconfig' tool from libcgroup (http://libcg.sourceforge.net) can be used 
> to mount one or more instances of the cgroup virtual filesystem, instead of 
> using the 'mount' command.  However, cgconfig does not update /etc/mtab, 
> although the mounted cgroup filesystems do appear in /proc/mounts.  (I am 
> using Fedora 13.)
> Since lxc commands such as 'lxc-execute' just search /etc/mtab to see if any 
> cgroup filesystem is mounted, this causes them to fail with "cgroup is not 
> mounted", even though this is not the case.
> It seems to me that either:
>    1) cgconfig should update /etc/mtab, or
>    2) lxc should search /proc/mounts instead of /etc/mtab
>       (change one line in src/lxc/cgroup.c)
> Which is the correct solution?

The /etc/mtab belongs to the 'mount' command. I don't know libcg well 
but I don't think it should mount the cgroup. That should be up to the 
package's post-install script to add the mount point in the fstab and 
let the system do its job when it starts. That does not prevent the 
cgconfig to update the fstab instead of mounting things in the back of 
the administrator.
As the location of the fstab can be different depending of the distro, 
that would makes sense to have the distro package script to update the 
fstab ...

Solution (2) is correct because /etc/mtab is less reliable than 

   -- Daniel

Virtualization is moving to the mainstream and overtaking non-virtualized
environment for deploying applications. Does it make network security 
easier or more difficult to achieve? Read this whitepaper to separate the 
two and get a better understanding.
Lxc-devel mailing list

Reply via email to