Subject: Re: [vserver] reboot -f in guest not working with recent Vserver versions
From: Herbert Poetzl <herbert@13thfloor.at>
Date: Wed, 21 Dec 2011 15:31:18 +0100

On Wed, Dec 21, 2011 at 02:43:01PM +0900, Christian Balzer wrote:

> Hello,

> Client OS is Debian Squeeze, identical install in both cases.
> Host OS is also Debian Squeeze with custom kernel. 
> Older one runs:

>                    Kernel: 2.6.33.5-vs2.3.0.36.30.4
>                    VS-API: 0x00020305
>              util-vserver: 0.30.215; Jun 18 2010, 13:35:17

> Newer one runs:
>                    Kernel: 3.0.7-vs2.3.1
>                    VS-API: 0x00020308
>                       VCI: 0x0000000013001f11
>              util-vserver: 0.30.216-pre2986; Aug 29 2011, 07:49:51

> As the tin says, reboot -f inside a guest works on the old one,
> but not on the new one.
> That is, on the new one it will shut down, but not restart.

no need to mention that you want newer util-vserver for
recent kernels, but the problem seems to be cgroup
related (and a workaround in util-vserver might be
required)

you can enable debugging with the following commands:

mkdir -p /etc/vservers/.defaults/apps/vshelper
ln -s /var/log/vshelper.log /etc/vservers/.defaults/apps/vshelper/logfile

mkdir -p /etc/vservers/<name>/apps/vshelper
touch /etc/vservers/<name>/apps/vshelper/debug

I expect the output to be something like this:

Wed Dec 21 16:56:21 UTC 2011: vshelper restart 40003
Restarting vserver '/etc/vservers/foo'
/usr/lib64/util-vserver/vserver.functions: line 1603: echo: write error: Invalid argument

Failed to start vserver 'foo'

and the line mentioned above to be 
	echo "$$" > "$mnt/$CGROUP_BASE$name/tasks"

haven't had the time to look into the actual issue yet,
but it might as well be a kernel issue (i.e. the vshelper
executing in the wrong cgroup/namespace)

HTH,
Herbert

> Regards,

> Christian
> -- 
> Christian Balzer        Network/Systems Engineer                
> chibi@gol.com   	Global OnLine Japan/Fusion Communications
> http://www.gol.com/