About this list Date view Thread view Subject view Author view Attachment view

From: Oliver Heinz (oliver.heinz_at_schunk.net)
Date: Sun 16 Jan 2005 - 22:45:47 GMT


Herbert Poetzl schrieb:

>On Sun, Jan 16, 2005 at 01:19:38PM +0100, Oliver Heinz wrote:
>
>
>>With vs1.9.3 and 1.9.4-rc1 utils-vserver 0.30 (as included in debian
>>sarge) there seem to be still problems with static Context IDs (you
>>cannot restart the vserver) and stopping the vserver with "vserver name
>>stop" fails (stopping with shutdown -h or halt from within the vserver
>>works btw.)
>>
>>
>
>fails how? with what?
>
>
>
I have a working vserver (named samba) with static Context ID (2). When
I add the fakeinit flag things go strange.
I can start it, but I can't enter with 'vserver samba enter' and can't
stop it properly.

--------------------------
tux:/etc/vservers# vserver samba start
WARNING: can not find configuration, assuming legacy method
Starting the virtual server samba
Server samba is not running
ipv4root is now 192.168.2.51
Host name is now samba
New security context is 2

tux:/etc/vservers# vserver samba enter
WARNING: can not find configuration, assuming legacy method
ipv4root is now 192.168.2.51
chcontext: vc_new_s_context(): Operation not permitted
---------------------------

When I login via ssh and stop it with 'shutdown -h' it get's cleanly
stopped, but I cannot start the vserver again:

-----------------------
tux:/etc/vservers# vserver samba start
WARNING: can not find configuration, assuming legacy method
Starting the virtual server samba
Server samba is not running
ipv4root is now 192.168.2.51
Host name is now samba
chcontext: vc_new_s_context(): Operation not permitted
-----------------------

this does only happen when I do not use static Context IDs. Without
static IDs the next ID is incremented each time.

When I try to stop it from the host system with 'vserver samba stop' I
get an error.
(example this time with dynamic id, I did'n feel like rebooting the
server each time)

-----------------------
tux:/etc/vservers# vserver samba start
WARNING: can not find configuration, assuming legacy method
Starting the virtual server samba
Server samba is not running
ipv4root is now 192.168.2.51
Host name is now samba
New security context is 49152
tux:/etc/vservers# vserver samba stop
WARNING: can not find configuration, assuming legacy method
Stopping the virtual server samba
Server samba is running
ipv4root is now 192.168.2.51
New security context is 49152
sleeping 5 seconds
Killing all processes
kill -TERM /srv/vservers/samba/bin/bash[4628]
kill -TERM /srv/vservers/samba/bin/bash[4671]
kill -TERM /srv/vservers/samba/bin/sleep[4673]
kill init, pid 4276
/usr/lib/util-vserver/legacy/vserverkillall: line 59: kill: (4276) -
Kein passender Prozess gefunden
tux:/etc/vservers# vserver-stat
CTX PROC VSZ RSS userTIME sysTIME UPTIME NAME
0 68 67.8M 5.1K 0m05s52 0m02s70 17m19s12 root server
49152 1 1.4M 132 0m00s69 0m00s35 0m22s66
--------------------

When I try t see what process is still running I get an:

--------------------
tux:/usr/src/packages/util-vserver-0.30.196# chcontext --xid 49152 ps aux
vcontext: vc_create_context(): Invalid argument
--------------------

Info about my Configuration:

-------------------
tux:~# vserver-info
Versions:
                   Kernel: 2.6.10-vs1.9.4-rc1-1-686-smp
                   VS-API: 0x00010025
             util-vserver: 0.30.196; Jan 16 2005, 22:32:32

Features:
                       CC: gcc, gcc (GCC) 3.3.5 (Debian 1:3.3.5-5)
                      CXX: g++, g++ (GCC) 3.3.5 (Debian 1:3.3.5-5)
                 CPPFLAGS: ''
                   CFLAGS: '-g -O2 -std=c99 -Wall -pedantic -W'
                 CXXFLAGS: '-g -O2 -ansi -Wall -pedantic -W
-fmessage-length=0'
               build/host: i686-pc-linux-gnu/i686-pc-linux-gnu
             Use dietlibc: no (diet version 0.27-7) (you have been warned)
       Build C++ programs: yes
       Build C99 programs: yes
           Available APIs: compat,v11,v13,fscompat,net,oldproc,olduts
            ext2fs Source: e2fsprogs
    syscall(2) invocation: fast
      vserver(2) syscall#: 273/glibc

Paths:
                   prefix: /usr/local
        sysconf-Directory: /etc
            cfg-Directory: /etc/vservers
         initrd-Directory: $(sysconfdir)/init.d
       pkgstate-Directory: ${prefix}/var/run/vservers
            Kernelheaders:
/lib/modules/2.6.10-vs1.9.4-rc1-1-686-smp/build/include
          vserver-Rootdir: /srv/vservers/
---------------

and the vserver samba:

---------------
tux:/etc/vservers# cat samba.conf
S_HOSTNAME="samba"
IPROOT="192.168.2.51"
IPROOTDEV="eth0"
ONBOOT="no"
S_NICE=""
S_FLAGS="lock nproc fakeinit"
ULIMIT="-H -n 1024"
S_CAPS="CAP_NET_RAW CAP_SYS_ADMIN"
S_CONTEXT="2"
# *NOT* DNS domain name, for NIS only
S_DOMAINNAME=""
---------------

>>I need fakeinit because monit (the system monitoring utility) relies on
>>the presence of process id 1 (init). Is there another way to achive
>>this, like unhiding the real init for all contexts (security is not an
>>issue here).
>>
>>
>
>VXF_INFO_INIT it what you want here (which blends
>in the init process from the host)
>
>
>
fakeinit seems to set VXF_INFO_INIT. But how do I use it without
fakeinit. Add an another entry in ./lib/cflags-v13.c ?

TIA,
Oliver

>HTH,
>Herbert
>
>

_______________________________________________
Vserver mailing list
Vserver_at_list.linux-vserver.org
http://list.linux-vserver.org/mailman/listinfo/vserver


About this list Date view Thread view Subject view Author view Attachment view
[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Sun 16 Jan 2005 - 22:46:12 GMT by hypermail 2.1.3