[Vserver] /etc/vserver/server/flags not working as expected (fakeinit)

From: Andreas Baetz <lac01_at_web.de>
Date: Tue 28 Mar 2006 - 13:45:49 BST
Message-Id: <200603281445.49617.lac01@web.de>

When using /etc/vserver/vserver/flags, the flags are set, but the flag fakeinit dos not work as expected:

host:/etc/vservers/vserver# cat flags

host:/etc/vservers/vserver# vserver vserver start
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Starting internet superserver: inetd.
Starting deferred execution scheduler: atd.
Starting periodic command scheduler: cron.
host:/etc/vservers/vserver# vserver vserver enter
mesg: /dev/pts/10: Operation not permitted
vserver:/# cat /proc/self/vinfo
XID: 8004
BCaps: 0000000000000001
CCaps: 0000000000000001
CFlags: 0000000202020010
CIPid: 0
vserver:/# ps ax
  PID TTY STAT TIME COMMAND
    1 ? S 0:00 init [2]
21542 ? Ss 0:00 /sbin/syslogd
21581 ? Ss 0:00 /usr/sbin/inetd
21587 ? Ss 0:00 /usr/sbin/cron
21600 pts/10 S 0:00 /bin/bash -login
21620 pts/10 R+ 0:00 ps ax
vserver:/# logout

Now, fakeinit is put into flags:

host:/etc/vservers/vserver# cat flags
fakeinit
host:/etc/vservers/vserver# vserver vserver start
host:/etc/vservers/vserver# Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Starting internet superserver: inetd.
Starting deferred execution scheduler: atd.
Starting periodic command scheduler: cron.

host:/etc/vservers/vserver# vserver vserver enter
mesg: /dev/pts/10: Operation not permitted
vserver:/# cat /proc/self/vinfo
XID: 8004
BCaps: 0000000000000001
CCaps: 0000000000000001
CFlags: 0000000002020010
CIPid: 21945
vserver:/# ps ax
  PID TTY STAT TIME COMMAND
21958 ? Ss 0:00 /sbin/syslogd
21997 ? Ss 0:00 /usr/sbin/inetd
22003 ? Ss 0:00 /usr/sbin/cron
22009 pts/10 R 0:00 /bin/bash -login
22025 pts/10 R+ 0:00 ps ax
vserver:/# logout

Now, 0x10 (fakeinit) is put into flags:

host:/etc/vservers/vserver# cat flags
0x00000010
host:/etc/vservers/vserver# vserver vserver start
Starting system log daemon: syslogd.
Starting kernel log daemon: klogd.
Starting internet superserver: inetd.
Starting deferred execution scheduler: atd.
Starting periodic command scheduler: cron.
host:/etc/vservers/vserver# vserver vserver enter
mesg: /dev/pts/10: Operation not permitted
vserver:/# cat /proc/self/vinfo
XID: 8004
BCaps: 0000000000000001
CCaps: 0000000000000001
CFlags: 0000000202020010
CIPid: 0
vserver:/# ps ax
  PID TTY STAT TIME COMMAND
    1 ? S 0:00 init [2]
22335 ? Ss 0:00 /sbin/syslogd
22374 ? Ss 0:00 /usr/sbin/inetd
22380 ? Ss 0:00 /usr/sbin/cron
22393 pts/10 S 0:00 /bin/bash -login
22408 pts/10 R+ 0:00 ps ax
vserver:/# logout

There are 2 questions:

1) Why does fakeinit not work, while 0x10 does ?
2) Why does 0x10 not set just 0x0000000000000010, but 0x0000000202020010 ?

# vserver-info
Versions:
                   Kernel: 2.6.15.1.060308-bs1
                   VS-API: 0x00020001
             util-vserver: 0.30.209; Jan 8 2006, 12:24:41

Features:
                       CC: gcc, gcc (GCC) 4.0.3 20051201 (prerelease) (Debian 4.0.2-5)
                      CXX: g++, g++ (GCC) 4.0.3 20051201 (prerelease) (Debian 4.0.2-5)
                 CPPFLAGS: ''
                   CFLAGS: '-Wall -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: i486-pc-linux-gnu/i486-pc-linux-gnu
             Use dietlibc: yes
       Build C++ programs: yes
       Build C99 programs: yes
           Available APIs: compat,v11,v13,fscompat,net,oldproc,olduts
            ext2fs Source: e2fsprogs
    syscall(2) invocation: alternative
      vserver(2) syscall#: 273/glibc

Andreas

_______________________________________________
Vserver mailing list
Vserver@list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver
Received on Tue Mar 28 13:46:50 2006

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Tue 28 Mar 2006 - 13:46:55 BST by hypermail 2.1.8