[lxc-users] using cgroups

rob e redgerhoo at yahoo.com.au
Sat Jul 2 01:32:01 UTC 2016



On 02/07/16 09:28, Serge E. Hallyn wrote:
> Quoting rob e (redgerhoo at yahoo.com.au):
>> On 02/07/16 01:02, Serge E. Hallyn wrote:
>>> Quoting rob e (redgerhoo at yahoo.com.au):
>>>> On 01/07/16 10:58, Serge E. Hallyn wrote:
>>>>> Quoting rob e (redgerhoo at yahoo.com.au):
>>>>> Let's address them one at a time.  For starters,
>>>>>
>>>>> if you only leave in the
>>>>> 	lxc.cgroup.cpuset.cpus = 1-3
>>>>> does that now work?  If not, please post the log output to show exactly
>>>>> how it fails.
>>>>> And if you only have
>>>>> 	lxc.cgroup.memory.limit_in_bytes = 4G
>>>>> how does that fail, exactly?
>>>>>
>>>>> Also, what is /proc/self/cgroup now when you login?
>>>>>
>>>>> _______________________________________________
>>>>> lxc-users mailing list
>>>>> lxc-users at lists.linuxcontainers.org
>>>>> http://lists.linuxcontainers.org/listinfo/lxc-users
>>>> hi Serge,
>>>> thanks for the response, data follows
>>>>
>>> Wait, why is it still showing this error?  You don't
>>> have any lxc.cgroup.deivces in the above config!
>>>
>>> Can you please show
>>>
>>> /usr/share/lxc/config/ubuntu.common.conf
>>> /usr/share/lxc/config/ubuntu.userns.conf
>>>
>>> ?
>>> _______________________________________________
>>> lxc-users mailing list
>>> lxc-users at lists.linuxcontainers.org
>>> http://lists.linuxcontainers.org/listinfo/lxc-users
>> okey dokes, here they are (plus the direct "include" elements)
> Thanks.  Yeah, this is making no sense.  There should be no
> lxc.cgroup.devices.*.  Can you add
>
> lxc.cgroup.devices.allow =
> lxc.cgroup.devices.deny =
>
> to the end of your config and try again?

hi Serge,
with JUST those clauses (and no cgroup set clauses) ... it sort of 
works. Initial messages are cleared from the console(?) leaving just the 
shutdown messages. But it does get to a login prompt

-----------------------------------------------------------------
$ lxc-start -n xenial_test_01 -F -o lxc_test_shall_160702a.log -l debug
Ubuntu 14.04.4 LTS xenial_test_01 console

xenial_test_01 login:  * Stopping save kernel messages   ...done.
wait-for-state stop/waiting
  * Asking all remaining processes to terminate...
    ...done.
  * All processes ended within 1 seconds...
    ...done.
  * Deactivating swap...
swapoff: Not superuser.
    ...fail!
  * Unmounting local filesystems...
umount2: Permission denied
umount: /dev/zero: block devices not permitted on fs
umount2: Permission denied
umount2: Permission denied
umount: /dev/urandom: block devices not permitted on fs
umount2: Permission denied
umount2: Permission denied
umount: /dev/tty: block devices not permitted on fs
umount2: Permission denied
umount2: Permission denied
umount: /dev/random: block devices not permitted on fs
umount2: Permission denied
umount2: Permission denied
umount: /dev/null: block devices not permitted on fs
umount2: Permission denied
umount2: Permission denied
umount: /dev/full: block devices not permitted on fs
umount2: Permission denied
umount2: Permission denied
umount: /dev/console: block devices not permitted on fs
umount2: Permission denied
umount: /dev/mqueue: block devices not permitted on fs
umount2: Permission denied
    ...fail!
mount: cannot mount block device /dev/mapper/wd2t--lvm--data-lxc_images 
read-only
  * Will now halt
-----------------------------------------------------------------
Log file attached as lxc_test_shall_160702b.log

-----------------------------------------------------------------
Then I ran it again, this time with cgroup for 
memory(lxc.cgroup.memory.limit_in_bytes = 4G), and it died

$ lxc-start -n xenial_test_01 -F -o lxc_test_shall_mem_160702b.log -l debug
lxc-start: cgfsng.c: cgfsng_setup_limits: 1645 No devices cgroup setup 
for xenial_test_01
lxc-start: start.c: lxc_spawn: 1226 failed to setup the devices cgroup 
for 'xenial_test_01'
lxc-start: start.c: __lxc_start: 1353 failed to spawn 'xenial_test_01'
            lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained 
by setting the --logfile and --logpriority options.

-----------------------------------------------------------------
Log file attached as lxc_test_shall_mem_160702b.log

R

-------------- next part --------------
A non-text attachment was scrubbed...
Name: lxc_test_shall_160702ab_logs.zip
Type: application/zip
Size: 5353 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160702/59aa847c/attachment.zip>


More information about the lxc-users mailing list