Re: [libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-14 Thread Martin Kletzander
On Fri, Feb 14, 2014 at 08:47:37AM +0100, Richard Weinberger wrote: Am 14.02.2014 08:10, schrieb Martin Kletzander: On Thu, Feb 13, 2014 at 05:15:22PM +, Daniel P. Berrange wrote: From: Richard Weinberger rich...@nod.at Add a new helper function to change the permissions of a control

Re: [libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-14 Thread Stephan Sachse
this patch works for me. container is starting fine. but a login (ssh/console) is not possible. host: centos6 kernel: 3.13.2 libvirt: 1.2.1 (+ lxc: Add virCgroupSetOwner()) container logs says agetty[38]: /dev/tty1: cannot get controlling tty: Operation not permitted agetty[38]: /dev/tty1:

Re: [libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-14 Thread Richard Weinberger
Am 14.02.2014 11:21, schrieb Stephan Sachse: this patch works for me. container is starting fine. but a login (ssh/console) is not possible. Thanks for testing! But I fear my patch is not the culprit for your login issues. host: centos6 kernel: 3.13.2 libvirt: 1.2.1 (+ lxc: Add

Re: [libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-14 Thread Stephan Sachse
agetty[38]: /dev/tty1: cannot get controlling tty: Operation not permitted agetty[38]: /dev/tty1: cannot get controlling tty: Operation not permitted agetty[38]: /dev/tty1: cannot set process group: Inappropriate ioctl for device Is this really the reason why the login fails? Does getty not

Re: [libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-14 Thread Richard Weinberger
Am 14.02.2014 13:42, schrieb Stephan Sachse: agetty[38]: /dev/tty1: cannot get controlling tty: Operation not permitted agetty[38]: /dev/tty1: cannot get controlling tty: Operation not permitted agetty[38]: /dev/tty1: cannot set process group: Inappropriate ioctl for device Is this really

Re: [libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-14 Thread Tom Kuther
Am 14.02.2014 13:42, schrieb Stephan Sachse: set LogLevel to DEBUG3. keyexchange is down. put then hangs for some time und sshd dies sshd[269]: debug1: KEX done [preauth] sshd[269]: debug1: userauth-request for user root service ssh-connection method none [preauth] sshd[269]: debug1:

Re: [libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-14 Thread Daniel P. Berrange
On Fri, Feb 14, 2014 at 01:42:25PM +0100, Stephan Sachse wrote: agetty[38]: /dev/tty1: cannot get controlling tty: Operation not permitted agetty[38]: /dev/tty1: cannot get controlling tty: Operation not permitted agetty[38]: /dev/tty1: cannot set process group: Inappropriate ioctl for

Re: [libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-14 Thread Tom Kuther
Am 14.02.2014 14:17, schrieb Tom Kuther: Am 14.02.2014 13:42, schrieb Stephan Sachse: set LogLevel to DEBUG3. keyexchange is down. put then hangs for some time und sshd dies sshd[269]: debug1: KEX done [preauth] sshd[269]: debug1: userauth-request for user root service ssh-connection method

Re: [libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-14 Thread Daniel P. Berrange
On Fri, Feb 14, 2014 at 02:17:24PM +0100, Tom Kuther wrote: Am 14.02.2014 13:42, schrieb Stephan Sachse: set LogLevel to DEBUG3. keyexchange is down. put then hangs for some time und sshd dies sshd[269]: debug1: KEX done [preauth] sshd[269]: debug1: userauth-request for user root

Re: [libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-14 Thread Tom Kuther
Am 14.02.2014 14:32, schrieb Daniel P. Berrange: On Fri, Feb 14, 2014 at 02:17:24PM +0100, Tom Kuther wrote: Am 14.02.2014 13:42, schrieb Stephan Sachse: set LogLevel to DEBUG3. keyexchange is down. put then hangs for some time und sshd dies sshd[269]: debug1: KEX done [preauth] sshd[269]:

Re: [libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-14 Thread Stephan Sachse
systemctl mask console-getty.service fix the console login problem. sshd is still not working. dns works fine in the container. UseDNS=no fix the sshd login problem. crazy! yet I cannot reach any clients on the LAN using their lan hostname.domainname ping host.name works for me -- libvir-list

Re: [libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-14 Thread Richard Weinberger
On Fri, Feb 14, 2014 at 2:17 PM, Tom Kuther t...@kuther.net wrote: Am 14.02.2014 13:42, schrieb Stephan Sachse: set LogLevel to DEBUG3. keyexchange is down. put then hangs for some time und sshd dies sshd[269]: debug1: KEX done [preauth] sshd[269]: debug1: userauth-request for user root

Re: [libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-14 Thread Stephan Sachse
next problem: on centos6 there is no systemd. the init of the cgroups is handled by cgconfig. per default cgroups are mounted below /cgroup. i change /etc/cgconfig.conf to mount all cgroups below /sys/fs/cgroup. but thats not enough for the systemd in the container. i must add name=systemd =

[libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-13 Thread Daniel P. Berrange
From: Richard Weinberger rich...@nod.at Add a new helper function to change the permissions of a control group. This function is needed for user namespaces, we need to chmod() the cgroup to the initial uid/gid such that systemd is allowed to use the cgroup. Only the systemd controller is made

Re: [libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-13 Thread Martin Kletzander
On Thu, Feb 13, 2014 at 05:15:22PM +, Daniel P. Berrange wrote: From: Richard Weinberger rich...@nod.at Add a new helper function to change the permissions of a control group. This function is needed for user namespaces, we need to chmod() the cgroup to the initial uid/gid such that

Re: [libvirt] [PATCH] lxc: Add virCgroupSetOwner()

2014-02-13 Thread Richard Weinberger
Am 14.02.2014 08:10, schrieb Martin Kletzander: On Thu, Feb 13, 2014 at 05:15:22PM +, Daniel P. Berrange wrote: From: Richard Weinberger rich...@nod.at Add a new helper function to change the permissions of a control group. This function is needed for user namespaces, we need to chmod()