67 Commits

Author SHA1 Message Date
Michał Dulko
fab6b4ef58 Move oslo-incubator's scheduler module to cinder
oslo-incubator is ending its life and we should move remaining
dependencies from there to cinder namespace. This commit does so with
openstack.common.scheduler. Apart from that tests from oslo-incubator
repository are added.

Change-Id: I10d88c120c9c847826986483065f5493e91f89d6
Closes-Bug: 1519337
2015-11-24 15:49:31 +01:00
Jay S Bryant
0ed1bae46f Remove unused gettextutils from oslo-incubator
Now that the old config generator code has been replaced/removed
we can now also remove gettextutils.  The generator was the last
hold-out in our code still using that obsolete code.

This patch removes the unneeded file and also updates the i18n code
that was monkey patching in support for using the _() and _LX()
functions in gettextutils.

Change-Id: Ib29915b13bd7f0173637ac6d1881f1ca06b713d6
related-bug: 1381563
2015-10-16 15:22:49 -05:00
Sergey Vilgelm
212aff327a Switch to the oslo_utils.fileutils
fileutils is graduated in the oslo.utils library.
Use the open function from builtins instead of fileutils.file_open.
Change the test_backup_volume (test_scality module) and
test_restore_backup (test_scality, test_volume) functions to use
mock library instead of mox.

Implements: blueprint graduate-fileutils[1]
[1] https://blueprints.launchpad.net/oslo-incubator/+spec/graduate-fileutils

Change-Id: I7abf0273bf2b90c72f51ebf4896808eaabb91969
2015-08-20 07:47:48 +00:00
liu-sheng
c2e1db7c1d Switch to oslo.reports
The Guru Meditation Reports has graduated from oslo-incubator, Cinder
should switch to use oslo.reports to keep the code base clean.

NOTE: this should be merged after the requirements has been synchronized.

Change-Id: Ic91a0c5eed09ecdec93e707e901f4bcc55980f72
Closes-Bug: 1469575
2015-07-02 09:58:33 +08:00
Sergey Vilgelm
d3085da7ae Use versionutils from oslo.log
Change-Id: I9aa6cf7ccddad1d7c891230332e49e25b536f5bc
Closes-Bug: 1469693
2015-06-29 13:10:08 +02:00
Sergey Vilgelm
f7d2112c00 Switch to oslo.service
oslo.service has graduated, so cinder should consume it.

Change-Id: I80487f559302b0e88953835ffb4a3bfe2a347501
Closes-Bug: #1466851
Depends-On: I305cf53bad6213c151395e93d656b53a8a28e1db
2015-06-24 21:55:32 +02:00
Eric Harney
7dae430e81 Sync 'report' from oslo-incubator
Needed to fix guru meditation report for Windows.
We landed an outdated 'report' module recently.

Add report.[generators,models,views] to
openstack-common.conf.

Oslo source: c4c7dd28 Updated from global requirements

Closes-Bug: #1286528

Change-Id: Ib33542718176241663c0e61605acbf4e941e2ca9
2015-06-17 16:34:22 -04:00
Jenkins
09b1205d98 Merge "Switch to oslo.policy 0.3.0" 2015-06-17 18:49:22 +00:00
Ivan Kolodyazhny
7592b99bf3 Switch to oslo.policy 0.3.0
Use graduated oslo.policy instead of sync with oslo-incubator code.

Co-Authored-By: Ivan Kolodyazhny <e0ne@e0ne.info>
Change-Id: Ibb295830ac6abde9317c2549f75c1780ac454125
Closes-Bug: #1421863
Partial-Bug: #1458945
2015-06-16 22:03:09 +03:00
Jenkins
6199485a71 Merge "Introduce Guru Meditation Reports into Cinder" 2015-06-16 16:53:06 +00:00
wanghao
f2dc050e4d Introduce Guru Meditation Reports into Cinder
This commit integrates functionality from the
`openstack.common.report` module into Cinder.
This enables Cinder services to receive SIGUSR1
and print a Guru Meditation Report to stderr.
The required modules were added to
'openstack-common.conf' as well.

It is essentially a copy from implementation of
nova side.

Change-Id: I5bbdc0f97db9b0ebd7b48e50ab7869e2ca33aead
Implements: blueprint guru-meditation-report
2015-06-16 12:01:28 +08:00
Davanum Srinivas
4b0c9bafc2 Get rid of oslo-incubator copy of middleware
We have already moved away from openstack/common/middleware modules
to the oslo_middlware library. Let us cleanup the remaining files
here.

