Re: [Lxc-users] Problem with lxc and mutliple ips

2013-10-16 Thread Andreas Laut
Thanks Tamas and Guido for your help.
Dealing with stp options on the bridge wasn't a good option for us 
because we don't use a closed network solution and it could shutdown our 
provider net. (if they use stp too)

We figured out that interfaces starts smoother in lxc if we set 
lxc.network.hwaddr.
Sometimes an ip won't get configured for the first time but that repairs 
a arping or pinging the gateway inside container.


Regards,
Andreas


Am 11.10.2013 14:58, schrieb Tamas Papp:
 On 10/11/2013 02:42 PM, Andreas Laut wrote:
 Hi,

 actually can't get lxc nightly compiled with debian right now,
 configure has problems with pkg-config python3-dev (package pkg-config
 and python3-dev is installed) (configure line 5588)

 I tried instead lxc 0.9 from tarball and got the same problem.

 Our LXC Config is attached, maybe this helps.
 Our lxc-host bridge is configured like

 auto br0
 iface br0 inet static
  bridge_ports eth4
  bridge_stp off
  address 10.5.255.80
  netmask 255.255.0.0
  gateway 10.5.255.252
 I used to add

  bridge_fd 0
  bridge_maxwait 0


 to the bridge config.

 tamas

 --
 October Webinars: Code for Performance
 Free Intel webinars can help you accelerate application performance.
 Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
 the latest Intel processors and coprocessors. See abstracts and register 
 http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk
 ___
 Lxc-users mailing list
 Lxc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/lxc-users


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60135031iu=/4140/ostg.clktrk
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Problem with lxc and mutliple ips

2013-10-11 Thread Andreas Laut
Ok, sorry. You're right.

We are using a bridge named br0 bound to eth0 at lxc host. On the 
containers we are using veth, but this problem happens also with type 
macvlan. No change at all.

We also tried using hwaddr.
We're doing further research in hope to show a way to reproduce this for 
you.

Andreas


Am 11.10.2013 09:41, schrieb Jäkel, Guido:
 Dear Andreas,

 please substantiate your term start a lxc with multiple IPs and the line 
 If we are using only one IP for LXC, all is fine: What kind of network 
 setup do you use, is it e.g. a bridge on the lxc host and veth's on the 
 containers?

 A guess might be that you have a MAC address clash; did you override the 
 lxc.network.hwaddr?

 Guido

 -Original Message-
 From: Andreas Laut [mailto:andreas.l...@spark5.de]
 Sent: Friday, October 11, 2013 8:53 AM
 To: lxc-users@lists.sourceforge.net
 Subject: [Spam-Wahrscheinlichkeit=45][Lxc-users] Problem with lxc and 
 mutliple ips

 Dear list,

 we are using lxc 0.8 on Debian Wheezy (official debian package).
 Now we wanted to start a lxc with more than one IP address and we have
 gotten strange behaviors.

 As starting the lxc some IPs are reachable, some not. If we shut down
 the lxc and boot again, some other IPs are reachable. There seams no
 logic behind this. And - in no time - there were all IPs reachable.

 If we are using only one IP for LXC, all is fine.

 Do someone else have gotten this problem? All help and ideas are
 appreciated.


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Problem with lxc and mutliple ips

2013-10-11 Thread Tamas Papp

On 10/11/2013 10:40 AM, Andreas Laut wrote:
 Ok, sorry. You're right.

 We are using a bridge named br0 bound to eth0 at lxc host. On the 
 containers we are using veth, but this problem happens also with type 
 macvlan. No change at all.

 We also tried using hwaddr.
 We're doing further research in hope to show a way to reproduce this for 
 you.

Are you able to reproduce that against recent nightly build?

tamas

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Problem with lxc and mutliple ips

2013-10-11 Thread Jäkel , Guido
Dear Andreas,

Thank you for the first clarification. But now I want to ask what exactly is 
not working:

