Commit Graph

64 Commits

Author SHA1 Message Date
ChangBo Guo(gcb) 95d4cae2de low hanging fruit oslo-incubator sync
Sync modules from oslo-incubator without changing files outside of
directory 'openstack/common'.

Synced Modules:

Patch logs were generated by 'git log --abbrev-commit --pretty=oneline
{file}'

config:
0e98afd Re-raise exception of unloadable library
1a6dfb9 Sanitize FQDN in config generator
e839886 Config generator fails with lazy messages
763eedf Fix DictOpt support in config sample generator

context:
c0d357b Add model_query() to db.sqlalchemy.utils module
13eb01c Adding domain to context and log
12bcdb7 Remove vim header
bdabd51 Remove uuidutils imports in oslo modules
44e8222 Revert "Removes generate_uuid from uuidutils"
571a78a Removes generate_uuid from uuidutils
36859e5 Adding instance_uuid to context and log
b21fc56 Fix bad default for show_deleted

eventlet_backdoor:
fcf517d Update oslo log messages with translation domains
ad17a69 Fix filter() usage due to python 3 compability
8b2b0b7 Use hacking import_exceptions for gettextutils._
12bcdb7 Remove vim header
1dcc747 Fix stylistic problems with help text

excutils:
33a2cee save_and_reraise_exception: make logging respect the reraise parameter
fcf517d Update oslo log messages with translation domains
8b2b0b7 Use hacking import_exceptions for gettextutils._
6d0a6c3 Correct invalid docstrings

fileutils:
fcf517d Update oslo log messages with translation domains
e71cd1a Merge "Trivial: Make vertical white space after license header
consistent"

gettextutils:
fd33d1e Fix gettextutil.Message handling of deep copy failures
047b2e4 Change lazy translation to retain complete dict
6d55e26 Add support for translating log levels separately

importutils:
885828a Deleted duplicated method in cliutils

jsonutils:
e3a1d9c Use six.moves.xmlrpc_client instead of xmlrpclib
3a31bba Python3 support for xmlrpclib

log:
da6d713 Revert setting oslo-incubator logs to INFO
0d18381 Set default log levels for oslo.messaging and oslo-incubator
346884d Add default user_identity to logging record
3570f44 Merge "Remove None for dict.get()"
bf6d71d Merge "Rename Openstack to OpenStack"
86707cd Remove None for dict.get()
61ff7a6 Rename Openstack to OpenStack
5b5068e Merge "Fix deprecated messages sent multiple times"
dda47c9 Use ContextFormatter for imparting context info
52b6446 Fix deprecated messages sent multiple times
d6e1ba7 Merge "default connectionpool to WARN log level"
7f4ad99 Merge "Small edits on help strings"
8c3046b Merge "Backport 'ident' from python 3.3 for Oslo's
SysLogHandler"
1978114 default connectionpool to WARN log level

loopingcall:
fcf517d Update oslo log messages with translation domains
8b2b0b7 Use hacking import_exceptions for gettextutils._
12bcdb7 Remove vim header

memorycache:
12bcdb7 Remove vim header
5e765b2 python3: Fix traceback while running tests

network_utils:
897aa7c urlsplit issues with IPv6 addresses in python26
35dc1d7 py3kcompat: remove
fb738d4 Merge "Use py3kcompat urlutils functions instead of urlparse"
12bcdb7 Remove vim header
4c22556 Use py3kcompat urlutils functions instead of urlparse

processutils:
fcf517d Update oslo log messages with translation domains

service:
e2634a7 Add missing _LI for LOG.info in service module
0150ad7 Merge "Reap child processes gracefully if greenlet thread gets killed"
53e1214 notify calling process we are ready to serve
fcf517d Update oslo log messages with translation domains
1e70078 Revert "service: replace eventlet event by threading"
0644073 Simplify launch method
6b4d255 Merge "service: replace eventlet event by threading"
a4f145e Merge "Allow configurable ProcessLauncher liveness check"
8b2b0b7 Use hacking import_exceptions for gettextutils._

systemd:
53e1214 notify calling process we are ready to serve

threadgroup:
5f8ace0 Merge "threadgroup: use threading rather than greenthread"
2d06d6c Simple typo correction
4d18b57 threadgroup: use threading rather than greenthread
25ff65e Make wait & stop methods work on all threads
12bcdb7 Remove vim header
9d3c34b Add a link method to Thread

timeutils:
d815087 Merge "Fix spelling errors in comments"
63d5ba6 Merge "Fix typo in parameter documentation (timeutils)"
71208fe Fix spelling errors in comments
7013471 Fix typo in parameter documentation (timeutils)

