| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
| |
This avoids us logging the output of potentially-sensitive operations
performed with privilege.
Change-Id: I706fbd883f7640bebb3ba0b5848b863a157a9794
Closes-Bug: #1784062
(cherry picked from commit 86a8aac0d76fa149b5e43c73b31227fbcf427278)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Add osprofiler wsgi middleware. This middleware is used for 2 things:
1) It checks that person who want to trace is trusted and knows
secret HMAC key.
2) It starts tracing in case of proper trace headers
and adds the first wsgi trace point with info about the HTTP request
* Add initialization of osprofiler on start of a service
Currently that includes oslo.messaging notifier instance creation
to send Ceilometer backend notifications.
oslo-spec: https://review.openstack.org/#/c/103825/
python-novaclient change: https://review.openstack.org/#/c/254699/
based on: https://review.openstack.org/#/c/105096/
Co-Authored-By: Boris Pavlovic <boris@pavlovic.me>
Co-Authored-By: Munoz, Obed N <obed.n.munoz@intel.com>
Co-Authored-By: Roman Podoliaka <rpodolyaka@mirantis.com>
Co-Authored-By: Tovin Seven <vinhnt@vn.fujitsu.com>
Implements: blueprint osprofiler-support-in-nova
Change-Id: I82d2badc8c1fcec27c3fce7c3c20e0f3b76414f1
|
|
|
|
|
|
|
|
|
|
| |
It's currently not possible to configure debug logging
for glanceclient, it's hard-coded to warning level. It
would be great to be able to just change config and
restart nova-compute, for example, when needing to debug
issues with glance.
Change-Id: I964e40085b68561af48b476c82288fc84d02bcc4
|
|
|
|
|
|
|
|
|
|
|
| |
Currently markus_z have centralized database section in
nova/conf/database.py. But in nova/config.py, there is a
part of database section that set the default options of
oslo_db. The set_default_opt include register_opt and should be
moved to centralized place.
Change-Id: Ic94991b009dfaa076a5f285b43018e473e9e074f
Implements: blueprint centralize-config-options-newton
|
|
|
|
|
|
|
|
| |
The config options of the "nova.conf" section "cache" got
moved to the new central location "nova/conf/cache.py".
Change-Id: I1b7aebb9f7d44ff8312b98c88093bf01f44dfa58
Implements: blueprint centralize-config-options-newton
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change moves all of the configuration options previously defined
in "nova/paths" to the new centralized "nova/conf" directory.
A subsequent patch will then improve the help texts.
As the helper functions to create specific directories are only used
for the default values of other config options, they got moved too.
The default value of the config option "pybasedir" gets determined by
the directory which contains it. The old directory was "nova/" and
new directory is "nova/conf/". That made it necessary to move one
additional directory upwards with "../../" to preserve the correct
default value.
bp centralize-config-options-newton
Change-Id: I65fc8d83da660e131e89ce5849e7535e969adcb2
|
|
|
|
|
|
|
|
|
|
| |
The config options of the "nova/debugger" got
moved to the new central location
"nova/conf/remote_debug.py"
Implements: blueprint centralize-config-options-newton
Change-Id: Ic0c858aac92c95dc20992c06218f9823e7e683e5
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Simplified the definition of Nova specific log levels by extending the
oslo.log standard levels used of all projects. This olso.log default
includes all existing values including suds=INFO.
* Removed logging context format as this matches oslo.log default.
* Reordered log initiation calls to match documented order.
See http://docs.openstack.org/developer/oslo.log/usage.html
Change-Id: Ibb4bf8b50419a578db49953e2fc69f45c5e3edb3
|
|
|
|
|
|
|
|
|
|
| |
This patch makes use of oslo.config's genconfig hooks to add
nova-specific default config values to the generated configuration.
It also adds this same method to nova's configuration parsing logic,
to ensure that these default values are also the ones used at runtime.
Closes-bug: 1551836
Change-Id: Ic799aea89f681ef8626e996f0357ade388f76ca9
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
setUp calls rpc.init() twice for each test, once in each of:
self.useFixture(conf_fixture.ConfFixture(CONF))
self.useFixture(nova_fixtures.RPCFixture('nova.test'))
Stop calling rpc.init() in ConfFixture, and defer to RPCFixture for
initialization.
The calls to rpc.init() in ConfFixture were taking 0.01 seconds each.
0.01 seconds * 14784 tests = 2.5 minutes
Change-Id: I710399b9b9286884f3ed71522d2697680951c20e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Common memorycache was replaced by analogous tool
from oslo.cache lib. In-memory cache was replaced
by oslo.cache.dict backend. Memcached was replaced
by dogpile.cache.memcached backend.
Implements blueprint oslo-for-mitaka
Closes-Bug: #1483322
Co-Authored-By: Sergey Nikitin <snikitin@mirantis.com>
Co-Authored-By: Pavel Kholkin <pkholkin@mirantis.com>
Change-Id: I371f7a68e6a6c1c4cd101f61b9ad96c15187a80e
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit 6ed3bd2b24bf9591dbac5d2f088d694cc6c49709
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
|
|
|
|
|
|
|
|
|
|
|
| |
Use the new oslo.report config option for specifying a
log_dir in which the GMR reports can be generated in.
consolidate the gmr related setup code in config.py
Introduced in oslo.reports change id:
I9ed0191628f2d552acd8130687b636671bc07a3e
Change-Id: Ib5edf65fd33ce86757f7cb1a6546a6f00738c9a3
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
'get_session' and 'get_api_session' methods are still
needed for backward compatibility.
Implements: blueprint new-oslodb-enginefacade
Closes-Bug: #1502104
Co-Authored-By: Pavel Kholkin <pkholkin@mirantis.com>
Change-Id: I8ceb9f939470f744f0d616d7db065a4d5d80202b
|
|
|
|
|
|
|
|
|
| |
As per the review comments from the recent revert of suds logging
changes (I43b66aa6be6fc1b2ed43650bd5cfe69963d8a16e), note that
suds is used by the vmware driver and removing the suds logging
config causes heaps of extra log lines for their tempest runs.
Change-Id: I2dd7126f895eb862bdb2a5b93d17be6571e01369
|
|
|
|
|
|
|
|
|
|
|
| |
This reverts commit bcc002809894f39c84dca5c46034468ed0469c2b.
Each call to the VC has a ton of information from suds that is logged.
This makes debugging and troubleshooting terribly difficult.
Closes-bug: #1491256
Change-Id: I43b66aa6be6fc1b2ed43650bd5cfe69963d8a16e
|
|
|
|
|
|
|
|
|
|
| |
Suds was removed as a dependency in
I28f29d3e5745c21b99dc0cf9eb0cfe4f95dffd17
So there is no reason to have default log values for suds since we don't
use it
Change-Id: I104edc80213cee8278c2641d2c391d2788bfa0f6
|
|
|
|
|
|
|
|
|
|
| |
We previously set the default log level for oslo.messaging to INFO, when
we switched over to oslo_messaging this didn't get changed.
This should significantly reduce the amount of logging, in one tempest
run, nova-compute logs 13k oslo_messaging debug logs.
Change-Id: I560c679af420f1da8054f163f80ae1e39bb7d089
|
|
|
|
|
|
|
|
|
|
| |
Convert the use of the incubated version of the log module
to the new oslo.log library.
Sync oslo-incubator modules to update their imports as well.
Co-Authored-By: Doug Hellmann <doug@doughellmann.com>
Change-Id: Ic4932e3f58191869c30bd07a010a6e9fdcb2a12c
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The oslo team is recommending everyone to switch to the
non-namespaced versions of libraries. Updating the hacking
rule to include a check to prevent oslo.* import from
creeping back in.
This commit includes:
- using oslo_utils instead of oslo.utils
- using oslo_serialization instead of oslo.serialization
- using oslo_db instead of oslo.db
- using oslo_i18n instead of oslo.i18n
- using oslo_middleware instead of oslo.middleware
- using oslo_config instead of oslo.config
- using oslo_messaging instead of "from oslo import messaging"
- using oslo_vmware instead of oslo.vmware
Change-Id: I3e2eb147b321ce3e928817b62abcb7d023c5f13f
|
|
|
|
|
|
|
|
| |
When capturing a snapshot for example, glanceclient logs
the whole uploaded image into the nova compute logs as
glanceclient's log level is set to DEBUG by default
Change-Id: Ie764517c2a4b91cb02c15096f7f0b4138900c92d
|
|
|
|
|
|
|
|
|
|
|
| |
Oslo's log module has a set_defaults which Nova can use
to set the context logging format and default log levels.
We should not have to fix default levels in oslo and then
sync across to Nova. This becomes all the more important
when we move to oslo.log library so we should get started
now
Change-Id: Id47099d5a755bc2923b05fe4bef270a7c0f99389
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace common oslo code nova.openstack.common.db by usage
of oslo.db library and remove common code.
Replaced catching of raw sqlalchemy exceptions by catches
of oslo.db exceptions(such as DBError, DBDuplicateEntry, etc).
Co-Authored-By: Eugeniya Kudryashova <ekudryashova@mirantis.com>
Closes-Bug: #1364986
Closes-Bug: #1353131
Closes-Bug: #1283987
Closes-Bug: #1274523
Change-Id: I0649539e071b2318ec85ed5d70259c949408e64b
|
|
|
|
|
|
|
|
|
| |
Thanks to I255a68fc60963386e8fefe65c3ffd269795adbf4, the two modules we
explicitly set log levels for are now in oslo-incubator, so we don't
need the extra code introduced in
Ib5164a22c5cbfa4f9d881b97bb1f623cd4d2f3f3
Change-Id: Iec7bd35da36135fcaf63a384fa35f849a1319738
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Thanks to I49a82c5b3446784d254ca558f51b6c3e5c2028eb, we can augment
oslo's set of default log levels with project specific ones.
Add keystonemiddleware as warn level since its verbose and nova isn't
trying to debug keystonemiddleware.
Add routes.middleware since this generates 3 log entries per API request
and doesn't help make debugging easier.
Change-Id: Ib5164a22c5cbfa4f9d881b97bb1f623cd4d2f3f3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
CLI options must be registered before the command line is parsed or a
cfg.ArgsAlreadyParsedError is raised.
Since commit 2cbea24 we are registering two 'remote_debug' arguments
in nova.service. In commit b506529, we see a hack being added to
ensure that nova.service is imported and the CLI opts registered
before config.parse_args() is called.
To clean this up somewhat, refactor all the elements of this remote
debugger support into nova.debugger. Avoid importing modules at
module import time since we need to import this before monkey
patching. Add a function for registering the CLI options just before
config.parse_args() is called. And fail gracefully if the CLI options
aren't registered when we called debugger.init().
Note that because the options aren't registered at module import time
any more, the config generator doesn't pick them up. However, that's
actually a good thing since this support doesn't work if you enable it
via config files since debugger.enabled() only looks at the command
line.
DocImpact: remote_debug options are not available via the config file,
only via the command line.
Change-Id: I97f747a2fb9222137203657df1d86ba89f3219e2
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This sync contains the following commits from olso-incubator:
7959826 db: move all options into database group
dda24eb Introduce mysql_sql_mode option, remove old warning
0b5af67 Introduce a method to set any MySQL session SQL mode
8dccc7b Handle ibm_db_sa DBDuplicateEntry integrity errors
0f24d82 Fix migration.db_version when no tables
ac84a40 Update log translation domains
c0d357b Add model_query() to db.sqlalchemy.utils module
84254fc Fix a small typo in api.py
b8a676c Remove CONF.database.connection default value
86707cd Remove None for dict.get()
0545121 Fix duplicating of SQL queries in logs
fcf517d Update oslo log messages with translation domains
fa05b7c Restore the ability to load the DB backend lazily
630d395 Don't use cfg.CONF in oslo.db
ce69e7f Don't store engine instances in oslo.db
35dc1d7 py3kcompat: remove
b4f72b2 Don't raise MySQL 2013 'Lost connection' errors
271adfb Format sql in db.sqlalchemy.session docstring
0334cb3 Handle exception messages with six.text_type
eff69ce Drop dependency on log from oslo db code
7a11a04 Automatic retry db.api query if db connection lost
11f2add Clean up docstring in db.sqlalchemy.session
1b5147f Only enable MySQL TRADITIONAL mode if we're running against MySQL
39e1c5c Move db tests base.py to common code
986dafd Fix parsing of UC errors in sqlite 3.7.16+/3.8.2+
bcf6d5e Small edits on help strings
ae01e9a Transition from migrate to alembic
Due to API changes in oslo.db code we have to change Nova code a bit
in order to reuse oslo-incubator changes (oslo.db no longer stores
SQLAlchemy Engine and sessionmaker instances globally and it's up to
applications to create them).
Change-Id: I4aaa7151f66e0292ff66c29330f93d78c6bf78a6
|
|
|
|
|
|
|
|
|
|
| |
We don't need to have the vi modelines in each source file,
it can be set in a user's vimrc if required.
Also a check is added to hacking to detect if they are re-added.
Change-Id: I347307a5145b2760c69085b6ca850d6a9137ffc6
Closes-Bug: #1229324
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The oslo.messaging library takes the existing RPC code from oslo and
wraps it in a sane API with well defined semantics around which we can
make a commitment to retain compatibility in future.
The patch is large, but the changes can be summarized as:
* oslo.messaging>=1.3.0a4 is required; a proper 1.3.0 release will be
pushed before the icehouse release candidates.
* The new rpc module has init() and cleanup() methods which manage the
global oslo.messaging transport state. The TRANSPORT and NOTIFIER
globals are conceptually similar to the current RPCIMPL global,
except we're free to create and use alternate Transport objects
in e.g. the cells code.
* The rpc.get_{client,server,notifier}() methods are just helpers
which wrap the global messaging state, specifiy serializers and
specify the use of the eventlet executor.
* In oslo.messaging, a request context is expected to be a dict so
we add a RequestContextSerializer which can serialize to and from
dicts using RequestContext.{to,from}_dict()
* The allowed_rpc_exception_modules configuration option is replaced
by an allowed_remote_exmods get_transport() parameter. This is not
something that users ever need to configure, but it is something
each project using oslo.messaging needs to be able to customize.
* The nova.rpcclient module is removed; it was only a helper class
to allow us split a lot of the more tedious changes out of this
patch.
* Finalizing the port from RpcProxy to RPCClient is straightforward.
We put the default topic, version and namespace into a Target and
contstruct the client using that.
* Porting endpoint classes (like ComputeManager) just involves setting
a target attribute on the class.
* The @client_exceptions() decorator has been renamed to
@expected_exceptions since it's used on the server side to designate
exceptions we expect the decorated method to raise.
* We maintain a global NOTIFIER object and create specializations of
it with specific publisher IDs in order to avoid notification driver
loading overhead.
* rpc.py contains transport aliases for backwards compatibility
purposes. setup.cfg also contains notification driver aliases for
backwards compat.
* The messaging options are moved about in nova.conf.sample because
the options are advertised via a oslo.config.opts entry point and
picked up by the generator.
* We use messaging.ConfFixture in tests to override oslo.messaging
config options, rather than making assumptions about the options
registered by the library.
The porting of cells code is particularly tricky:
* messaging.TransportURL parse() and str() replaces the
[un]parse_transport_url() methods. Note the complication that an
oslo.messaging transport URL can actually have multiple hosts in
order to support message broker clustering. Also the complication
of transport aliases in rpc.get_transport_url().
* proxy_rpc_to_manager() is fairly nasty. Right now, we're proxying
the on-the-wire message format over this call, but you can't supply
such messages to oslo.messaging's cast()/call() methods. Rather than
change the inter-cell RPC API to suit oslo.messaging, we instead
just unpack the topic, server, method and args from the message on
the remote side.
cells_api.RPCClientCellsProxy is a mock RPCClient implementation
which allows us to wrap up a RPC in the message format currently
used for inter-cell RPCs.
* Similarly, proxy_rpc_to_manager uses the on-the-wire format for
exception serialization, but this format is an implementation detail
of oslo.messaging's transport drivers. So, we need to duplicate the
exception serialization code in cells.messaging. We may find a way
to reconcile this in future - for example a ExceptionSerializer
class might work, but with the current format it might be difficult
for the deserializer to generically detect a serialized exception.
* CellsRPCDriver.start_servers() and InterCellRPCAPI._get_client()
need close review, but they're pretty straightforward ports of code
to listen on some specialized topics and connect to a remote cell
using its transport URL.
blueprint: oslo-messaging
Change-Id: Ib613e6300f2c215be90f924afbd223a3da053a69
|
|
|
|
|
|
|
|
|
| |
Fixes bug #1138844
Pass the version kwarg to cfg.CONF() so that --version shows the
version number.
Change-Id: I589ebffec67ef00f8ba24f553bf3e81806aa50b6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.
Add the 2013.1b4 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.
Add dependency_links to setup.py so that oslo-config can be installed
from the tarball URL specified in pip-requires.
Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other
deps get installed with easy_install which can't install oslo-config
from the URL.
Make tools/hacking.py include oslo in IMPORT_EXCEPTIONS like it already
does for paste. It turns out imp.find_module() doesn't correct handle
namespace packages.
Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).
Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Bring in the new database code from oslo.
Uses get_session() from oslo as well as changing NovaBase to derive from
a common class.
Remove test_sqlalchemy.py now that this code is test in oslo.
Implements blueprint db-common.
Change-Id: I090754981c871250dd981cbbe1a08e7181440120
|
|
|
|
|
|
|
|
|
|
|
| |
The my_ip, host and use_ipv6 options are used all over the codebase
and they're pretty well related to each other. Create a new netconf
module for them to live in.
There are now no options registered globally in nova.config!
blueprint: scope-config-opts
Change-Id: Ifde37839ae6f38e6bf99dff1e80b8e25fd68ed25
|
|
|
|
|
|
|
|
|
|
| |
Add a factory function to nova.common.memorycache which consolidates
the code to choose between real or fake memcache. This then means that
memcached_servers is used in just one place and we can move the config
option there.
blueprint: scope-config-opts
Change-Id: I67c191e0db58364eda4162b9e881606063509b9d
|
|
|
|
|
| |
blueprint: scope-config-opts
Change-Id: I5fddb3768348c43a38b72dbf738b0c7fa2967691
|
|
|
|
|
|
|
|
| |
Apart from one use in the EC2 API, vpn_key_suffix is only used in
pipelib.
blueprint: scope-config-opts
Change-Id: If90b9e77905161ea8d9263e8bae2c47ac5f79e91
|
|
|
|
|
|
|
|
|
|
|
|
| |
Apart from checking whether a given image is the cloudpipe image, the
vpn_image_id option is only used within pipelib itself.
Add a is_vpn_image() helper method and move the option into pipelib.
Some rejiggering of how pipelib imports ec2 opts is required to avoid
circular imports.
blueprint: scope-config-opts
Change-Id: Ie984b2bb81681c24d3cee803082960083992a535
|
|
|
|
|
|
|
|
|
|
| |
The enabled_apis option is only used in nova-api and nova-all but
there's no more obvious place to put it than nova.service. At least
this location is consistent, since we quite have a number of other
options related to the APIs in nova.service.
blueprint: scope-config-opts
Change-Id: I86e200fa5ad91ac0b7ab6837cc61e5927b2ebeb7
|
|
|
|
|
|
|
|
| |
The default_ephemeral_format and use_cow_images options are used by a
number of virt drivers and nowhere else.
blueprint: scope-config-opts
Change-Id: I4ab2891e156589ae7bb44e6ce69cba3680a070c5
|
|
|
|
|
|
|
|
| |
Apart from the tests, this option is only used in
nova.compute.instance_types so move it there.
blueprint: scope-config-opts
Change-Id: Iadf4011739e50455b7ad4214a778a02e244fef35
|
|
|
|
|
|
|
| |
This strange little option is only used within the DB layer.
blueprint: scope-config-opts
Change-Id: I10b0fef02a5fffd44094fe351cde683fc5c31442
|
|
|
|
|
|
|
|
| |
The compute_api_class, network_api_class and volume_api_class options
are only used in their respective modules, so move them there.
blueprint: scope-config-opts
Change-Id: Ib0497f46b44c4b3af7319550cc64c09d629ea362
|
|
|
|
|
|
|
|
|
|
|
|
| |
Move the compute_manager, console_manager, cert_manager, network_manager
and scheduler_manager options into nova.service.
Apart from the tests, these options are mostly just used in nova.service
so it makes sense for them to live there. Also, metadata_manager already
lives there.
blueprint: scope-config-opts
Change-Id: I180859817b57c081b83d6a6f075a6ff76bb0ef6d
|
|
|
|
|
|
|
|
| |
Even though the compute_topic opt is used outside nova.compute.rpcapi,
it makes sense for the RPC module to "own" the topic option.
blueprint: scope-config-opts
Change-Id: I453951825481b9a5ba1865f6bf1223f7b1e25f98
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The scheduler_topic opt is only used in nova.scheduler.rpcapi and it
makes sense for the RPC module to "own" the topic option.
blueprint: scope-config-opts
Change-Id: Iafb8705eb716b650b63e060fe1dd36666bcee812
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Even though the console_topic opt is used outside nova.console.rpcapi,
it makes sense for the RPC module to "own" the topic option.
blueprint: scope-config-opts
Change-Id: I0f00927ca1c0bba7b21315240165e83e7075ebb7
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
The network_topic opt is only used in nova.network.rpcapi and it makes
sense for the RPC module to "own" the topic option.
blueprint: scope-config-opts
Change-Id: Icd779f34df47ac6dd048b3e41995e872d8859872
|