Change-Id: I701b08a28884eb56d12f2829483fe94aa8d2fd1d
2015-06-16 01:32:21 +00:00
John Griffith
19f2f2833a Enable request-id in cinder API logs
Using common.local:store.context doesn't work correctly with
the new oslo_log module.  This change removes the calls to
common.local and removes the file altogether which allows the
proper settings to be passed in to the logging module and give
us back our request-id in the API logs.

Change-Id: If312f419fb465c9128bcfa0a280d6c35a46cb29b
Closes-Bug: #1435588
2015-03-24 15:20:29 +02:00
Jay S. Bryant
b4c9c4d5ad Remove strutils from oslo-incubator
This change goes along with the work to get away from
oslo-incubator modules to using the new oslo libraries.
The strutils module moved to the oslo_utils library and
should no longer be used from oslo-incubator.

Additionally, merging this change removes a dependency on
gettextutils, allowing us to remove another deprecated
module.

Change-Id: Ibd4e848b526c67cad660c31038df718ac416c6e1
2015-03-12 13:34:16 -05:00
Ivan Kolodyazhny
5980da5d88 Use oslo.log instead of oslo-incubator
log module was removed from oslo-incubator after oslo.log released.

Change-Id: I205d0625c502cb462919edc76d12091edcc21b1b
Implements: blueprint port-oslo-incubator-to-oslo-log
Partial-Bug: #1381563
2015-03-11 21:45:04 -05:00
Julien Danjou
c3dd57fb73 Remove useless and unused request_utils
This code is not used and has never been used by Cinder, let's remove
it as it is safe to do so. It's not imported anywhere.

Change-Id: I963caebb304d2211755164a082fc600a9570dd1e
2015-01-27 15:13:54 +01:00
Julien Danjou
5690bdea80 Use uuidutils from oslo.utils
Change-Id: I6313ad1d3da1a8e9efeab5d4f336e6f43f7a9857
2015-01-24 11:47:34 +01:00
ChangBo Guo(gcb)
a9b0355353 Remove module timeutils
Change-Id: I1e548f7dcbb06f7f47f08fc475bb1fe6713b538a
2014-11-24 13:54:23 +08:00
Jenkins
838ef73302 Merge "Remove module jsonutils" 2014-11-24 04:58:46 +00:00
ChangBo Guo(gcb)
9ff5cd40a4 Remove module jsonutils
Sync module jsonutils's consumer module, and remove it.

Change-Id: Idbf61077238e50c486b102d3aa499085a62e3a5d
2014-11-21 20:22:28 +08:00
ChangBo Guo(gcb)
3efbbbde9f Don't use module excutils from oslo-incubator
Remove module excutils and sync its only consumer module fileutils,
which is using oslo.utils.

Change-Id: Ib2c60be9febf5e15b198529b11c978d2e5b6df1f
2014-11-21 17:48:18 +08:00
ChangBo Guo(gcb)
372df8a75b Switch Cinder to use oslo.concurrency
Let's switch to the newly released oslo library for the
processutils and lockutils. We use the config fixture(s) to
specify disable_process_locking and lock_path in the CONF
variable of oslo.concurrency library for correctly setting the
flags.

Change-Id: Ib8f3aac5449eba66ea84bc5cad8aea061adab276
2014-11-20 22:21:46 +08:00
ChangBo Guo(gcb)
7d341e267f Use oslo.utils
oslo.utils library now provides the functionality previously in
oslo-incubator's excutils, importutils, network_utils, strutils
timeutils, units etc. Some of these outdated modules will still be
around for a while until all other oslo modules that use them have been
updated in future commits.

Change-Id: Idee8600dfe42e5977b8fb824e91afff7e9119981
2014-11-20 22:17:47 +08:00
Julien Danjou
bccadadd37 Remove useless sslutils from openstack.common
This module has been named by mistake in openstack-common.conf but has
never been used, except by the RPC code back then. Let's remove it.

