[lxc-users] using cgroups
rob e
redgerhoo at yahoo.com.au
Sat Jul 2 03:04:53 UTC 2016
On 02/07/16 12:41, Serge E. Hallyn wrote:
> Quoting rob e (redgerhoo at yahoo.com.au):
>> On 02/07/16 12:14, Serge E. Hallyn wrote:
>>>> 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
>>> D'oh. Thanks for your patience. I see the bug. I'll post a
>>> PR for a fix. I'm surprised so few people run into this. But
>>> as a workaround just add ",devices" to the end of the pam_cgfs
>>> line in /etc/pam.d/common-session.
>>>
>> sorry about this ... didn't work. Tried 2 forms of Pam clause & 2
>> forms of config
>>
>> ------------------------------------------------------
>> PAM line
>> session optional pam_cgfs.so -c
>> freezer,memory,name=systemd,cpuset,devices
> Jus to make sure, did you log back in after this? what does /proc/self/cgroup
> look like?
>
>
errr ... no. When I read the PAM documentation I formed the impression
all is dynamic so no need to log in again. Oops, sorry
Logged Off, then back in and retried and now looks MUCH BETTER :)
............
$ lxc-start -n xenial_test_01 -F -o lxc_test_mem_160702f.log -l debug
-------------- startup lines cleared from console
Ubuntu 14.04.4 LTS xenial_test_01 console
xenial_test_01 login: 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
I've attached the log just in case
----------------------------
it runs !!!
NAME STATE AUTOSTART GROUPS
IPV4 IPV6
xenial_test_01 RUNNING 0 - 10.0.3.57 -
Yay .. thanks. Now I can constrain them which is important. Now for
passing devices :)
Great work. Thanks for your help
R
-------------- next part --------------
A non-text attachment was scrubbed...
Name: lxc_test_mem_160702f.log.zip
Type: application/zip
Size: 2854 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20160702/ab44f895/attachment.zip>
More information about the lxc-users
mailing list