import eventlet.backdoor
import greenlet
-from oslo.config import cfg
+from oslo_config import cfg
from cinder.openstack.common._i18n import _LI
def list_opts():
- """Entry point for oslo.config-generator.
+ """Entry point for oslo-config-generator.
"""
return [(None, copy.deepcopy(eventlet_backdoor_opts))]
import eventlet
from eventlet import event
-from oslo.config import cfg
+from oslo_config import cfg
from cinder.openstack.common import eventlet_backdoor
from cinder.openstack.common._i18n import _LE, _LI, _LW
class ProcessLauncher(object):
+ _signal_handlers_set = set()
+
+ @classmethod
+ def _handle_class_signals(cls, *args, **kwargs):
+ for handler in cls._signal_handlers_set:
+ handler(*args, **kwargs)
+
def __init__(self, wait_interval=0.01):
"""Constructor.
self.handle_signal()
def handle_signal(self):
- _set_signals_handler(self._handle_signal)
+ self._signal_handlers_set.add(self._handle_signal)
+ _set_signals_handler(self._handle_class_signals)
def _handle_signal(self, signo, frame):
self.sigcaught = signo
if not _is_sighup_and_daemon(self.sigcaught):
break
+ cfg.CONF.reload_config_files()
+ for service in set(
+ [wrap.service for wrap in self.children.values()]):
+ service.reset()
+
for pid in self.children:
os.kill(pid, signal.SIGHUP)
+
self.running = True
self.sigcaught = None
except eventlet.greenlet.GreenletExit: