Change in vdsm[master]: clientIF: Clean up shutdown process

danken at redhat.com danken at redhat.com
Mon Mar 31 17:01:56 UTC 2014


Dan Kenigsberg has submitted this change and it was merged.

Change subject: clientIF: Clean up shutdown process
......................................................................


clientIF: Clean up shutdown process

clientIF.serve used to check if shutdown process has started once every
3 seconds, leading to unwanted delay, that may cause vdsm to be killed
before a profile was written.

This patch changes clientIF.serve to start the bindings and return,
allowing the upper layer to wait for a shutdown signal in a more
efficiant way. This allows stopping a profile when shutdown signal is
received, before starting the shutdown process, ensuring that a profile
is written even if shutdown process got stuck and vdsm is killed.

This way is also more safe, as prepareForShutdown is called from the
main thread, instead of the signal handler context, where it is not safe
to call any code. In particular, setting a threading.Event in this
context cause a deadlock.

Change-Id: If7bfa9f7da81ffdfb581299cd14ec4edb50be5fb
Signed-off-by: Nir Soffer <nsoffer at redhat.com>
Reviewed-on: http://gerrit.ovirt.org/26112
Reviewed-by: Dan Kenigsberg <danken at redhat.com>
---
M vdsm/clientIF.py
M vdsm/vdsm
2 files changed, 10 insertions(+), 7 deletions(-)

Approvals:
  Nir Soffer: Verified
  Dan Kenigsberg: Looks good to me, approved



-- 
To view, visit http://gerrit.ovirt.org/26112
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: If7bfa9f7da81ffdfb581299cd14ec4edb50be5fb
Gerrit-PatchSet: 5
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server


More information about the vdsm-patches mailing list