Subject: Re: [vserver] Virtual crash testing
From: Roman Fiedler <roman.fiedler@telbiomed.at>
Date: Mon, 14 Jul 2008 12:42:22 +0200

Thanks for your reply,

Remigiusz Modrzejewski wrote:
> On Monday 14 of July 2008 11:57:39 Roman Fiedler wrote:
>> is there an easy way to simulate a vserver guest crash for
>> recovery/failover testing? It should just immediately terminate all apps
>> in the context so that the programs have no time to react, e.g. to do
>> clean shutdown or actively close files or network connections.
>>
>> lg roman
>>
>> PS: As a workaround I might suspend all processes and then KILL/SEGV
>> them so that no stopped parent can react on the child's death.
>
> Shouldn't that be as easy as /vkill --xid CONTEXT -9 -1/?

I do not know exactly, if doing this could allow parent/child or 
multithreaded processes to react the signal. Docu states that 
SIGKILL/STOP cannot be ignored or handled by a process directly, but 
another process might do it if not all processes are killed at exactly 
the same time.

Another thing is that I would expect the kernel to shutdown network 
connections of a killed process cleanly. But hanging tcp connections 
might be an interesting issue with failover. I guess that adding a 
firewall rule that blocks any network traffic from/to the vserver just 
before killing the processes will do it there.

For standard testing, I guess that vkill is good enough, one might think 
of additional tests or own hardware/vmware that can be powered down for 
further testing.

> Kind regards,
> Remigiusz 'lRem' Modrzejewski

lg