All of lore.kernel.org
 help / color / mirror / Atom feed
* PHYS type lxc not working
@ 2010-07-05  4:39 Sabdar
       [not found] ` <AANLkTino_Vt88QmLt8o4nzLmex2NwBSxkO4bSRBbS-UD-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
       [not found] ` <20100707223344.GA3129@count0.beaverton.ibm.com>
  0 siblings, 2 replies; 6+ messages in thread
From: Sabdar @ 2010-07-05  4:39 UTC (permalink / raw)
  To: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA

   Hi all,
        I want to use the below configuration in lxc, but the problem is the
physical interface is not getting release after i stop the container like it
happens in macvlan type.The interface gets disappear from host and i can
restore that only if i reboot my system,

lxc.utsname = gamma
lxc.network.type = phys
lxc.network.flags = up
lxc.network.link = eth0
lxc.network.name = eth0
lxc.network.ipv4 = 192.168.10.1

My kernel version :- linux-2.6.33
Lxc version :- 0.6.5

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PHYS type lxc not working
       [not found] ` <AANLkTino_Vt88QmLt8o4nzLmex2NwBSxkO4bSRBbS-UD-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-07-07 22:33   ` Matt Helsley
  0 siblings, 0 replies; 6+ messages in thread
From: Matt Helsley @ 2010-07-07 22:33 UTC (permalink / raw)
  To: Sabdar
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	lxc-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On Mon, Jul 05, 2010 at 10:09:21AM +0530, Sabdar wrote:
>    Hi all,
>         I want to use the below configuration in lxc, but the problem is the
> physical interface is not getting release after i stop the container like it
> happens in macvlan type.The interface gets disappear from host and i can
> restore that only if i reboot my system,
> 
> lxc.utsname = gamma
> lxc.network.type = phys
> lxc.network.flags = up
> lxc.network.link = eth0
> lxc.network.name = eth0
> lxc.network.ipv4 = 192.168.10.1
> 
> My kernel version :- linux-2.6.33

Have you tried 2.6.35-rc4? It has Eric's sysfs and netns tagging
patches which enhance support for using physical interfaces.

Cc'ing lxc-users (which is probably a better place to ask)

> Lxc version :- 0.6.5

lxc 0.7.1 is also out.

I'm sorry, I know this isn't much help in figuring out the
exact nature of the problem. Hopefully Cc'ing lxc-users will help.

Cheers,
	-Matt Helsley

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PHYS type lxc not working
       [not found]   ` <20100707223344.GA3129-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
@ 2010-07-08  4:43     ` Sabdar
       [not found]       ` <AANLkTinItYFIWCjJ_bbi0ah7dg98E2I8rYd8WOpjI_DK-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
       [not found]       ` <1278575867.29985.2.camel@foo.co.tradefair>
  0 siblings, 2 replies; 6+ messages in thread
From: Sabdar @ 2010-07-08  4:43 UTC (permalink / raw)
  To: Matt Helsley
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	lxc-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

ok thanks for the information,i will make a try on 2.6.35-rc4 kernel and
with latest lxc package.Also can anyone suggest how to make macvlan
container communicate with the host.i can make macvlan communicate with
other container using macvlan bridge mode similarly is there any way that i
can make it to allow communicate with host as well.

Thanks,
Sabdar.

On Thu, Jul 8, 2010 at 4:03 AM, Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org> wrote:

