We are not calling oslo_service.Service's stop method with the graceful
parameter which ensure that stop waits for threads to properly stop
instead of just forcefully stopping them. This is not an issue for
Cinder at this moment because the rpcserver.stop call waits for
everything to gracefully stop, but we may have something there running
and we wouldn't want to kill it.
We should also call oslo_service.Service.wait method from our
Service.wait method.
This patch ensures that we are properly calling oslo_Service.Service's
methods.
Change-Id: I8764571c41509fdf1ff7950e9d8d7d6cf0d2f57d
x.stop()
except Exception:
self.timers_skip.append(x)
- super(Service, self).stop()
+ super(Service, self).stop(graceful=True)
def wait(self):
skip = getattr(self, 'timers_skip', [])
pass
if self.rpcserver:
self.rpcserver.wait()
+ super(Service, self).wait()
def periodic_tasks(self, raise_on_error=False):
"""Tasks to be run at a periodic interval."""