versionutils:
8b2b0b7 Use hacking import_exceptions for gettextutils._
a5ae087 fixed typos
45658e2 Fix violations of H302:import only modules
db29de0 Merge "Adds decorator to deprecate functions and methods"
37ea814 Adds decorator to deprecate functions and methods
12bcdb7 Remove vim header

xmlutils:
12bcdb7 Remove vim header

Co-Authored-By: ChangBo Guo(gcb) <eric.guo@easystack.cn>

Change-Id: Ic8e47cb037683338f972df880b51921c1f9f98d8
2014-04-02 14:51:36 +08:00
Gordon Chung 7843729859 notifier middleware broken by oslo.messaging
audit middleware in oslo-incubator is incompatible with oslo.messaging.
an oslo.messaging compatible version is available in pycadf library.
remove broken oslo-incubator code in this patch.

also add middleware/request_id to openstack-common.conf so we continue
to pull in request_id middleware but not audit/notifier.

Partial-Bug: #1280327
Change-Id: I665144b256da0b04267cac754324e5779512e65d
2014-03-04 16:58:50 -05:00
Jenkins b2d0a6fd96 Merge "Remove log_handler module from oslo-incubator sync" 2014-03-03 02:03:48 +00:00
Jenkins 84a260692d Merge "Remove deleted module flakes from openstack-common.conf" 2014-03-03 02:02:46 +00:00
Joe Gordon 5bed7801a4 Remove log_handler module from oslo-incubator sync
log_handler is now part of
oslo.messaging(I9ea051ec7e3614579341a31d8dc1c13d9514b8a9).

Change-Id: Ic3493b8717c83285e6aafeae23a29d2794a9b2a9
2014-02-28 10:38:34 -08:00
Joe Gordon 8dcc054259 Remove deleted module flakes from openstack-common.conf
flakes: Id2e882837bdde51a60562e8cdd207c7ff0c88a6a

Change-Id: I238e4e5c103dc0475001db80ef6ee8885913a211
2014-02-28 10:08:57 -08:00
Solly Ross cec532848f Introduce Guru Meditation Reports into Nova
This commit integrates functionality from the
`openstack.common.report` module into Nova.
This enables Nova services to receive SIGUSR1
and print a Guru Meditation Report to stderr.
The required modules were added to
'openstack-common.conf' as well.

Change-Id: I224a426dad084f0e738069207ffbffe7f7935a17
Implements: blueprint guru-meditation-report
2014-02-24 19:24:41 -05:00
Joe Gordon 59755aec91 Remove unused notifier and rpc modules from oslo sync
As part of the move to oslo.messaging (1a91aacb85)
we stopped using oslo-incubator's notifier and rpc, but openstack-common.conf
wasn't updated accordingly.

Change-Id: I11e17313afa0327ba4620dd8f08ecf379efef9ac
2014-02-19 09:25:50 -08:00
Eric Guo 1a58ec19a3 Sync module units from oslo
Module units landed in Nova first, then was accepted by oslo with
minor changes. This patch removes nova specific unit module and
test, replaces with module units in oslo.

commit in Oslo:'Add unit constants' f9308560c36918cc

Change-Id: I6054c18a56f59d33a69f4714be19d34fbe9de335
Co-Authored-By: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@cloudwatt.com>
2014-01-21 23:55:55 +01:00
Thierry Carrez e0e4b55930 Use oslo.rootwrap library instead of local copy
Remove rootwrap code copied from oslo-incubator, make the
nova-rootwrap console_script entrypoint point to oslo.rootwrap
code instead.

Change-Id: Iec7aaf2e1599b2faf403d11b779eeab199a89486
Implements: blueprint nova-oslo-rootwrap
2014-01-17 18:06:33 +01:00
Brad Pokorny 8c0c9b1169 Sync middleware audit, base, and notifier from oslo
Pull in middleware modules required to support CADF auditing
reports from Nova.  audit.py requires notify.py, and
notify.py requires base.py.  This is why those 3 files are
being synced, and not others in the
openstack/common/middleware directory from oslo.

The following 3 change IDs included in this sync provide
the main parts of the CADF functions being synced:

Ie67cf4a7 Add audit middleware
Iead2431a Middleware: add notifier
I05ff58   Move wsgi module to deprecated package

The following change IDs additionally included in this sync
provide minor updates to the files that were made after the
main parts of the CADF functions were merged in oslo:

I032616   Changed header from LLC to Foundation based on
          trademark policies
