Re: [lxc-users] lxcbr0 doesn't exist after upgrade to 15.10

2015-10-26 Thread Fajar A. Nugraha
On Tue, Oct 27, 2015 at 6:20 AM, Norberto Bensa 
wrote:

> This problem is related to network-manager (NM) or systemd.
>
> I tried to disable NM but I couldn't. NM started with every boot (does
> systemd depend on it?). I switched to upstart. Now NM is down, lxcbr0
> starts up.
>
> Everything works as it used to be including my routes and dns servers.
>
>
Workaround:

- edit /etc/network/interfaces, add "iface lxcbr0 inet manual"
- reboot

-- 
Fajar
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] set "lxc.aa_allow_incomplete = 1" - where do I add it for lxd?

2015-10-26 Thread Tomasz Chmielewski

Thanks, it worked.

How do I set other "lxc-style" values in lxd, like for example:

lxc.network.ipv4 = 10.0.12.2/24
lxc.network.ipv4.gateway = 10.0.12.1
lxc.network.ipv6 = :::::55
lxc.network.ipv6.gateway = :2345:6789:::2


Same "lxc config set containername", i.e.:

lxc config set x1 raw.lxc "lxc.network.ipv4 = 10.0.12.2/24"
lxc config set x1 raw.lxc "lxc.network.ipv4.gateway = 10.0.12.1"
lxc config set x1 raw.lxc "lxc.network.ipv6 = :::::55"
lxc config set x1 raw.lxc "lxc.network.ipv6.gateway = 
:2345:6789:::2"



Or is there some other, more recommended way?

Tomasz


On 2015-10-27 02:35, Serge Hallyn wrote:

That's an ideal use for 'lxc.raw'.

lxc config set x1 raw.lxc "lxc.aa_allow_incomplete=1"

The lxc configuration for lxd containers is auto-generated on each 
container

start, as is the apparmor policy.  The contents of the 'lxc.raw' config
item are appended to the auto-generated config.

Quoting Tomasz Chmielewski (man...@wpkg.org):

I get the following when starting a container with lxd:

 Incomplete AppArmor support in your kernel
 If you really want to start this container, set
 lxc.aa_allow_incomplete = 1
 in your container configuration file


Where exactly do I set this with lxd? I don't really see a "config"
file, like with lxc. Is it "metadata.yaml"? If so - how to set it
there?


Tomasz Chmielewski
http://wpkg.org

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users


___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

[lxc-users] re lxcbr0 doesn't exist after upgrade to 15.10

2015-10-26 Thread brian mullan
Norberto

Great coincidence as I read your msg to the lxc-users list about the lxcbr0
bridge
disappearing after upgrade to Ubuntu 15.10.

I just finished upgrading one of my machines to 15.10 this weekend and
today I noticed
I couldn't start any containers.

Then I noticed there is no lxcbr0 any longer.

I followed same steps as you w/ service lxc-net stop/start etc also.

I looked on launchpad for any bugs files on lxc for this but didn't spot
anything yet however
there were several mentions of one or more systemd problems

$ lsb_release -d
Description:Ubuntu 15.10

$ sudo lxc --version
0.20

$ uname -a
Linux server3  4.2.0-16-generic #19-Ubuntu SMP Thu Oct 8 15:35:06 UTC 2015
x86_64 x86_64 x86_64 GNU/Linux

$ sudo lxc-start -n test
lxc-start: lxc_start.c: main: 344 The container failed to start.
lxc-start: lxc_start.c: main: 346 To get more details, run the container in
foreground mode.
lxc-start: lxc_start.c: main: 348 Additional information can be obtained by
setting the --logfile and --logpriority options.

# the logfile I created contained this...

$ more *.log
  lxc-start 1445897600.815 ERRORlxc_conf -
conf.c:instantiate_veth:2621 - failed to attach 'vethTB8U9R' to the bridge
'lx
cbr0': Operation not permitted
  lxc-start 1445897600.846 ERRORlxc_conf -
conf.c:lxc_create_network:2904 - failed to create netdev
  lxc-start 1445897600.846 ERRORlxc_start - start.c:lxc_spawn:920 -
failed to create the network
  lxc-start 1445897600.846 ERRORlxc_start -
start.c:__lxc_start:1172 - failed to spawn 'test'
  lxc-start 1445897600.846 ERRORlxc_start_ui - lxc_start.c:main:344
- The container failed to start.
  lxc-start 1445897600.846 ERRORlxc_start_ui - lxc_start.c:main:348
- Additional information can be obtained by setting t
he --logfile and --logpriority options.
  lxc-start 1445899155.144 ERRORlxc_conf -
conf.c:instantiate_veth:2621 - failed to attach 'vethGQAYMM' to the bridge
'lx
cbr0': Operation not permitted
  lxc-start 1445899155.170 ERRORlxc_conf -
conf.c:lxc_create_network:2904 - failed to create netdev
  lxc-start 1445899155.170 ERRORlxc_start - start.c:lxc_spawn:920 -
failed to create the network
  lxc-start 1445899155.170 ERRORlxc_start -
start.c:__lxc_start:1172 - failed to spawn 'test'
  lxc-start 1445899160.176 ERRORlxc_start_ui - lxc_start.c:main:344
- The container failed to start.
  lxc-start 1445899160.176 ERRORlxc_start_ui - lxc_start.c:main:346
- To get more details, run the container in foregroun
d mode.
  lxc-start 1445899160.176 ERRORlxc_start_ui - lxc_start.c:main:348
- Additional information can be obtained by setting t
he --logfile and --logpriority options.

Brian
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] lxcbr0 doesn't exist after upgrade to 15.10

2015-10-26 Thread Norberto Bensa
This problem is related to network-manager (NM) or systemd.

I tried to disable NM but I couldn't. NM started with every boot (does
systemd depend on it?). I switched to upstart. Now NM is down, lxcbr0
starts up.

Everything works as it used to be including my routes and dns servers.

2015-10-26 19:28 GMT-03:00 Norberto Bensa :
> zoolook@venkman:~$ LC_ALL=C ifconfig lxcbr0
> lxcbr0: error fetching interface information: Device not found
>
> zoolook@venkman:~$ LC_ALL=C sudo service lxc-net start
>
> zoolook@venkman:~$ LC_ALL=C ifconfig lxcbr0
> lxcbr0: error fetching interface information: Device not found
>
> zoolook@venkman:~$ LC_ALL=C sudo service lxc-net stop
>
> zoolook@venkman:~$ LC_ALL=C sudo service lxc-net start
>
> zoolook@venkman:~$ LC_ALL=C ifconfig lxcbr0
> lxcbr0Link encap:Ethernet  HWaddr 5e:6c:12:20:f1:a1
>   UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>   RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>   TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
>   collisions:0 txqueuelen:0
>   RX bytes:0 (0.0 B)  TX bytes:432 (432.0 B)
>
>
> And even then, note that there's no IP assigned. Of course my
> container do not start anymore (unless I set the IP address manually).
>
> How do I debug this?
>
> Thanks!
> Norberto
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

[lxc-users] lxcbr0 doesn't exist after upgrade to 15.10

2015-10-26 Thread Norberto Bensa
zoolook@venkman:~$ LC_ALL=C ifconfig lxcbr0
lxcbr0: error fetching interface information: Device not found

zoolook@venkman:~$ LC_ALL=C sudo service lxc-net start

zoolook@venkman:~$ LC_ALL=C ifconfig lxcbr0
lxcbr0: error fetching interface information: Device not found

zoolook@venkman:~$ LC_ALL=C sudo service lxc-net stop

zoolook@venkman:~$ LC_ALL=C sudo service lxc-net start

zoolook@venkman:~$ LC_ALL=C ifconfig lxcbr0
lxcbr0Link encap:Ethernet  HWaddr 5e:6c:12:20:f1:a1
  UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
  RX packets:0 errors:0 dropped:0 overruns:0 frame:0
  TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
  collisions:0 txqueuelen:0
  RX bytes:0 (0.0 B)  TX bytes:432 (432.0 B)


And even then, note that there's no IP assigned. Of course my
container do not start anymore (unless I set the IP address manually).

How do I debug this?

Thanks!
Norberto
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] Multiple AUFS branches?

2015-10-26 Thread Shimin Guo
The current implementation seems to support an AUFS rootfs with only two
branches, one rw and one ro. Is that true? Are there workarounds to have
multiple ro branches and a rw branch at the top?

Thanks!
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] set "lxc.aa_allow_incomplete = 1" - where do I add it for lxd?

2015-10-26 Thread Serge Hallyn
That's an ideal use for 'lxc.raw'.

lxc config set x1 raw.lxc "lxc.aa_allow_incomplete=1"

The lxc configuration for lxd containers is auto-generated on each container
start, as is the apparmor policy.  The contents of the 'lxc.raw' config
item are appended to the auto-generated config.

Quoting Tomasz Chmielewski (man...@wpkg.org):
> I get the following when starting a container with lxd:
> 
>  Incomplete AppArmor support in your kernel
>  If you really want to start this container, set
>  lxc.aa_allow_incomplete = 1
>  in your container configuration file
> 
> 
> Where exactly do I set this with lxd? I don't really see a "config"
> file, like with lxc. Is it "metadata.yaml"? If so - how to set it
> there?
> 
> 
> Tomasz Chmielewski
> http://wpkg.org
> 
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] Container doesn't connect to bridge

2015-10-26 Thread Benoit GEORGELIN - Association Web4all
>From what I understand , there is two options : 

- lxc configuration file 
- network config file into the container 