> On Mon, Jul 05, 2010 at 10:09:21AM +0530, Sabdar wrote:
> >    Hi all,
> >         I want to use the below configuration in lxc, but the problem is
> the
> > physical interface is not getting release after i stop the container like
> it
> > happens in macvlan type.The interface gets disappear from host and i can
> > restore that only if i reboot my system,
> >
> > lxc.utsname = gamma
> > lxc.network.type = phys
> > lxc.network.flags = up
> > lxc.network.link = eth0
> > lxc.network.name = eth0
> > lxc.network.ipv4 = 192.168.10.1
> >
> > My kernel version :- linux-2.6.33
>
> Have you tried 2.6.35-rc4? It has Eric's sysfs and netns tagging
> patches which enhance support for using physical interfaces.
>
> Cc'ing lxc-users (which is probably a better place to ask)
>
> > Lxc version :- 0.6.5
>
> lxc 0.7.1 is also out.
>
> I'm sorry, I know this isn't much help in figuring out the
> exact nature of the problem. Hopefully Cc'ing lxc-users will help.
>
> Cheers,
>         -Matt Helsley
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Lxc-users] PHYS type lxc not working
       [not found]       ` <AANLkTinItYFIWCjJ_bbi0ah7dg98E2I8rYd8WOpjI_DK-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-07-08  7:57         ` atp
  0 siblings, 0 replies; 6+ messages in thread
From: atp @ 2010-07-08  7:57 UTC (permalink / raw)
  To: Sabdar
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	lxc-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

You need to add a macvlan device to the parent device with the same
mode.

So, if you have a macvlan with a link device of eth0, you'll need to
create a macvlan device off eth0 - e.g. eth0:1 that is of mode bridge.

There was an email yesterday that showed how to do that. 

Andy

On Thu, 2010-07-08 at 10:13 +0530, Sabdar wrote:
> ok thanks for the information,i will make a try on 2.6.35-rc4 kernel
> and with latest lxc package.Also can anyone suggest how to make
> macvlan container communicate with the host.i can make macvlan
> communicate with other container using macvlan bridge mode similarly
> is there any way that i can make it to allow communicate with host as
> well.
> 
> 
> Thanks,
> Sabdar.  
> 
> On Thu, Jul 8, 2010 at 4:03 AM, Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> wrote:
>         
>         On Mon, Jul 05, 2010 at 10:09:21AM +0530, Sabdar wrote:
>         >    Hi all,
>         >         I want to use the below configuration in lxc, but
>         the problem is the
>         > physical interface is not getting release after i stop the
>         container like it
>         > happens in macvlan type.The interface gets disappear from
>         host and i can
>         > restore that only if i reboot my system,
>         >
>         > lxc.utsname = gamma
>         > lxc.network.type = phys
>         > lxc.network.flags = up
>         > lxc.network.link = eth0
>         > lxc.network.name = eth0
>         > lxc.network.ipv4 = 192.168.10.1
>         >
>         > My kernel version :- linux-2.6.33
>         
>         
>         Have you tried 2.6.35-rc4? It has Eric's sysfs and netns
>         tagging
>         patches which enhance support for using physical interfaces.
>         
>         Cc'ing lxc-users (which is probably a better place to ask)
>         
>         > Lxc version :- 0.6.5
>         
>         
>         lxc 0.7.1 is also out.
>         
>         I'm sorry, I know this isn't much help in figuring out the
>         exact nature of the problem. Hopefully Cc'ing lxc-users will
>         help.
>         
>         Cheers,
>                -Matt Helsley
> 
> 
> ------------------------------------------------------------------------------
> This SF.net email is sponsored by Sprint
> What will you do first with EVO, the first 4G phone?
> Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> _______________________________________________ Lxc-users mailing list Lxc-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/lxc-users
Andrew Phillips
Head of Systems

www.lmax.com 

Office: +44 203 1922509
Mobile: +44 (0)7595 242 900

LMAX | Level 2, Yellow Building | 1 Nicholas Road | London | W11 4AN




