"""Generic Node base class for all workers that run on hosts."""
import errno
-import logging as std_logging
+import logging
import os
import random
import signal
from cinder.openstack.common import eventlet_backdoor
from cinder.openstack.common._i18n import _LE, _LI, _LW
-from cinder.openstack.common import log as logging
from cinder.openstack.common import systemd
from cinder.openstack.common import threadgroup
signo = 0
LOG.debug('Full set of CONF:')
- CONF.log_opt_values(LOG, std_logging.DEBUG)
+ CONF.log_opt_values(LOG, logging.DEBUG)
try:
if ready_callback:
systemd.notify_once()
LOG.debug('Full set of CONF:')
- CONF.log_opt_values(LOG, std_logging.DEBUG)
+ CONF.log_opt_values(LOG, logging.DEBUG)
try:
while True:
self.running = True
self.sigcaught = None
except eventlet.greenlet.GreenletExit:
- LOG.info(_LI("Wait called after thread killed. Cleaning up."))
+ LOG.info(_LI("Wait called after thread killed. Cleaning up."))
self.stop()
def start(self):
pass
- def stop(self):
- self.tg.stop()
+ def stop(self, graceful=False):
+ self.tg.stop(graceful)
self.tg.wait()
# Signal that service cleanup is done:
if not self._done.ready():