]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Process engine config before initialisation
authorZane Bitter <zbitter@redhat.com>
Thu, 29 Nov 2012 19:51:01 +0000 (20:51 +0100)
committerZane Bitter <zbitter@redhat.com>
Thu, 29 Nov 2012 19:51:47 +0000 (20:51 +0100)
Don't import the heat-engine service module until the configuration options
have been initialised. This will allow us to read the configuration during
initialisation of the engine.

Change-Id: I2bc70d903434eac1fa248640018f038c5ef2bead
Signed-off-by: Zane Bitter <zbitter@redhat.com>
bin/heat-engine

index 9a4550c336ad80dfa70b88898a7d6317b875b894..d0cf95610e28474d7995ae4e44c05b6caf5b8c38 100755 (executable)
@@ -44,7 +44,6 @@ from heat.openstack.common import service
 
 from heat.common import config
 from heat.db import api as db_api
-from heat.engine import service as engine
 
 
 logger = logging.getLogger('heat.engine')
@@ -57,6 +56,8 @@ if __name__ == '__main__':
     config.register_engine_opts()
     db_api.configure()
 
+    from heat.engine import service as engine
+
     srv = engine.EngineService(cfg.CONF.host,
                                 'engine')
     launcher = service.launch(srv)