Reload logging options when receiving SIGHUP

Related-Bug: #1276694
Change-Id: I4c058654a094bb6ce3ca154d311f5d6aa31f6056
This commit is contained in:
Tetiana Lashchova 2015-05-26 17:57:02 +03:00
parent 1c0c7587a0
commit cd81f0d1c5
2 changed files with 9 additions and 0 deletions

View File

@ -397,6 +397,10 @@ class EngineService(service.Service):
LOG.info(_LI("All threads were gone, terminating engine"))
super(EngineService, self).stop()
def reset(self):
super(EngineService, self).reset()
logging.setup(cfg.CONF, 'heat')
@context.request_context
def identify_stack(self, cnxt, stack_name):
"""

View File

@ -3863,6 +3863,11 @@ class StackServiceTest(common.HeatTestCase):
admin_context_method
)
@mock.patch('oslo_log.log.setup')
def test_engine_service_reset(self, setup_logging_mock):
self.eng.reset()
setup_logging_mock.assertCalledOnceWith(cfg.CONF, 'heat')
class ThreadGroupManagerTest(common.HeatTestCase):
def setUp(self):