Change-Id: Ie0c88d2c962d1daa9f1fcf0b4d0d530c15223aa9
2014-10-09 16:43:17 +02:00
Alexei Kornienko
7975b465d0 Switch to use oslo.db
oslo.db first stable release has been cut and we can start using it
instead of openstack/common/db/* code which is now marked obsolete.

Change-Id: Ib350e8d1dcec3be707e3b1679c70202619256269
2014-07-21 16:10:41 +03:00
Eric Guo
7f13e7e0fd Use oslo-incubator module units
There is Cinder's version units module, that looks good. Considering
consistency with other projects like Nova, Glance, Cinder would be
better to use oslo-incubator's version.

Change-Id: I07e93e9d8a985df0f96c3e80de9c3f23bf6a0c1e
2014-06-22 00:09:40 +08:00
ChangBo Guo(gcb)
2619dd012d Remove unused oslo module and adjust opentstack-common.conf
The issues are detected by new change about update.py
in I68c0108304be8a315bcefe939c22019caab9bc98. This patch
doesn't depend the oslo-incubator patch.
 * remove unused module crypto
 * add missing module loopingcall in openstack-common.conf
 * sort the modules in openstack-common.conf

Change-Id: I9f0fcd3803f89a6902f92d0ea691b9ae0235f64c
2014-06-12 02:52:16 +00:00
Flavio Percoco
bcd9f363ff Port to oslo.messaging
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.

    * 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 cinder.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.

Implements blueprint: oslo-messaging

Change-Id: Ib912809428d92e788558439e2d85b51272ebefdd
2014-03-10 17:03:03 +01:00
Chris Buccella
7e3698417a Sync request_id, request_utils for cinder
This is in preparation for work being done on request ID tracing across
OpenStack services.

Per discussion in blueprint cross-service-request-id , the standard header
name for the request ID across OpenStack projects should be
x-openstack-request-id. The request_id middleware was created for just this
purpose, as oslo change Ic7967cd62e7b743343d70f751b9238339171e013 . Using the
same middleware allows for consistency across projects.

There is an additional oslo module, request_utils, introduced as
change Id085c4444fee2bb68b80738bfe77ccb0ba1908ec to allow uniform logging of
request IDs. Bring that in as well so we have it when necessary.

Implements: blueprint add-standard-req-id-header
Change-Id: If080df2a323347924c93a912538dab5ffeffe982
2014-02-18 17:05:09 +00:00
llg8212
24755ff21f Remove dependent module py3kcompat
Module py3kcompat was removed from oslo-incubator, we can use
six directly.

Change-Id: I6c4266b71312ae53ecaedbd2ce1a865e60eb8d50
Closes-Bug: #1280033
2014-02-14 16:34:59 +08:00
Jenkins
48082814ec Merge "Fix import log_handler error with publish_errors set" 2014-01-26 07:48:38 +00:00
Eric Harney
bc8846e3d5 Sync py3kcompat, sslutils, versionutils from Oslo
Dependencies identified by update.py for RPC update.

py3kcompat:
12d3bbc Add method quote_plus in module py3kcompat.urlutils
8575d87 Removed copyright from empty files
0d8f18b Use urlutils functions instead of urllib/urllib2
12bcdb7 Remove vim header
4c22556 Use py3kcompat urlutils functions instead of urlparse
71743d9 Add urlopen/URLError/pathname2url in urlutils
0f2906f py3kcompat: Add unquote
eaec23b py3kcompat: Add urljoin compatibility
35c317b Fix capitalization, it's OpenStack
4d12ad1 python3: Import translation layer

sslutils:
8b2b0b7 Use hacking import_exceptions for gettextutils._
12bcdb7 Remove vim header
1a2df89 Enable H302 hacking check
99b7c35 Convert kombu SSL version string into integer
b0b37ce Fix IBM copyright strings
f63ea05 Use oslo-config-2013.1b3
e50b68c Support for SSL in wsgi.Service

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

Oslo version:
7a51572 Merge "Implement cache abstraction layer"
Date:   Wed Jan 15 19:31:16 2014 +0000

Change-Id: I72a4ddaa015ce4a8016d580c922e8f7664376cb7
2014-01-23 16:18:01 +02:00
Thierry Carrez
7035ef485e Use oslo.rootwrap library instead of local copy
Remove rootwrap code copied from oslo-incubator, make
cinder-rootwrap a console_script entrypoint pointing in
oslo.rootwrap instead.

Change-Id: I4e924bc9fccd7f5a8522ac38b7c6d29683990ea8
Implements: blueprint cinder-oslo-rootwrap
2014-01-20 09:12:23 +01:00
Chang Bo Guo
f29f812bc6 Fix import log_handler error with publish_errors set
Sync latest module log_handler from Oslo.
Commit Id is 2843a92a0e4007f50d5ad63d51fe574e1ba5e280

This handler sends the error to configured notifier.
The notifier could be any kind (log, RPC, no_op, None).

Note: when using publish_errors you also need to set the
notification_driver option too.

Closes-bug: #1240349
Change-Id: I4f759b049b8f34904ba11382a2e8fc1578677a8f
2014-01-16 18:14:05 -08:00
Dirk Mueller
783e3243f9 Switch to Oslo's config generator
This fixes the sample configuration to contain proper
config groups alongway.

Regenerate sample config with oslo's config generator.

DocImpact: Removes the deprecated memcached_server
option from DEFAULT (now in keystone_authtoken group)

Closes-Bug: #1206650
Closes-Bug: #1260322

Change-Id: I170715bfe6ec7dad9f7317e7bb56cbb68034c4ec
2014-01-02 15:35:16 +01:00
Zhiteng Huang
9c2029a801 Pull latest service module from Oslo
Get latest service module from Oslo to prepare for multi-process API service implementation.
Below are the commits included in this pull.

Changes being pulled into in service module are:
* e7bc8c9 2013-11-20 | Merge "os._exit in _start_child may cause unexpected exception"
* 96a2d4e 2013-11-07 | os._exit in _start_child may cause unexpected exception
* 1771a77 2013-11-05 | Adjust import order according to PEP8 imports rule
* 3110c0f 2013-10-17 | Use multiprocessing.Event to ensure services have started
* b5fba9e 2013-09-18 | Move comment in service.py to correct location
* 11cc74f 2013-08-26 | Fixes issue with SUGHUP in services on Windows
* 825ace5 2013-06-17 | Add service restart function in oslo-incubator
* c935d1c 2013-07-16 | Merge "Allow launchers to be stopped multiple times"
* dc8aa79 2013-07-08 | Allow launchers to be stopped multiple times
* 1a2df89 2013-06-25 | Enable H302 hacking check
* 52e857a 2013-06-19 | Ignore any exceptions from rpc.cleanup().
* 5518ad3 2013-05-16 | Add graceful service shutdown support to Launcher

And these dependent modules
 - cinder/openstack/common/eventlet_backdoor.py
    * 1dcc747 2013-07-15 | Fix stylistic problems with help text
    * 1a2df89 2013-06-25 | Enable H302 hacking check
    * c7c55b2 2013-06-20 | Improve usability when backdoor_port is nonzero
 - cinder/openstack/common/gettextutils.py
    * 3970d46 2013-11-02 | Fix typos in oslo
    * 88db9c8 2013-10-03 | When translating if no locale is given use default locale
 - cinder/openstack/common/jsonutils.py
    * 3d7504b 2013-09-23 | Ensure that Message objects will be sent via RPC in unicode format
    * 1807d32 2013-08-22 | jsonutils: make types py3 compatible
    * bdef862 2013-08-22 | jsonutils: do not require xmlrpclib
    * ded9bd6 2013-08-04 | Make dependency on netaddr optional
    * 7b7566b 2013-06-25 | Add netaddr.IPAddress support to to_primitive()
 - cinder/openstack/common/local.py
    * cb2a2b6 2013-06-28 | Modify local.py to not be dependent on Eventlet
    * 547ab34 2013-03-11 | Fix Copyright Headers - Rename LLC to Foundation
 - cinder/openstack/common/log.py
    * a82e889 2013-11-14 | Merge "Do not name variables as builtins"
    * 2251cb5 2013-11-13 | Do not name variables as builtins
    * 25c5854 2013-11-13 | Adds admin_password as key to be sanitized when logging
    * cbfded9 2013-11-11 | Default iso8601 logging to WARN
    * 76b0cd1 2013-11-04 | Add mask password impl from other projects
 - cinder/openstack/common/loopingcall.py
    * 1a2df89 2013-06-25 | Enable H302 hacking check
 - cinder/openstack/common/threadgroup.py
    * 9d3c34b 2013-10-25 | Add a link method to Thread
    * 1a2df89 2013-06-25 | Enable H302 hacking check
 - cinder/openstack/common/timeutils.py
    * f3b5f17 2013-11-12 | Add helper method total_seconds in timeutils.py
    * 53ebd30 2013-10-18 | python3: use six.text_types for unicode()
    * 3bc6f79 2013-09-19 | Fix timeutils.set_override_time not defaulting to current wall time
    * af76064 2013-08-29 | Optimize timeutils.utcnow_ts()
    * df3f2ba 2013-07-26 | BaseException.message is deprecated since Python 2.6
    * d28fa69 2013-06-27 | python3: Add python3 compatibility.

Partial bp: multi-process-api-service

Change-Id: Ifd25eae9eb2d6ae53bcf1665c3d5b7db4144433c
2013-11-22 16:38:17 +00:00
Zhongyue Luo
9f9ea10db4 Uses oslo.imageutils
Commit 035668 had the QemuImgInfo class moved to Oslo.
This class diverged from Nova and then missed some changes
made in Nova since then. The two projects will be able to use
identical classes by adapting imageutils.

Change-Id: I6ed352c42e45d32de94066c82f83e7332d4a98ed
2013-10-16 13:45:31 +08:00
Mark McLoughlin
40bfdab75c 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:39:56 +01:00
Julien Danjou
0619385630 Remove usage of obsolete oslo.exception
Change-Id: I6f46f90bd74cc26fc01667e467e3dab38037eec3
Closes-Bug: #1208734
2013-08-06 10:42:14 +02:00
Svetlana Shturm
193886a486 Integrate oslo's periodic tasks.
Cinder use old style invocation of periodic tasks, which not based on oslo library.
It will be better to use main idea of periodic tasks for all services.

Blueprint: oslo-periodic-tasks

Change-Id: I6ac1ca28abefcc9d0bbfd41873c8f57d40b4a97a
2013-06-11 07:54:15 +01:00
Roman Podolyaka
b5173e267c Add common Oslo DB code to the source tree
Blueprint: db-session-cleanup

Change-Id: I1e2e6d66474f0f8a655a055d5b2150699d66f1dd
2013-05-23 17:54:10 +03:00
Monty Taylor
381049bc03 Use pbr instead of openstack.common.setup.
Fixes bug 1179007

Change-Id: I71a556bcc36e56f0b51b1191f2622c66c3338474
2013-05-11 16:20:19 -04:00
Mark McLoughlin
d52a0f21f7 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:22:26 +01:00
Zhongyue Luo
8870460211 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: I2b5c56dbf941b272bd89b0dbe6f651196d90944f
2013-04-08 11:11:32 +08:00
Eric Windisch
c946f917d7 Add missing processutils for impl_zmq in oslo rpc
impl_zmq in oslo rpc requires processutils.

Change-Id: Ib2f114a9e78af6d2acdab34c8c787df8abdb967a
2013-03-20 18:07:31 -04:00
Zhiteng Huang
6abb573396 Pull newly merged Olso update for 'is' operator
A recent update to common/scheduler/filters/extra_specs_ops.py in
Oslo added new 'is' operator to allow Boolean check. The original
commit message was:

"Boolean values for capabilities don't work because extra_specs are
all converted to unicode. The scheduler will then check, for example,
if the boolean 'True' is equal to the unicode string 'True', and will
always return False. This patch allows admins to specify '<is> True'
in extra_specs, which will compare successfully to boolean True."

Notice extra_specs_ops now relies on strutils from Olso, so this
change pull strutils from Oslo as well.

Fix bug: # 1146306

Change-Id: I83adf707c30274a3862aa8034e72c3361fd19952
2013-03-08 13:07:14 +08:00
Mark McLoughlin
d5a17b4570 Use oslo-config-2013.1b3
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.1b3 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.

Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).

Change-Id: I4815aeb8a9341a31a250e920157f15ee15cfc5bc
2013-02-19 16:48:02 -08:00
Monty Taylor
b390454b6d Update to latest oslo-version code.
In prep for tag-based versioning, update to latest oslo-version code.

Change-Id: Ic5046006919e20247481fa1ddbde2dfd456b188a
2013-02-07 02:29:27 -06:00
Thierry Carrez
4275a23af9 Import Oslo's common rootwrap to Cinder
Import oslo-incubator's rootwrap, which contains all the new
features and bugfixes that were pushed to nova-rootwrap earlier
in this cycle, including logging support and path search.

Implements bp: cinder-common-rootwrap

Change-Id: I68cbb788a3dda58dc146933be190146607b48801
2013-02-04 17:28:38 +01:00
Joe Gordon
eeb6f8c77f import tools/flakes from oslo
Change-Id: Iac52a0cc48de9f29a91545e319c144e3f935799d
2013-01-31 10:40:03 -08:00