I840c43bf add support to ignore certain request
I2099e1ee Enable hacking H404 test
I04b0cf   middleware: code cleanup

blueprint support-standard-audit-formats

Change-Id: Id15f95a0c354270ba2d5aecb12c4f910905e8c20
2013-12-08 18:45:11 +00:00
chenxiao 1c4e279e18 Add log_handler to implement the publish_errors config option
Synced from Olso.
Commit Id is Ibf28ba17f81b5ddeda653f6a3501ecac18ffcd42

This handler sends all error logs as rpc notifications.
Note: when using publish_errors you also need to set the
notification_driver option too.

Change-Id: Ic97b9c8b84d51c84a53ace5b86cc2e72c744f136
Closes-bug: #1240349
2013-11-11 11:40:11 +08:00
Zhongyue Luo e73d254cd5 Uses oslo.imageutils
Commit 035668 had the QemuImgInfo class moved to Oslo.
This class was copied from Nova to Cinder and diverged since then.
The two projects will be able to use identical classes by importing imageutils.

Change-Id: If1962680906b3736d3f16f306b077483b122f878
2013-10-16 11:31:55 +08:00
Rick Harris 3ab91c4770 Use versionutils.is_compatible for Nova Objects
Oslo's check is designed to support version checking for a number of different
existing use-cases, including this one.

Related-Oslo-Commit: d7d74a752e34d5249fa47c8e8252da491d46012a
Change-Id: I8e03c7781330b02deb7af815d68538b5c0245c4d
2013-10-14 22:22:51 +00:00
Mehdi Abaakouk b035359952 Use the oslo fixture module
The oslo fixture import has been imported
And the tests code have been updated to use this new module

Change-Id: I3454440770402c028f49a92c6728d7bbad0c9aa0
2013-10-14 09:43:24 +01:00
Mark McLoughlin fd3328511d Remove obsolete redhat-eventlet.patch
See I62ce43a330d7ae94eda4c7498782a655e63747fa for the gorey details on
why this exists.

As of this fix:

https://github.com/eventlet/eventlet/pull/34

which was released in eventlet 0.13, we no longer need the patch.

This has now been removed from oslo-incubator, so this is really just
syncing that removal.

Change-Id: I84267f3c6726cb2e750f615e107c48b12c6ed353
2013-10-09 21:34:58 +01:00
Joe Gordon dc5c2cb7f2 Revert "Importing correlation_id middleware from oslo-incubator"
This reverts commit 26ecf7b023.

This patch was merged in preparation for
https://review.openstack.org/#/c/29480/ which was never merged.

Change-Id: Iefa1478af03f748ccb5f27f8bd4ad0f5b24af070
2013-09-03 14:13:44 -07:00
Michael Still 0ef2c55d80 Remove unsafe XML parsing
Move to using xmlutils for all XML parsing. Resolves bug 1190229.

Change-Id: I43afb2e188bbea99ea30fe6cb2eb1aeedc4ddfd4
2013-08-08 13:49:45 +02:00
Mark McLoughlin 9c1ba5c0f5 Sync latest rpc changes from oslo-incubator
Includes these commits:

 99b7c35 Convert kombu SSL version string into integer
 1a2df89 Enable H302 hacking check
 3969355 Fix exception arg typo
 3006787 Sanitize passwords in _safe_log
 323e465 Add conditional exception reraise
 dea334a Replace sys.exit by a RPCException
 719eba4 Don't reconnect to exclusive fanout consumers.
 22ec8ff Make AMQP based RPC consumer threads more robust
 13650b1 rpc: remove some unused serialization code
 e204885 Optionally reject messages on exception.
 688832f Remove unused zmq relay functionality

The sslutils module is included for its validate_ssl_version() method.

Change-Id: Ic2b64f68bfda0dde365221ab1efbc592b1e5bc6f
2013-07-22 23:24:28 +01:00
Mark McLoughlin 01672d86d5 Remove the unused plugins framework
This framework was merged a year ago and AFAICT hasn't seen use beyond
the two initial wikimedia extensions.

The framework basically allows a way for a single plugin to register API
extensions and notification drivers. Both of these can be done by
directly using config opts like osapi_compute_extension and
notification_driver so this framework really only helps if we expected
to (and wanted to) lots of these plugins in the wild.

Change-Id: I09a11f9931ee0436a56e8b0d925683b54f73b104
2013-06-19 09:56:28 +01:00
Julien Danjou 7bf5c10077 Enhance group handling in extract_opts
When there's 2 options with the same name, the script gets confused and
doesn't know in which group it goes. This fixes it, and fixes also the
template generation which is broken for various reasons:

