]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commit
Wait until service thread is done on service stop
authorMitsuhiro Tanino <mitsuhiro.tanino@hds.com>
Sat, 13 Jun 2015 04:23:40 +0000 (00:23 -0400)
committerMitsuhiro Tanino <mitsuhiro.tanino@hds.com>
Sat, 13 Jun 2015 16:45:37 +0000 (12:45 -0400)
commitfcb5068e79490351359afdec9f05f42ebb022edf
tree6b23e439a6cb2d9f701264746985c840830bee47
parentac459970065804c4b2602f65ad93e957e1fb6fc1
Wait until service thread is done on service stop

In order to be able to perform graceful shutdown of services, we need
to wait for all the current service threads to finish before exiting
from the service process.

Oslo.service provides this facility through it's wait() method, so we
need to call it in Cinder Service stop() method which gets called when
graceful shutdown is requested by sending the process SIGINT or SIGTERM.

Partial-Bug: 1464822
Change-Id: I972b80251cebe353f9d89ff4e05db8d029ef5e73
cinder/service.py
cinder/tests/unit/test_service.py