Subject: Re: [vserver] Network doesn't work / SIOCSIFADDR: Permission denied & vserver-stat -> kernel freeze
From: Herbert Poetzl <herbert@13thfloor.at>
Date: Fri, 12 Feb 2010 09:05:36 +0100

On Fri, Feb 12, 2010 at 09:37:12AM +0200, Jussi Räsänen wrote:
> Hi,

> I've setup vserver sparc/gentoo container on a gentoo sparc host, 
> when I run vserver-stat, the kernel freezes completely, no error 
> messages or such.

try with a more recent kernel patch and if the issue
persists, let us know

> And in the container, when running: "ifconfig eth0 81.17x.xxx.xxx
> broadcast 81.17x.xxx.xxx netmask 255.255.xxx.xxx up"

> I get:

> SIOCSIFADDR: Permission denied
> SIOCSIFFLAGS: Permission denied
> SIOCSIFBRDADDR: Permission denied
> SIOCSIFFLAGS: Permission denied
> SIOCSIFNETMASK: Permission denied
> SIOCSIFFLAGS: Permission denied

which is expected behaviour, as your guest is not
allowed to mess with the network configuration

> Also when booting the server:
> Error opening file for reading; filename='/proc/kmsg',
> error='Operation not permitted (1)'

which is also expected, unless you enable the syslog
virtualization (a guest does not get any kernel
messages)

> Error initializing source driver; source='src', id='src#2'
> Error initializing message pipeline;

> Everything else than internet connection works just fine. After 
> I set up the correct values to: /etc/vservers/xxx/interfaces/0 
> I get the correct netmask,bcast and ip to eth0, but the network
> doesn't work (doesn't ping anything else than itself) is it 
> cause it can't open some device or such?

nope, more likely it's some kind of misconfiguration
on your side ...

 a) what exactly is in your /etc/vservers/xxx/interfaces/0
 b) can you ping the host (with numeric IP != guest IP)?
 c) can you ping e.g. www.google.com?
 d) with a numeric IP?

> uname -a:
> Linux localhost 2.6.31-vs2.3.0.36.23-gentoo #1 SMP Wed Jan 13 14:51:30
> EET 2010 sparc64 sun4v UltraSparc T2 (Niagara2) GNU/Linux

> VServer-info:

> Versions:
>                    Kernel: 2.6.31-vs2.3.0.36.23-gentoo
>                    VS-API: 0x00020304
>              util-vserver: 0.30.216-pre2864; Jan 18 2010, 08:35:31

> Features:
>                        CC: gcc, gcc (Gentoo 4.3.4 p1.0, pie-10.1.5) 4.3.4
>                       CXX: g++, g++ (Gentoo 4.3.4 p1.0, pie-10.1.5) 4.3.4
>                  CPPFLAGS: ''
>                    CFLAGS: '-g -O2 -std=c99 -Wall -pedantic -W -funit-at-a-time'
>                  CXXFLAGS: '-g -O2 -ansi -Wall -pedantic -W
> -fmessage-length=0 -funit-at-a-time'
>                build/host: sparc64-unknown-linux-gnu/sparc64-unknown-linux-gnu
>              Use dietlibc: yes
>        Build C++ programs: yes
>        Build C99 programs: yes
>            Available APIs: compat,v11,fscompat,v13,net,v21,v22,v23,netv2
>             ext2fs Source: e2fsprogs
>     syscall(2) invocation: alternative
>       vserver(2) syscall#: 267/fallback
>                crypto api: nss
>           python bindings: no
>    use library versioning: yes
> 
> Paths:
>                    prefix:
>         sysconf-Directory: ${prefix}/etc
>             cfg-Directory: ${prefix}/etc/vservers
>          initrd-Directory: $(sysconfdir)/init.d
>        pkgstate-Directory: ${prefix}/var/run/vservers
>           vserver-Rootdir: /vservers

> Thanks for any help :)

best,
Herbert

> -- 
> Jussi Räsänen