* Are you trying to use more than one Containers with one IP or one Container 
with more than one IP? 
* Are you using the same subnets?
* From what location you can't reach the IP, did this station list the right 
MAC in it's ARP table at least? 
* Can you reach the LXC host from there? Can you reach others from the Host? 
Can you reach the host or others from the Containers?
* Has your host an IP (on the bridge)? Is STP enabled, is the forward delay and 
hello time at an appropriate low value?
* Is the Host connected to a Switched Network? What did you observe here with 
respect to the used MACs / IPs?


Greetings

Guido

-Original Message-
From: Andreas Laut [mailto:andreas.l...@spark5.de]
Sent: Friday, October 11, 2013 10:41 AM
To: Jäkel, Guido; 'lxc-users@lists.sourceforge.net'
Subject: Re: [Lxc-users] Problem with lxc and mutliple ips

Ok, sorry. You're right.

We are using a bridge named br0 bound to eth0 at lxc host. On the
containers we are using veth, but this problem happens also with type
macvlan. No change at all.

We also tried using hwaddr.
We're doing further research in hope to show a way to reproduce this for
you.

Andreas


Am 11.10.2013 09:41, schrieb Jäkel, Guido:
 Dear Andreas,

 please substantiate your term start a lxc with multiple IPs and the line 
 If we are using only one IP for LXC, all is fine: What kind of
network setup do you use, is it e.g. a bridge on the lxc host and veth's on 
the containers?

 A guess might be that you have a MAC address clash; did you override the 
 lxc.network.hwaddr?

 Guido

 -Original Message-
 From: Andreas Laut [mailto:andreas.l...@spark5.de]
 Sent: Friday, October 11, 2013 8:53 AM
 To: lxc-users@lists.sourceforge.net
 Subject: [Spam-Wahrscheinlichkeit=45][Lxc-users] Problem with lxc and 
 mutliple ips

 Dear list,

 we are using lxc 0.8 on Debian Wheezy (official debian package).
 Now we wanted to start a lxc with more than one IP address and we have
 gotten strange behaviors.

 As starting the lxc some IPs are reachable, some not. If we shut down
 the lxc and boot again, some other IPs are reachable. There seams no
 logic behind this. And - in no time - there were all IPs reachable.

 If we are using only one IP for LXC, all is fine.

 Do someone else have gotten this problem? All help and ideas are
 appreciated.


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Problem with lxc and mutliple ips

2013-10-11 Thread Andreas Laut

Hi,

actually can't get lxc nightly compiled with debian right now, configure 
has problems with pkg-config python3-dev (package pkg-config and 
python3-dev is installed) (configure line 5588)


I tried instead lxc 0.9 from tarball and got the same problem.

Our LXC Config is attached, maybe this helps.
Our lxc-host bridge is configured like

auto br0
iface br0 inet static
bridge_ports eth4
bridge_stp off
address 10.5.255.80
netmask 255.255.0.0
gateway 10.5.255.252


Andreas

Am 11.10.2013 10:45, schrieb Tamas Papp:

On 10/11/2013 10:40 AM, Andreas Laut wrote:

Ok, sorry. You're right.

We are using a bridge named br0 bound to eth0 at lxc host. On the
containers we are using veth, but this problem happens also with type
macvlan. No change at all.

We also tried using hwaddr.
We're doing further research in hope to show a way to reproduce this for
you.

Are you able to reproduce that against recent nightly build?

tamas

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


# /var/lib/lxc/lxc-container/config

## Container
lxc.utsname = lxc-container

lxc.network.type= veth
lxc.network.flags   = up
lxc.network.link= br0
lxc.network.ipv4= 10.05.225.10/16

lxc.network.type= veth
lxc.network.flags   = up
lxc.network.link= br0
lxc.network.ipv4= 10.05.225.11/16

lxc.network.type= veth
lxc.network.flags   = up
lxc.network.link= br0
lxc.network.ipv4= 10.05.100.12/16

lxc.network.type= veth
lxc.network.flags   = up
lxc.network.link= br0
lxc.network.ipv4= 10.05.100.13/16

lxc.network.type= veth
lxc.network.flags   = up
lxc.network.link= br0
lxc.network.ipv4= 10.05.225.14/16

