8b65185c14
This reverts commit 6ed3bd2b24
Something regressed with this because the GMRs that are in
the liberty side n-cpu logs in the grenade job [1] are no
longer in the mitaka side [2] after this change.
I think that needs to be sorted out before we can land
this code, or at least know where the GMRs are now.
[1] http://logs.openstack.org/17/216917/26/check/gate-grenade-dsvm/f3832b9/logs/old/screen-n-cpu.txt.gz
[2] http://logs.openstack.org/17/216917/26/check/gate-grenade-dsvm/f3832b9/logs/new/screen-n-cpu.txt.gz
Change-Id: I817b8d0f6c6fa71dc56b031c717bd7a63193f847
65 lines
2.6 KiB
Python
65 lines
2.6 KiB
Python
# Copyright 2010 United States Government as represented by the
|
|
# Administrator of the National Aeronautics and Space Administration.
|
|
# All Rights Reserved.
|
|
# Copyright 2012 Red Hat, Inc.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
|
# not use this file except in compliance with the License. You may obtain
|
|
# a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
|
# License for the specific language governing permissions and limitations
|
|
# under the License.
|
|
|
|
from oslo_config import cfg
|
|
from oslo_db import options
|
|
from oslo_log import log
|
|
|
|
from nova.db.sqlalchemy import api as sqlalchemy_api
|
|
from nova import debugger
|
|
from nova import paths
|
|
from nova import rpc
|
|
from nova import version
|
|
|
|
|
|
CONF = cfg.CONF
|
|
|
|
_DEFAULT_SQL_CONNECTION = 'sqlite:///' + paths.state_path_def('nova.sqlite')
|
|
|
|
# NOTE(mikal): suds is used by the vmware driver, removing this will
|
|
# cause many extraneous log lines for their tempest runs. Refer to
|
|
# https://review.openstack.org/#/c/219225/ for details.
|
|
_DEFAULT_LOG_LEVELS = ['amqp=WARN', 'amqplib=WARN', 'boto=WARN',
|
|
'qpid=WARN', 'sqlalchemy=WARN', 'suds=INFO',
|
|
'oslo_messaging=INFO', 'iso8601=WARN',
|
|
'requests.packages.urllib3.connectionpool=WARN',
|
|
'urllib3.connectionpool=WARN', 'websocket=WARN',
|
|
'keystonemiddleware=WARN', 'routes.middleware=WARN',
|
|
'stevedore=WARN', 'glanceclient=WARN']
|
|
|
|
_DEFAULT_LOGGING_CONTEXT_FORMAT = ('%(asctime)s.%(msecs)03d %(process)d '
|
|
'%(levelname)s %(name)s [%(request_id)s '
|
|
'%(user_identity)s] %(instance)s'
|
|
'%(message)s')
|
|
|
|
|
|
def parse_args(argv, default_config_files=None, configure_db=True):
|
|
log.set_defaults(_DEFAULT_LOGGING_CONTEXT_FORMAT, _DEFAULT_LOG_LEVELS)
|
|
log.register_options(CONF)
|
|
options.set_defaults(CONF, connection=_DEFAULT_SQL_CONNECTION,
|
|
sqlite_db='nova.sqlite')
|
|
rpc.set_defaults(control_exchange='nova')
|
|
debugger.register_cli_opts()
|
|
CONF(argv[1:],
|
|
project='nova',
|
|
version=version.version_string(),
|
|
default_config_files=default_config_files)
|
|
rpc.init(CONF)
|
|
|
|
if configure_db:
|
|
sqlalchemy_api.configure(CONF)
|