- gettext.install was missing
- nova-rootwrap when imported calls exit() because it doesn't find a valid
  configuration file, so let's exclude it entirely anyway
- eventlet/greendns needs to be ignored for this

Change-Id: Iaa4e9a806e79032ce1675b46a6b7a7628c3eff89
Signed-off-by: Julien Danjou <julien@danjou.info>
2013-06-10 10:19:00 +02:00
Aditi Raveesh 26ecf7b023 Importing correlation_id middleware from oslo-incubator
Including 'correlation_id' middleware from oslo-incubator.
Adding this to openstack-common.conf to copy over the middleware to
the location nova/openstack/common/middleware

Change-Id: I21b27e8dae585345d03d59c125d9e1bbea95f830
Implements: blueprint cross-service-request-id
2013-05-23 10:10:11 +05:30
Jenkins f23a4bf7dc Merge "Add memorycache import into the oslo config." 2013-05-21 23:44:19 +00:00
Michael Still e80a717483 Add memorycache import into the oslo config.
Resolves bug 1181633.

Change-Id: I86af10a2bb0f8afa5e2cf0d14e1839b872c21c90
2013-05-19 09:50:53 +10:00
Jenkins bbf2f7e697 Merge "Copy the RHEL6 eventlet workaround from Oslo" 2013-05-16 14:42:17 +00:00
Jenkins 3eee243123 Merge "Remove openstack.common.version." 2013-05-15 23:59:07 +00:00
Monty Taylor b9b9a99b99 Remove openstack.common.version.
Change-Id: Ieb9ac3c2ce85777a33a2e15640670d03b2e7d2b7
2013-05-15 15:58:54 -07:00
Rick Harris 1b9489fb0d Use Oslo's bool_from_string
Oslo provides an equivalent implmentation of `bool_from_str` so we
should switch the code to use that instead.

Change-Id: I382f23af2468e276ae4342dff18cf06e1c24b755
2013-05-14 17:24:35 +00:00
Brian Elliott 1298b1880a Sync service and threadgroup modules from oslo
blueprint use-oslo-services

Change-Id: I8641dbed0a83a6d57c0b6c1a02796eb3e633fafd
2013-05-11 21:56:38 +00:00
Monty Taylor cbe862603e Transition from openstack.common.setup to pbr.
Declarative approach to packaging, obviates the need for copying files.
Also, removes the need for setup.py to import files from the nova
module.

./run_tests.sh now ensure's that nova.egg-info/entry_points.txt is up to
date before running tests.

Change-Id: I7b7a18e065a62491ade54fbed5d8400db1d4e6c7
2013-05-07 18:38:53 +10:00
Mark McLoughlin d819f869c5 Copy the RHEL6 eventlet workaround from Oslo
Tests in oslo-incubator now need the horrendous hack to workaround an
issue with eventlet on RHEL6. We've moved the patch_tox_venv tool
and redhat-eventlet.patch into oslo-incubator, so add them to
openstack-common.conf.

Change-Id: I1acfec282b64d7582144b155119bedb1741db2f7
2013-05-02 10:23:00 +01:00
Michael Still b7186ce03b Import oslo periodic tasks support.
I'll move nova across to this in the next review, I just want to
make the import clearly separate.

Change-Id: I4eefd9c73d443afcd0697ff5ddd59abf315b10e5
2013-05-01 08:45:08 +10:00
Zhongyue Luo f7ae12ff65 Update NovaBase model per changes on oslo.db.sqlalchemy
Fixed NovaBase to inherit from models.TimestampMixin
Added metadata attribute
Added db.sqlalchemy to openstack-common.conf

Oslo sync command:
python update.py --modules db.sqlalchemy --base nova --dest-dir ../nova