I don't think you can mix both and you are better to stick with one solution . 



Cordialement, 

Benoît Georgelin - 
Afin de contribuer au respect de l'environnement, merci de n'imprimer ce mail 
qu'en cas de nécessité 


De: "Joshua Schaeffer"  
À: "lxc-users"  
Envoyé: Lundi 26 Octobre 2015 12:26:18 
Objet: Re: [lxc-users] Container doesn't connect to bridge 

I already have networking setup in the container: 
root@thinkweb:/# cat /etc/network/interfaces 
auto lo 
iface lo inet loopback 

auto eth0 
iface eth0 inet static 
address 192.168.54.110 
netmask 255.255.255.128 
gateway 192.168.54.1 

When I add lxc.network.ipv4.gateway to the config it now works. Why would 
adding the gateway to the config work, but not in interfaces. I've never needed 
to add the gateway to the config before. 


On Sat, Oct 24, 2015 at 12:50 AM, Fajar A. Nugraha < l...@fajar.net > wrote: 



On Sat, Oct 24, 2015 at 5:34 AM, Joshua Schaeffer < jschaeffer0...@gmail.com > 
wrote: 

BQ_BEGIN

I set the virtual switch that the host uses to promiscuous mode and I can ping 
the gateway and other machines on my subnet from the container, however I still 
cannot get to the outside world: 





BQ_BEGIN

Is this because of my routing table on the container? 


BQ_END

BQ_BEGIN


BQ_BEGIN


BQ_BEGIN


BQ_BEGIN

Container: 
root@thinkweb:~# route -n 
Kernel IP routing table 
Destination Gateway Genmask Flags Metric Ref Use Iface 
192.168.54.0 0.0.0.0 255.255.255.128 U 0 0 0 eth0 


BQ_END


BQ_END


BQ_END


BQ_END


BQ_BEGIN


BQ_BEGIN


BQ_BEGIN


BQ_BEGIN


BQ_BEGIN

lxc.network.ipv4 = 192.168.54.110/25 

BQ_END


BQ_END


BQ_END


BQ_END


BQ_END


Obviously. 

You either need "lxc.network.ipv4.gateway" (see "man lxc.container.conf"), or 
setup networking inside the container (e.g on /etc/network/interfaces) 

-- 
Fajar 

___ 
lxc-users mailing list 
lxc-users@lists.linuxcontainers.org 
http://lists.linuxcontainers.org/listinfo/lxc-users 

BQ_END



___ 
lxc-users mailing list 
lxc-users@lists.linuxcontainers.org 
http://lists.linuxcontainers.org/listinfo/lxc-users 
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

[lxc-users] set "lxc.aa_allow_incomplete = 1" - where do I add it for lxd?

2015-10-26 Thread Tomasz Chmielewski

I get the following when starting a container with lxd:

 Incomplete AppArmor support in your kernel
 If you really want to start this container, set
 lxc.aa_allow_incomplete = 1
 in your container configuration file


Where exactly do I set this with lxd? I don't really see a "config" 
file, like with lxc. Is it "metadata.yaml"? If so - how to set it there?



Tomasz Chmielewski
http://wpkg.org

___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users

Re: [lxc-users] Container doesn't connect to bridge

2015-10-26 Thread Joshua Schaeffer
I already have networking setup in the container:

root@thinkweb:/# cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
 address 192.168.54.110
 netmask 255.255.255.128
 gateway 192.168.54.1

When I add lxc.network.ipv4.gateway to the config it now works. Why would
adding the gateway to the config work, but not in interfaces. I've never
needed to add the gateway to the config before.


On Sat, Oct 24, 2015 at 12:50 AM, Fajar A. Nugraha  wrote:

> On Sat, Oct 24, 2015 at 5:34 AM, Joshua Schaeffer <
> jschaeffer0...@gmail.com> wrote:
>
>> I set the virtual switch that the host uses to promiscuous mode and I can
>> ping the gateway and other machines on my subnet from the container,
>> however I still cannot get to the outside world:
>>
>>
>
>> Is this because of my routing table on the container?
>>
>> Container:
> root@thinkweb:~# route -n
> Kernel IP routing table
> Destination Gateway Genmask Flags Metric Ref
>  Use Iface
> 192.168.54.00.0.0.0 255.255.255.128 U 0  0
>  0 eth0
>
>
>
>
>> lxc.network.ipv4   = 192.168.54.110/25
>> 
>>
>
>
> Obviously.
>
> You either need "lxc.network.ipv4.gateway" (see "man lxc.container.conf"),
> or setup networking inside the container (e.g on /etc/network/interfaces)
>
> --
> Fajar
>
> ___
> lxc-users mailing list
> lxc-users@lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
___
lxc-users mailing list
lxc-users@lists.linuxcontainers.org
http://lists.linuxcontainers.org/listinfo/lxc-users