diff --git a/heat/engine/service.py b/heat/engine/service.py index f07f51cd3f..9e4fe7d15d 100644 --- a/heat/engine/service.py +++ b/heat/engine/service.py @@ -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): """ diff --git a/heat/tests/test_engine_service.py b/heat/tests/test_engine_service.py index 2c024e1abe..a482c2ea36 100644 --- a/heat/tests/test_engine_service.py +++ b/heat/tests/test_engine_service.py @@ -3566,6 +3566,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):