Change in vdsm[master]: safelease: Unbreak safelease on systemd

nsoffer at redhat.com nsoffer at redhat.com
Wed Sep 9 21:18:15 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: safelease: Unbreak safelease on systemd
......................................................................


Patch Set 1: Verified+1

Works - but the timeouts used by safelease helper scripts are not good.

1. spmprotect.sh send SIGUSR1

[2015-09-10 00:02:10] Fencing sdUUID=c69bb1bc-a08c-4824-9345-2598a0459064 id=1 lease_path=/dev/c69bb1bc-a08c-4824-9345-2598a0459064/leases
/bin/kill -USR1 6009

2. Vdsm received SIGUSR1
MainThread::DEBUG::2015-09-10 00:02:10,154::vdsm::73::vds::(sigusr1Handler) Received signal 10

3. Vdsm invoke spmStop

MainThread::INFO::2015-09-10 00:02:10,157::logUtils::48::dispatcher::(wrapper) Run and protect: spmStop(spUUID='e287a509-72eb-4a45-93eb-04f2106343f9', options=None)

4. spmprotect.sh send SIGTERM
 
[2015-09-10 00:02:17] Trying to stop vdsm for sdUUID=c69bb1bc-a08c-4824-9345-2598a0459064 id=1 lease_path=/dev/c69bb1bc-a08c-4824-9345-2598a0459064/leases
/bin/kill 6009

5. Vdsm receive SIGTERM 

MainThread::DEBUG::2015-09-10 00:02:17,157::vdsm::68::vds::(sigtermHandler) Received signal 15

(This is the last log line in vdsm before the next boot)

7. After 2 seconds, 4. spmprotect.sh send SIGKILL

/bin/kill -9 6009

8. But vdsm could run spmstop.sh before it was killed, and spmprotect received a SIGUSR1

User defined signal 1

9. Couple of seconds later, spmpotect rlease the lease

[2015-09-10 00:02:25] releasing lease sdUUID=c69bb1bc-a08c-4824-9345-2598a0459064 id=1 lease_path=/dev/c69bb1bc-a08c-4824-9345-2598a0459064/leases

Finally, vdsm was killed, and the machine was not rebooted.

But this is just luck, another run I tried vdsm was killed before it could run spmstop.sh.

spmprotect.sh must wait much more time before killing vdsm to prevent unwanted reboots.

Sanlock is waiting 40 seconds after sending SIGTERM before sending SIGKILL. Safelease should
use similar timeout.

-- 
To view, visit https://gerrit.ovirt.org/45963
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I230b6909781269531eab3d71b516b28ab22de856
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: No


More information about the vdsm-patches mailing list