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

From: Herbert Poetzl (herbert_at_13thfloor.at)
Date: Sat 12 Feb 2005 - 17:42:39 GMT


On Sat, Feb 12, 2005 at 04:17:13PM +0100, Oliver Heinz wrote:
> Today I did some test the current release both the patch and util-vserver.
>
>
> vserver stop gives me an error:
>
> ....
> ++ test -n 0 -ne 0
> /usr/local/sbin/vserver: line 740: test: too many arguments
> ...
>
> which comes from vserver.functions:
> elif test -n "${#INITCMD_STOP_SYNC[@]}" -ne 0; then
>
> Is there just the first -n too much?!

seems so ... thanks for the info ...

> My second Problem is that the fakeinit still seems not to work
> for me, if I specify fakeinit in the flags it is recognized
> by the corresponding function in vserver.functions but I still
> can't see an init on pid 1 inside the vserver.

hmm, you should change the initstyle from sysv
to plain too, because otherwise the 'init' task
will be the runlevel script (/etc/init.d/rc) which
will not last long enough to be noticed (as init
process ;)

> With old style configuration this works.

well, the question here is, does this start an
init or just show you a 'fake' init ...

because the flag is really misleading and if it
wasn't for compatibility, I would have removed
it at once ...

> What am I doing wrong?
>
> spacelord:/usr/local/lib/util-vserver# vserver mail start 2>&1 | grep -i
> fakeinit
> ++ declare -a 'OPTS_VATTRIBUTE=(--flag fakeinit)'
> ++ _IS_FAKEINIT=
> ++ _IS_FAKEINIT=1
> ++ CHCONTEXT_INIT_OPTS=(--disconnect --flag fakeinit)
> ++ /usr/local/sbin/chbind --silent --ip 192.168.2.251
> -- /usr/local/sbin/vcontext --create --silent --xid 4
> -- /usr/local/sbin/vnamespace --set -- /usr/local/sbin/vlimit
> --dir /etc/vservers/mail/rlimits --missingok -- /usr/local/sbin/vsched --xid
> self -- /usr/local/sbin/vuname --xid self --dir /etc/vservers/mail/uts
> --missingok -- /usr/local/sbin/vuname --xid self --set -t
> context=/etc/vservers/mail -- /usr/local/sbin/vattribute --set --secure
> --flag fakeinit --bcap CAP_NET_RAW --bcap CAP_NET_ADMIN --bcap CAP_SYS_ADMIN
> -- /usr/local/lib/util-vserver/save_ctxinfo /etc/vservers/mail /usr/bin/env
> -i -- /usr/local/sbin/vcontext --migrate-self --endsetup --chroot --silent
> --initpid --disconnect -- /etc/init.d/rc 3
                                ~~~~~~~~~~ <- the init process ;)
>
>
>
> spacelord:/usr/local/lib/util-vserver# chcontext --xid 4 ps aux
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> root 9870 0.0 0.0 1624 588 ? Ss 16:11 0:00 /sbin/syslogd
> root 24253 0.0 0.0 1572 428 ? Ss 16:11 0:00 /usr/sbin/inetd
> daemon 28817 0.0 0.0 1760 636 ? Ss 16:11 0:00 /usr/sbin/atd
> root 13778 0.0 0.0 1816 724 ? Ss 16:11 0:00 /usr/sbin/cron
> root 10208 0.0 0.0 2372 724 pts/2 R+ 16:12 0:00 ps aux
>
>
>
> spacelord:/usr/local/lib/util-vserver# chcontext --xid 4 pstree
> ??????????atd
> ??????cron
> ??????inetd
> ??????syslogd
>
>
> Shouldn't the following show me an init-process even if not specified in the
> vserver config?

$ chcontext --flag fakeinit ps auxwww
New security context is 49153
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 0.8 2408 500 ? R 17:34 0:00 ps auxwww

of course, once the init process is gone, you won't
see it in any list ... even if the context remains ...

$ chcontext --flag fakeinit bash -c "sleep 100 &"
New security context is 49155

$ vcontext --migrate --xid 49155 ps auxwww
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 47 0.6 0.7 2748 436 ? S 17:40 0:00 sleep 100
root 48 0.0 1.0 2476 668 ? R 17:40 0:00 ps auxwww

> spacelord:/usr/local/lib/util-vserver# chcontext --flag fakeinit --xid 4 ps
> aux
> USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
> root 9870 0.0 0.0 1624 588 ? Ss 16:11 0:00 /sbin/syslogd
> root 24253 0.0 0.0 1572 428 ? Ss 16:11 0:00 /usr/sbin/inetd
> daemon 28817 0.0 0.0 1760 636 ? Ss 16:11 0:00 /usr/sbin/atd
> root 13778 0.0 0.0 1816 724 ? Ss 16:11 0:00 /usr/sbin/cron
> root 32713 0.0 0.0 2372 724 pts/2 R+ 16:12 0:00 ps aux

HTH,
Herbert

> TIA,
> Oliver
> _______________________________________________
> Vserver mailing list
> Vserver_at_list.linux-vserver.org
> http://list.linux-vserver.org/mailman/listinfo/vserver
_______________________________________________
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 Sat 12 Feb 2005 - 17:42:58 GMT by hypermail 2.1.3