]> review.fuel-infra Code Review - openstack-build/neutron-build.git/commitdiff
Enable logging before using it
authorYong Sheng Gong <gongysh@unitedstack.com>
Fri, 12 Jul 2013 09:18:42 +0000 (17:18 +0800)
committerYong Sheng Gong <gongysh@unitedstack.com>
Sat, 13 Jul 2013 07:35:22 +0000 (15:35 +0800)
Bug #1200530

Change-Id: I086353c93fae0f6ec74d16a485c215c1b3815ee6

neutron/common/config.py
neutron/db/migration/cli.py
neutron/service.py
neutron/services/loadbalancer/drivers/haproxy/agent.py

index 52ced13f735380d2521993cdce5763696990efa8..3796488d762a56c3e566c04a9e5f38a067625054 100644 (file)
@@ -25,7 +25,6 @@ from oslo.config import cfg
 from paste import deploy
 
 from neutron.api.v2 import attributes
-from neutron.common import legacy
 from neutron.common import utils
 from neutron.openstack.common.db.sqlalchemy import session as db_session
 from neutron.openstack.common import log as logging
@@ -108,8 +107,6 @@ def parse(args):
     cfg.CONF(args=args, project='neutron',
              version='%%prog %s' % neutron_version.release_string())
 
-    legacy.modernize_quantum_config(cfg.CONF)
-
     # Validate that the base_mac is of the correct format
     msg = attributes._validate_regex(cfg.CONF.base_mac,
                                      attributes.MAC_PATTERN)
index 7219038ae0a47dca5b43c205a42e502c2c63a3d4..759c586e135107e32b02c4af7e47b46d9a3f68c5 100644 (file)
@@ -135,5 +135,6 @@ def main():
     config.neutron_config = CONF
 
     CONF()
+    #TODO(gongysh) enable logging
     legacy.modernize_quantum_config(CONF)
     CONF.command.func(config, CONF.command.name)
index cb466fc886ce0d6bfe76c9f9cb714be34abe59aa..b90510ce51918fcf1c921120903041dd6ae52f1c 100644 (file)
@@ -23,6 +23,7 @@ import random
 from oslo.config import cfg
 
 from neutron.common import config
+from neutron.common import legacy
 from neutron import context
 from neutron.openstack.common import importutils
 from neutron.openstack.common import log as logging
@@ -80,6 +81,7 @@ class NeutronApiService(WsgiService):
         # Log the options used when starting if we're in debug mode...
 
         config.setup_logging(cfg.CONF)
+        legacy.modernize_quantum_config(cfg.CONF)
         # Dump the initial option values
         cfg.CONF.log_opt_values(LOG, std_logging.DEBUG)
         service = cls(app_name)
index 9ea62b50e2b3d95255b8ffd7ce7c0cac08988926..0aa183a999b21e549e6aae28411aa045531cef01 100644 (file)
@@ -58,8 +58,8 @@ def main():
     config.register_root_helper(cfg.CONF)
 
     cfg.CONF(project='neutron')
-    legacy.modernize_quantum_config(cfg.CONF)
     config.setup_logging(cfg.CONF)
+    legacy.modernize_quantum_config(cfg.CONF)
 
     mgr = manager.LbaasAgentManager(cfg.CONF)
     svc = LbaasAgentService(