lxc.network.ipv4.gateway= 10.05.255.252

lxc.rootfs  = /var/lib/lxc/lxc-container/rootfs
lxc.arch= x86_64
#lxc.console= /var/log/lxc/lxc-container.console
lxc.tty = 5
lxc.pts = 1024

## Capabilities
lxc.cap.drop= mac_admin
lxc.cap.drop= mac_override
lxc.cap.drop= sys_admin
lxc.cap.drop= sys_module
lxc.cap.drop= sys_rawio
## Devices
# Allow all devices
#lxc.cgroup.devices.allow   = a
# Deny all devices
lxc.cgroup.devices.deny = a
# Allow to mknod all devices (but not using them)
lxc.cgroup.devices.allow= c *:* m
lxc.cgroup.devices.allow= b *:* m

# /dev/console
lxc.cgroup.devices.allow= c 5:1 rwm
# /dev/fuse
lxc.cgroup.devices.allow= c 10:229 rwm
# /dev/null
lxc.cgroup.devices.allow= c 1:3 rwm
# /dev/ptmx
lxc.cgroup.devices.allow= c 5:2 rwm
# /dev/pts/*
lxc.cgroup.devices.allow= c 136:* rwm
# /dev/random
lxc.cgroup.devices.allow= c 1:8 rwm
# /dev/rtc
lxc.cgroup.devices.allow= c 254:0 rwm
# /dev/tty
lxc.cgroup.devices.allow= c 5:0 rwm
# /dev/urandom
lxc.cgroup.devices.allow= c 1:9 rwm
# /dev/zero
lxc.cgroup.devices.allow= c 1:5 rwm

## Limits
#lxc.cgroup.cpu.shares  = 1024
#lxc.cgroup.cpuset.cpus = 0
#lxc.cgroup.memory.limit_in_bytes   = 4G
#lxc.cgroup.memory.memsw.limit_in_bytes = 1G
#lxc.cgroup.blkio.weight= 500

## Filesystem
lxc.mount.entry = proc 
/var/lib/lxc/lxc-container/rootfs/proc proc nodev,noexec,nosuid,ro 0 0
lxc.mount.entry = sysfs 
/var/lib/lxc/lxc-container/rootfs/sys sysfs defaults,ro 0 0
--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and 

Re: [Lxc-users] Problem with lxc and mutliple ips

2013-10-11 Thread Andreas Laut
Sorry, found the mistake in my lxc config by myself, need to do further 
tests.


Am 11.10.2013 14:42, schrieb Andreas Laut:

Hi,

actually can't get lxc nightly compiled with debian right now, 
configure has problems with pkg-config python3-dev (package pkg-config 
and python3-dev is installed) (configure line 5588)


I tried instead lxc 0.9 from tarball and got the same problem.

Our LXC Config is attached, maybe this helps.
Our lxc-host bridge is configured like

auto br0
iface br0 inet static
bridge_ports eth4
bridge_stp off
address 10.5.255.80
netmask 255.255.0.0
gateway 10.5.255.252


Andreas

Am 11.10.2013 10:45, schrieb Tamas Papp:

On 10/11/2013 10:40 AM, Andreas Laut wrote:

Ok, sorry. You're right.

We are using a bridge named br0 bound to eth0 at lxc host. On the
containers we are using veth, but this problem happens also with type
macvlan. No change at all.

We also tried using hwaddr.
We're doing further research in hope to show a way to reproduce this 
for

you.

Are you able to reproduce that against recent nightly build?

tamas

-- 


October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the 
most from
the latest Intel processors and coprocessors. See abstracts and 
register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk 


___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users




--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk


___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Problem with lxc and mutliple ips

2013-10-11 Thread Tamas Papp

On 10/11/2013 02:42 PM, Andreas Laut wrote:
 Hi,

 actually can't get lxc nightly compiled with debian right now,
 configure has problems with pkg-config python3-dev (package pkg-config
 and python3-dev is installed) (configure line 5588)

 I tried instead lxc 0.9 from tarball and got the same problem.

 Our LXC Config is attached, maybe this helps.
 Our lxc-host bridge is configured like

 auto br0
 iface br0 inet static
 bridge_ports eth4
 bridge_stp off
 address 10.5.255.80
 netmask 255.255.0.0
 gateway 10.5.255.252