Change-Id: Ie4ad8e8b235e146ddb946cdf7f15d74e060ee4a3
2013-04-27 16:30:50 +08:00
Michael Still 8c53d87ad9 Import and convert to oslo loopingcall.
Import the oslo looping call implementation (which is a copy of
nova's), delete nova's local copy, convert all users to the new
location.

It should be noted that the oslo implementation of
FixedIntervalLoopingCall measures time from the start of the
periodic task, not the end, so periodic tasks will run with a
constant frequency instead of the frequency changing depending on
how long the periodic task takes to run.

Change-Id: Ia62ce1988f5373c09146efa6b3b1d1dc094d50c4
2013-04-16 04:24:48 +10:00
Mark McLoughlin 84baaca7e0 Reformat openstack-common.conf
Use the new 'module' option in openstack-common.conf which is a
multi-string option, allowing each module name to be placed on a
separate line.

This makes it much easier to review changes to the modules list.

Change-Id: I218601a3720287071f05b9f2f624c1de4442d34f
2013-03-25 07:34:04 +00:00
Chris Behrens 625ecb610c Sync nova with oslo DB exception cleanup.
DB exceptions have moved to openstack/common/db/exception module so that
they can be shared with multiple DB implementations.

Deadlock checking was also added to oslo to consolidate with
DuplicateKey checking.  This allows us to clean up our
_retry_on_deadlock decorator in sqlalchemy/api.py

Fixes unrelated pep8 issue with duplicate test in test_compute also.

Change-Id: I7e985b384d1ef345e0d67c919b84b4faff869699
2013-02-25 21:32:59 +00:00
Eric Windisch 9e6ba904cf Add processutils from oslo.
RPC now depends on processutils.
Fixes bug 1131872.

Change-Id: I2c24f70aa37e56c2d12df370386629c76d89e4be
2013-02-22 13:13:03 -05:00
Chris Behrens de09aa254f Move DB thread pooling to DB API.
The eventlet db_pool wrapping done in sqlalchemy is wrong.  It needs to
be around the whole DB API call.

Fixes bug 1128605

Syncs nova with the fix in oslo.  Moves nova to use the oslo version of
db/api.py to import the DB API implementation.

Renames configuration option sql_dbpool_enable to dbapi_use_tpool

NOTE: tpool will not work without a fix to eventlet for Threads + locking.

DocImpact

Change-Id: I6c75b6138d38d12261d133f2cb2f5e59c667f837
2013-02-21 05:25:13 +00:00
Mark McLoughlin 706a137005 Use oslo-config-2013.1b4
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
2013-02-19 21:16:32 -08:00
Monty Taylor 4336152768 Update to simplified common oslo version code.
Based on https://review.openstack.org/#/c/19957/

Change-Id: Ieefee2af8812d0217e95eeffb3cf53d8e55c8fe6
2013-02-10 04:05:15 -06:00
Eric Windisch cd0c765ced Use oslo database code
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
2013-02-05 10:13:04 +00:00
Joe Gordon 64ded79907 import tools/flakes from oslo
Change-Id: Id6d99fe1fd39e8c061f591e9a82058aea9664674
2013-01-31 12:29:14 -08:00
Matthew Treinish c69ce047ad Use install_venv_common.py from oslo.
This syncs install_venv_common.py from oslo and reworks the
tools/install_venv.py script to use the new library.

Change-Id: I020eae1ec9e3a6aae0ecc7825c0ef723ab247f39
2013-01-28 13:57:59 -05:00
Thierry Carrez 476f15d610 Use common rootwrap from oslo-incubator
Make Nova use common rootwrap code from oslo-incubator.
Implements bp nova-common-rootwrap

Change-Id: I3282d65940375589fceb8485829097380d84d946
2013-01-17 13:32:30 +01:00
Joe Gordon eb39f01402 Add new cliutils code from oslo-incubator.
Change-Id: I03d93c5024965d4252a18d8cb564a7512b728994
2012-12-06 11:41:26 +02:00
Matthew Treinish 0f578217be Sync eventlet_backdoor from oslo.
Change-Id: I2b0021e0612226e71700d74c865a84a5b6d8e735
Signed-off-by: Matthew Treinish <treinish@linux.vnet.ibm.com>
2012-11-16 09:45:07 -05:00
Zhongyue Luo bb15f2b5b8 Add uuidutils module
Added uuidutils to openstack-common.conf file and
updated nova/openstack/common

Change-Id: I256a12ab4367a8ee408a38cda7ae35a762b56efe
2012-11-05 11:27:04 +08:00
Michael Still 0d4e6dbe6f Migrate to fileutils and lockutils.
Migrate nova to using openstack-common's file and lock utilities.
Resolves bug 1063230.

Change-Id: I1a4c87856bc08cd33b61d7098ed856baa4583654
2012-10-25 09:20:46 +11:00
Eugene Kirpichov 4a4fcc4685 Support for several HA RabbitMQ servers.
Port from openstack-common: https://review.openstack.org/#/c/10305/

Change-Id: Ib44abf115b42c3df42771344f6722ce1db043bbd
2012-09-26 18:59:20 +00:00
Andrew Bogott a30ed72967 Add the plugin framework from common; use and test.
For blueprint novaplugins.

Change-Id: Id4a5ae3ebb91f941956e2f73ecfd9ea1d290a235
2012-07-15 16:25:26 -05:00