[lxc-devel] [PATCH] make mountcgroups hook to lxc.include aware

S.Çağlar Onur caglar at 10ur.org
Sun Dec 15 05:07:10 UTC 2013


Please drop this and consider the other patch titled as "[PATCH] make
mountcgroups hook to lxc.include aware (v2)"

On Sun, Dec 15, 2013 at 12:04 AM, S.Çağlar Onur <caglar at 10ur.org> wrote:
> commit 09ad624693cb0ef41cf246e2876b5f356783b34d introduced lxc.include option
> to include other config files. This patch uses it in mountcgroups hook otherwise
> lxc-start fails with following error message for the nested containers;
>
> root at oOo:/var/lib/lxc/raring# lxc-start -l debug -o l -n raring -d
> lxc-start: command get_cgroup failed to receive response
>
> Signed-off-by: S.Çağlar Onur <caglar at 10ur.org>
> ---
>  hooks/mountcgroups | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/hooks/mountcgroups b/hooks/mountcgroups
> index a63c8db..5c20c96 100755
> --- a/hooks/mountcgroups
> +++ b/hooks/mountcgroups
> @@ -43,7 +43,8 @@ do_devices_setup() {
>      local line
>      local w  # which (allow or deny)
>      local v  # value
> -    egrep "^lxc.cgroup.devices.(allow|deny)[ \t]*=" ${configfile} | while read line; do
> +    local commonconfigfile=$(grep "^lxc.include" ${configfile} | awk -F= '{ print $2 }') # lxc.include provides common configuration options
> +    cat ${configfile} ${commonconfigfile} | egrep "^lxc.cgroup.devices.(allow|deny)[ \t]*=" | while read line; do
>          w=`echo $line | awk -F. '{ print $4 }' | awk '{ print $1 }'`
>          v=`echo $line | awk -F= '{ print $2 }'`
>          echo "$v" >> "$devdir"/devices.$w
> --
> 1.8.3.2
>



-- 
S.Çağlar Onur <caglar at 10ur.org>


More information about the lxc-devel mailing list