I used to add

bridge_fd 0
bridge_maxwait 0


to the bridge config.

tamas

--
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register 
http://pubads.g.doubleclick.net/gampad/clk?id=60134071iu=/4140/ostg.clktrk
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Problem with lxc

2011-09-19 Thread Serge E. Hallyn
Quoting Kristian Kirilov (d3v1...@d3v1ous.info):

...

 lxc-checkconfig show this status:
 
 blackbird:~# lxc-checkconfig
 Kernel config /proc/config.gz not found, looking in other places...
 Found kernel config file /boot/config-3.0.4
 --- Namespaces ---
 Namespaces: enabled
 Utsname namespace: enabled
 Ipc namespace: enabled
 Pid namespace: enabled
 User namespace: enabled
 Network namespace: enabled
 Multiple /dev/pts instances: enabled
 
 --- Control groups ---
 Cgroup: enabled
 Cgroup namespace: required

This one should be fine to ignore.  I've sent a patch to not warn about
this when there's not an actual problem.  Do you get a failure when you
actually try to start a container?

 Cgroup device: enabled
 Cgroup sched: enabled
 Cgroup cpu account: enabled
 Cgroup memory controller: enabled
 Cgroup cpuset: enabled
 
 --- Misc ---
 Veth pair device: enabled
 Macvlan: enabled
 Vlan: enabled
 File capabilities: enabled
 
 Note : Before booting a new kernel, you can check its configuration
 usage : CONFIG=/path/to/config /usr/local/bin/lxc-checkconfig
 
 blackbird:~#
 
 Can somebody help to me to fix this issue?
 Thanks
 
 
 --
 BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
 http://p.sf.net/sfu/rim-devcon-copy2
 ___
 Lxc-users mailing list
 Lxc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/lxc-users

--
BlackBerryreg; DevCon Americas, Oct. 18-20, San Francisco, CA
Learn about the latest advances in developing for the 
BlackBerryreg; mobile platform with sessions, labs  more.
See new tools and technologies. Register for BlackBerryreg; DevCon today!
http://p.sf.net/sfu/rim-devcon-copy1 
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-08 Thread Nikhil Handigol
Thanks Daniel!

The linux-3.0 patches don't seem to be working for me unfortunately.

I compiled lxc-0.7.5 with the patched linux-3.0. After starting a container
foo via lxc-execute,I ran the following command:
$ lxc-attach -n foo -- /bin/bash

When I run lxc-attach, I get the following error:
lxc-attach: Function not implemented - failed to set namespace 'pid'
lxc-attach: failed to enter the namespace

Upon more probing into the errno, I found:
errno = 38
strerror says: Function not implemented


The required ns files do seem to be present in /proc/pid/ns:
$ ls /proc/28559/ns/
ipc mnt net pid user uts

I also double-checked that all the setns patches were properly applied to
the kernel:
$ quilt top
0016-ns-proc-Enable-setns-for-support-for-the-pid-namespa.patch

I'd appreciate any help in fixing this error.

Thanks,
Nikhil


On Wed, Sep 7, 2011 at 6:55 AM, Matteo Bernardini 
matteo.bernard...@gmail.com wrote:

  http://lxc.sourceforge.net/patches/linux/3.0.0/3.0.0-lxc1/

 I've done a quick try of the patches with linux-3.0.4 with lxc-0.7.5,
 slackware64-13.37 and my existing containers and I'm able to turn them
 off easily with

 lxc-attach -n mycontainer -- /sbin/halt

 \o/

 I'll test them more, but in the meantime thanks Daniel!

 Matteo


 --
 Using storage to extend the benefits of virtualization and iSCSI
 Virtualization increases hardware utilization and delivers a new level of
 agility. Learn what those decisions are and how to modernize your storage
 and backup environments for virtualization.
 http://www.accelacomm.com/jaw/sfnl/114/51434361/
 ___
 Lxc-users mailing list
 Lxc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/lxc-users