The information in this e-mail and any attachment is confidential and is intended only for the named recipient(s). The e-mail may not be disclosed or used by any person other than the addressee, nor may it be copied in any way. If you are not a named recipient please notify the sender immediately and delete any copies of this message. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. Any view or opinions presented are solely those of the author and do not necessarily represent those of the company.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Lxc-users] PHYS type lxc not working
       [not found]         ` <1278575867.29985.2.camel-o/rHpXPxcZkmkrlRH0t4nw@public.gmane.org>
@ 2010-07-19  7:21           ` Sabdar
       [not found]             ` <AANLkTimQkO58LbEaEK95XJKA-03o5ZNRBOXZGp28nO49-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Sabdar @ 2010-07-19  7:21 UTC (permalink / raw)
  To: atp
  Cc: containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	lxc-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

Hi,
     i tried the same but by upgrading to the latest ip utility and its
works fine as you specified.With the old ip utility the "link add" commands
fails,Thanks for the help.

I tried "PHYS" in the kernel version 2.6.35-rc4 and phys seems to work but
with a problem ie) the working configuration is as follows,

lxc.utsname = gamma
lxc.network.type = phys
lxc.network.flags = up
*lxc.network.link = eth0*
*lxc.network.name* <http://lxc.network.name/>* = eth0*
lxc.network.ipv4 = 192.168.10.1

The same when we change as below  fails to release the host interface after
lxc is stopped

lxc.utsname = gamma
lxc.network.type = phys
lxc.network.flags = up
*lxc.network.link = eth1*
*lxc.network.name* <http://lxc.network.name/>* = eth0*
lxc.network.ipv4 = 192.168.10.1

Instead i see an interface as dev3 in my host after the lxc is stopped.Is it
necessary that both the network.link and network.name has to be same in the
case of "PHYS".

Thanks,
Sabdar.


On Thu, Jul 8, 2010 at 1:27 PM, atp <Andrew.Phillips-xheW4WVAX9Y@public.gmane.org> wrote:

> You need to add a macvlan device to the parent device with the same
> mode.
>
> So, if you have a macvlan with a link device of eth0, you'll need to
> create a macvlan device off eth0 - e.g. eth0:1 that is of mode bridge.
>
> There was an email yesterday that showed how to do that.
>
> Andy
>
> On Thu, 2010-07-08 at 10:13 +0530, Sabdar wrote:
> > ok thanks for the information,i will make a try on 2.6.35-rc4 kernel
> > and with latest lxc package.Also can anyone suggest how to make
> > macvlan container communicate with the host.i can make macvlan
> > communicate with other container using macvlan bridge mode similarly
> > is there any way that i can make it to allow communicate with host as
> > well.
> >
> >
> > Thanks,
> > Sabdar.
> >
> > On Thu, Jul 8, 2010 at 4:03 AM, Matt Helsley <matthltc-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
> > wrote:
> >
> >         On Mon, Jul 05, 2010 at 10:09:21AM +0530, Sabdar wrote:
> >         >    Hi all,
> >         >         I want to use the below configuration in lxc, but
> >         the problem is the
> >         > physical interface is not getting release after i stop the
> >         container like it
> >         > happens in macvlan type.The interface gets disappear from
> >         host and i can
> >         > restore that only if i reboot my system,
> >         >
> >         > lxc.utsname = gamma
> >         > lxc.network.type = phys
> >         > lxc.network.flags = up
> >         > lxc.network.link = eth0
> >         > lxc.network.name = eth0
> >         > lxc.network.ipv4 = 192.168.10.1
> >         >
> >         > My kernel version :- linux-2.6.33
> >
> >
> >         Have you tried 2.6.35-rc4? It has Eric's sysfs and netns
> >         tagging
> >         patches which enhance support for using physical interfaces.
> >
> >         Cc'ing lxc-users (which is probably a better place to ask)
> >
> >         > Lxc version :- 0.6.5
> >
> >
> >         lxc 0.7.1 is also out.
> >
> >         I'm sorry, I know this isn't much help in figuring out the
> >         exact nature of the problem. Hopefully Cc'ing lxc-users will
> >         help.
> >
> >         Cheers,
> >                -Matt Helsley
> >
> >
> >
> ------------------------------------------------------------------------------
> > This SF.net email is sponsored by Sprint
> > What will you do first with EVO, the first 4G phone?
> > Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
> > _______________________________________________ Lxc-users mailing list
> Lxc-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/lxc-users
> Andrew Phillips
> Head of Systems
>
> www.lmax.com
>
> Office: +44 203 1922509
> Mobile: +44 (0)7595 242 900
>
> LMAX | Level 2, Yellow Building | 1 Nicholas Road | London | W11 4AN
>
>
>
>
> The information in this e-mail and any attachment is confidential and is
> intended only for the named recipient(s). The e-mail may not be disclosed or
> used by any person other than the addressee, nor may it be copied in any
> way. If you are not a named recipient please notify the sender immediately
> and delete any copies of this message. Any unauthorized copying, disclosure
> or distribution of the material in this e-mail is strictly forbidden. Any
> view or opinions presented are solely those of the author and do not
> necessarily represent those of the company.
>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [Lxc-users] PHYS type lxc not working
       [not found]             ` <AANLkTimQkO58LbEaEK95XJKA-03o5ZNRBOXZGp28nO49-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