--
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-08 Thread Nikhil Handigol
I just tried running lxc-attach with linux-2.6.38. I got the same error as
with linux-3.0 -- Function not implemented - failed to set namespace 'pid'.

Here's the exact sequence of steps that I followed:

Compiled linux-2.6.38.2 with the corresponding setns patches (
http://lxc.sourceforge.net/patches/linux/2.6.38/2.6.38.2-lxc1/).

Rebooted into 2.6.38.2
$ uname -a
Linux nf-build2 2.6.38.2-lxc-0.7.4-with-setns #1 SMP Thu Sep 8 08:42:40 PDT
2011 x86_64 GNU/Linux

Compiled lxc-0.7.4:
$ git checkout lxc-0.7.4
$ ./configure; make; sudo make install

Created a container:
# lxc-execute -n foo -f /etc/mn/host.conf -- /bin/bash
root@mnhost:~#

In a separate terminal, tried running lxc-attach:
# lxc-attach -n foo -- /bin/bash
lxc-attach: Function not implemented - failed to set namespace 'pid'
lxc-attach: failed to enter the namespace

Even in linux-2.6.38.2, lxc-attach is failing at the point where it calls
setns. Am I doing something wrong here?

By the way, I'm using Ubuntu 8.04, if that makes any difference.

Thanks,
Nikhil


On Thu, Sep 8, 2011 at 8:23 AM, Nikhil Handigol
nikhil.handi...@gmail.comwrote:

 Thanks Daniel!

 The linux-3.0 patches don't seem to be working for me unfortunately.

 I compiled lxc-0.7.5 with the patched linux-3.0. After starting a container
 foo via lxc-execute,I ran the following command:
 $ lxc-attach -n foo -- /bin/bash

 When I run lxc-attach, I get the following error:
 lxc-attach: Function not implemented - failed to set namespace 'pid'

 lxc-attach: failed to enter the namespace

 Upon more probing into the errno, I found:
 errno = 38
 strerror says: Function not implemented


 The required ns files do seem to be present in /proc/pid/ns:
 $ ls /proc/28559/ns/
 ipc mnt net pid user uts

 I also double-checked that all the setns patches were properly applied to
 the kernel:
 $ quilt top
 0016-ns-proc-Enable-setns-for-support-for-the-pid-namespa.patch

 I'd appreciate any help in fixing this error.

 Thanks,
 Nikhil


 On Wed, Sep 7, 2011 at 6:55 AM, Matteo Bernardini 
 matteo.bernard...@gmail.com wrote:

  http://lxc.sourceforge.net/patches/linux/3.0.0/3.0.0-lxc1/

 I've done a quick try of the patches with linux-3.0.4 with lxc-0.7.5,
 slackware64-13.37 and my existing containers and I'm able to turn them
 off easily with

 lxc-attach -n mycontainer -- /sbin/halt

 \o/

 I'll test them more, but in the meantime thanks Daniel!

 Matteo


 --
 Using storage to extend the benefits of virtualization and iSCSI
 Virtualization increases hardware utilization and delivers a new level of
 agility. Learn what those decisions are and how to modernize your storage
 and backup environments for virtualization.
 http://www.accelacomm.com/jaw/sfnl/114/51434361/
 ___
 Lxc-users mailing list
 Lxc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/lxc-users



--
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-08 Thread Daniel Lezcano
On 09/08/2011 06:30 PM, Nikhil Handigol wrote:
 I just tried running lxc-attach with linux-2.6.38. I got the same error as
 with linux-3.0 -- Function not implemented - failed to set namespace 'pid'.

 Here's the exact sequence of steps that I followed:

 Compiled linux-2.6.38.2 with the corresponding setns patches (
 http://lxc.sourceforge.net/patches/linux/2.6.38/2.6.38.2-lxc1/).

 Rebooted into 2.6.38.2
 $ uname -a
 Linux nf-build2 2.6.38.2-lxc-0.7.4-with-setns #1 SMP Thu Sep 8 08:42:40 PDT
 2011 x86_64 GNU/Linux

 Compiled lxc-0.7.4:
 $ git checkout lxc-0.7.4
 $ ./configure; make; sudo make install

Is it possible you have another lxc version installed on your system ?
For instance, /usr/bin and the one you are compiling is installed in
/usr/local/bin.

--
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-08 Thread Nikhil Handigol
Just to be sure that wasn't the case, I tried running the executable
directly from the lxc source directory. I got the same error:

$ cd src/lxc
$ ./lxc-execute -n foo -f /etc/mn/host.conf -- /bin/bash
root@mnhost:/home/nikhilh/lxc/src/lxc#

In another terminal:
$ cd src/lxc
$ ./lxc-attach -n foo -- /bin/bash
lxc-attach: Function not implemented - failed to set namespace 'pid'
lxc-attach: failed to enter the namespace

-- Nikhil


On Thu, Sep 8, 2011 at 9:40 AM, Daniel Lezcano daniel.lezc...@free.frwrote:

 On 09/08/2011 06:30 PM, Nikhil Handigol wrote:
  I just tried running lxc-attach with linux-2.6.38. I got the same error
 as
  with linux-3.0 -- Function not implemented - failed to set namespace
 'pid'.
 
  Here's the exact sequence of steps that I followed:
 
  Compiled linux-2.6.38.2 with the corresponding setns patches (
  http://lxc.sourceforge.net/patches/linux/2.6.38/2.6.38.2-lxc1/).
 
  Rebooted into 2.6.38.2
  $ uname -a
  Linux nf-build2 2.6.38.2-lxc-0.7.4-with-setns #1 SMP Thu Sep 8 08:42:40
 PDT
  2011 x86_64 GNU/Linux
 
  Compiled lxc-0.7.4:
  $ git checkout lxc-0.7.4
  $ ./configure; make; sudo make install

 Is it possible you have another lxc version installed on your system ?
 For instance, /usr/bin and the one you are compiling is installed in
 /usr/local/bin.

--
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-08 Thread Nikhil Handigol
If I understand the lxc code right, it's failing in the function
get_cgroup_mount in src/lxc/cgroup.c, which tries to read the cgroup mount
point from /proc/mounts.

/proc/mount seems to be fine on my machine:
$ cat /proc/mounts
...
...
cgroup /cgroup cgroup
rw,relatime,blkio,net_cls,freezer,devices,memory,cpuacct,cpu,debug,cpuset,clone_children
0 0


The cgroup entry is present, but it seems it's unable to open /proc/mounts.

-/\/


On Thu, Sep 8, 2011 at 1:16 PM, Nikhil Handigol
nikhil.handi...@gmail.comwrote:

 Ah! That was something I had missed. I recompiled lxc with
 the --with-linuxdir option and the old error went away.

 Now I'm getting the following error:
 $ lxc-attach -n foo -- /bin/bash
 lxc-attach: No such file or directory - failed to open /proc/mounts
 lxc-attach: cgroup is not mounted
 lxc-attach: No such file or directory - failed to get cgroup path for
 cgroup foo

 On my machine, cgroup is mounted on /cgroup via the following command:
 mount -t cgroup cgroup /cgroup

 It looks like I also need to specify where cgroup is mounted? How do I do
 that?
 (I think we're close to getting this to work)

 Thanks,
 -/\/



 On Thu, Sep 8, 2011 at 1:07 PM, Daniel Lezcano daniel.lezc...@free.frwrote:

 On 09/08/2011 07:12 PM, Nikhil Handigol wrote:
  It is indeed the case:
 
  $ type lxc-attach
  lxc-attach is /usr/local/bin/lxc-attach

 Ok.

 Did you specified the kernel source tree when invoking configure ?

 It is the --with-linuxdir=path_to_the_patched_kernel

 Make sure to remove src/lxc/setns.h file which is automatically generated.



--
Doing More with Less: The Next Generation Virtual Desktop 
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops?   How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-07 Thread Greg Kurz
On Wed, 2011-09-07 at 10:38 +0200, Daniel Lezcano wrote:
 On 09/07/2011 02:17 AM, Nikhil Handigol wrote:
  Hi,
 
  I have been facing problems getting lxc (more specifically, lxc-attach) to
  work on Linux v3.1.0-rc4. When I run lxc-attach, I get the following error:
  $ lxc-attach -n foo -- /bin/bash
  lxc-attach: No such file or directory - failed to open '/proc/821/ns/pid'
  lxc-attach: failed to enter the namespace
 
 lxc-attach is ready but in the kernel there is a missing piece, the
 patchset is ready.
 We plan to have it for 3.2.
 

Hi Daniel,

Is there a place where one can find this patchset ? I've tried here:

http://git.kernel.org/?p=linux/kernel/git/ebiederm/linux-namespace-control-devel.git

but unfortunately kernel.org is still down because of security issues...

Cheers.

-- 
Gregory Kurz gk...@fr.ibm.com
Software Engineer @ IBM/Meiosys  http://www.ibm.com
Tel +33 (0)534 638 479   Fax +33 (0)561 400 420

Anarchy is about taking complete responsibility for yourself.
Alan Moore.


--
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-07 Thread Daniel Lezcano
On 09/07/2011 11:33 AM, Greg Kurz wrote:
 On Wed, 2011-09-07 at 10:38 +0200, Daniel Lezcano wrote:
 On 09/07/2011 02:17 AM, Nikhil Handigol wrote:
 Hi,

 I have been facing problems getting lxc (more specifically, lxc-attach) to
 work on Linux v3.1.0-rc4. When I run lxc-attach, I get the following error:
 $ lxc-attach -n foo -- /bin/bash
 lxc-attach: No such file or directory - failed to open '/proc/821/ns/pid'
 lxc-attach: failed to enter the namespace

 lxc-attach is ready but in the kernel there is a missing piece, the
 patchset is ready.
 We plan to have it for 3.2.

 Hi Daniel,

 Is there a place where one can find this patchset ? I've tried here:

 http://git.kernel.org/?p=linux/kernel/git/ebiederm/linux-namespace-control-devel.git
Uploaded at:

http://lxc.sourceforge.net/patches/linux/3.0.0/3.0.0-lxc1/

Cheers
  -- Daniel

--
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-07 Thread Matteo Bernardini
 http://lxc.sourceforge.net/patches/linux/3.0.0/3.0.0-lxc1/

I've done a quick try of the patches with linux-3.0.4 with lxc-0.7.5,
slackware64-13.37 and my existing containers and I'm able to turn them
off easily with

lxc-attach -n mycontainer -- /sbin/halt

\o/

I'll test them more, but in the meantime thanks Daniel!

Matteo

--
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users


Re: [Lxc-users] Problem with lxc-attach on Linux v3.1.0

2011-09-07 Thread Goran Cetusic
Thank you, Daniel. If lxc-attach enters the mainline kernels it will, with
the LANA netgraph implementation, become a powerful tool for network
simulation. The only component inside the kernel that is still missing are
union mounts.

On Wed, Sep 7, 2011 at 3:55 PM, Matteo Bernardini 
matteo.bernard...@gmail.com wrote:

  http://lxc.sourceforge.net/patches/linux/3.0.0/3.0.0-lxc1/

 I've done a quick try of the patches with linux-3.0.4 with lxc-0.7.5,
 slackware64-13.37 and my existing containers and I'm able to turn them
 off easily with

 lxc-attach -n mycontainer -- /sbin/halt

 \o/

 I'll test them more, but in the meantime thanks Daniel!

 Matteo


 --
 Using storage to extend the benefits of virtualization and iSCSI
 Virtualization increases hardware utilization and delivers a new level of
 agility. Learn what those decisions are and how to modernize your storage
 and backup environments for virtualization.
 http://www.accelacomm.com/jaw/sfnl/114/51434361/
 ___
 Lxc-users mailing list
 Lxc-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/lxc-users

--
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage 
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/___
Lxc-users mailing list
Lxc-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lxc-users