@ 2010-07-19 10:20               ` Daniel Lezcano
  0 siblings, 0 replies; 6+ messages in thread
From: Daniel Lezcano @ 2010-07-19 10:20 UTC (permalink / raw)
  To: Sabdar
  Cc: atp, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA,
	lxc-users-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f

On 07/19/2010 09:21 AM, Sabdar wrote:
> Hi,
>       i tried the same but by upgrading to the latest ip utility and its
> works fine as you specified.With the old ip utility the "link add" commands
> fails,Thanks for the help.
>
> I tried "PHYS" in the kernel version 2.6.35-rc4 and phys seems to work but
> with a problem ie) the working configuration is as follows,
>
> lxc.utsname = gamma
> lxc.network.type = phys
> lxc.network.flags = up
> *lxc.network.link = eth0*
> *lxc.network.name*<http://lxc.network.name/>* = eth0*
> lxc.network.ipv4 = 192.168.10.1
>
> The same when we change as below  fails to release the host interface after
> lxc is stopped
>
> lxc.utsname = gamma
> lxc.network.type = phys
> lxc.network.flags = up
> *lxc.network.link = eth1*
> *lxc.network.name*<http://lxc.network.name/>* = eth0*
> lxc.network.ipv4 = 192.168.10.1
>
> Instead i see an interface as dev3 in my host after the lxc is stopped.Is it
> necessary that both the network.link and network.name has to be same in the
> case of "PHYS".
>    

When the container exits, the kernel "move" the physical interface from 
the container space to the host space.
But within the container, the physical interface is named "eth0", when 
it goes back to the host, the name is conflicting because the host has 
another interface with the eth0 name. So the kernel creates a new name 
(eg. dev3).

When no name is specified in the configuration file, the default name is 
"eth0", you are probably right that would make sense to keep the 
original name for the physical interface instead of defaulting to "eth0" 
but at the cost of having to modify generic scripts within the container 
to match the physical interface name.

IMHO, the kernel should reassign the previous name when the interface 
goes back to the host namespace, and if it conflicts then create a new 
name like "dev%d".

Thanks
   -- Daniel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2010-07-19 10:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-05  4:39 PHYS type lxc not working Sabdar
     [not found] ` <AANLkTino_Vt88QmLt8o4nzLmex2NwBSxkO4bSRBbS-UD-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-07 22:33   ` Matt Helsley
     [not found] ` <20100707223344.GA3129@count0.beaverton.ibm.com>
     [not found]   ` <20100707223344.GA3129-52DBMbEzqgQ/wnmkkaCWp/UQ3DHhIser@public.gmane.org>
2010-07-08  4:43     ` Sabdar
     [not found]       ` <AANLkTinItYFIWCjJ_bbi0ah7dg98E2I8rYd8WOpjI_DK-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-08  7:57         ` [Lxc-users] " atp
     [not found]       ` <1278575867.29985.2.camel@foo.co.tradefair>
     [not found]         ` <1278575867.29985.2.camel-o/rHpXPxcZkmkrlRH0t4nw@public.gmane.org>
2010-07-19  7:21           ` Sabdar
     [not found]             ` <AANLkTimQkO58LbEaEK95XJKA-03o5ZNRBOXZGp28nO49-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-19 10:20               ` Daniel Lezcano

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.