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
Cinder's generate sample script has fallen a
bit out of date and was no longer working properly
in local venv.
This patch updates it with a working version that
reads the rc file and makes some other updates.
Even better, we'll update the tox.ini file here so
that it actually works, and finally add some more
info to the error message when update check fails
to make is obvious how to run these appropriately.
Change-Id: I2389910d8ece6f737a9609ce4aa05263d9293e14
To keep Python 3.x compatibility, use six.moves.urllib.parse to
replace urlparse. tools/lintstack is changed to pass pylint test.
Partial-Bug: #1279611
Change-Id: I0ceaaccbf6c67b45609b4f2f5639c362b32d10ad
This patch adds oslo.messaging to the
CINDER_CONFIG_GENERATOR_EXTRA_LIBRARIES env variable, which adds
oslo.messaging config options to cinder.conf.sample
Implements blueprint: oslo-messaging
Change-Id: I8aed8a8fdbd5b4ef41e3a3a7dcdebc6f216ec75d
This sync pulls the latest Oslo config code over
to Cinder. This sync is needed to include a fix
to config generator which is needed as part of
the work to enabled i18n messages. Config generator
was failing when lazy message translation was enabled.
The following changes are included with this patch. Each
patch includes the file(s) the patch touches:
-> c178e56 Add basic Python 3 tests
--> cinder/openstack/common/__init__.py
-> 12bcdb7 Remove vim header
--> cinder/openstack/common/__init__.py
-> 547ab34 Fix Copyright Headers - Rename LLC to Foundation
--> cinder/openstack/common/__init__.py
-> 44b6ea3 Import oslo.config configuration file generator
--> cinder/openstack/common/config/__init__.py
-> dd9aa2b Remove unused variables
--> cinder/openstack/common/config/generator.py
-> 5dce17b Use entry points to discover options in libraries
--> tools/config/generate_sample.sh
--> cinder/openstack/common/config/generator.py
-> e8e636c generator: add an EXTRA_LIBRARIES env variable
--> cinder/openstack/common/config/generator.py
-> e3dddd7 generator: use EXTRA_* env vars in the bash script
--> tools/config/generate_sample.sh
--> cinder/openstack/common/config/generator.py
-> 6da13e8 generator: rename EXTRA_MODULES_FILE to RC_FILE
--> tools/config/generate_sample.sh
-> 763eedf Fix DictOpt support in config sample generator
--> cinder/openstack/common/config/generator.py
-> e839886 Config generator fails with lazy messages
--> cinder/openstack/common/config/generator.py
-> 343686b Add check_uptodate to tools/config
--> tools/config/check_uptodate.sh
Oslo version:
-> 0f24d82 Fix migration.db_version when no tables
-> Date: Sat, 22 Feb 2014 00:32:18 +0000
Change-Id: I26a95fe96b08d6340b0fce1b9e2949c8e661a946
Closes-Bug: 1280826
Related-bp: i18n-messages
to keep Python 3.x compatibility, use six.moves.cStringIO to
replace StringIO
Change-Id: Id89c6156d9bba0007e8b16cd2cc28413a7cc5fd3
Closes-Bug: #1280964
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
Currently if --virtual-env-name is specified, the tests fail
because it still creates .venv/ but then looks in the specified
location to use the venv.
This makes --virtual-env-name work as expected.
Change-Id: I036cd08f7b7b9dc87e7012f8dd198a26375297a2
In case MultiStrOpt option's value is empty list, current extract_opts.py
logic will ignore it. This patch aims to update func _print_opt:
add the multistropt's option_name in conf even its value is empty list.
This bug also affects https://bugs.launchpad.net/cinder/+bug/1240783
Closes-bug: #1241348
Change-Id: Ica1da0cd20c97a587964cb0059836d609a440145
Updates our example config file so that it includes configuration
settings for the auth_token middleware.
A step towards using cinder.conf instead of the api-paste.ini config file
for authtoken configuration.
Once https://review.openstack.org/#/c/52259/ lands I'll push another
review which removes the settings from api-paste.ini (which takes priority).
Related-Bug #1240753
Change-Id: I6636d33ee522757145ac97fc354324a8b9379700
This fixes all triggers of hacking 0.6.x's warning:
H404 - multi line docstring should start with a summary.
and enables gating check on H404.
Change-Id: I034bd1f05da3f279d8d79aa14a7f6ce8bef5047c
This doesn't serve much purpose, and makes it much harder than it
should be to merge multiple patches that change the sample config.
Change-Id: I44895bfbf4a7c9af30040f84b17a97f8e2f4e5b6
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
tools/conf/check_uptodate.sh is added in run_tests.sh
For simple, run "run_tests.sh -p" will call it, and get following error:
Failed to collect options from module
cinder.volume.drivers.san.hp.hp_3par_common: No module named hp3parclient
Actually, the hp3parclient is listed in test-requirements.txt, and it is
installed in venv.
the check_uptodate.sh should run in venv to get correct result.
update the error message to update the cindier.conf.sample correctly.
-----------
Test method
-----------
$ pwd
/opt/stack/cinder
$ source .venv/bin/activate; tools/conf/generate_sample.sh
(.venv)$ deactivate
$ ./run_tests.sh -p
Running flake8 ...
// no error emitted here
Fixes Bug #1219197
Change-Id: I9b3eaf3c1a5eb395eefed28bb907685cdef147aa
This adds check_uptodate to run_tests and
tox.ini checks.
This also requires that we add novaclient to the
test-requires, since we try and poke at cinder/compute/nova.
There is another implementation in use to do this that
pulls in openstack.common.config.generator,
(see ceilometer project for a pretty slick impl), however
adding that also pulls in a rather large list of
updates and dependencies that quite frankly Cinder
doesn't need and the ones that we do use break
a number of things in Cinder.
There's also a number of additional options added
to generate_sample that I don't think we need right now.
In the future we'll probably want to go this route
but for now I'd just like to get automated checking
in place.
Change-Id: I91aa4d98f472ad5a3ece7773c75ee76d66adafc0
The new auto-pulled requirements files exposed
python 3 compat issues in a number of modules.
We added these to tox.ini ignore temporarily,
this change updates the print routines in bin/cinder
and removes the debug cruft that was in the unit tests.
Will update requirements and test-requirements
appropriately in a follow up patch.
Change-Id: I76ea24f4dc1f61c4f8a1d202b0554c90daf2c9cc
Per (proposed) H203 check, convert all uses of
the deprecated except x,y: construct to except
x as y:, which works with any Python version >= 2.6
Change-Id: I5528dc556f3ef8d356e01d59df04ba57f66c95b7
When trying to test a bug the cinder test framework was
running all the tests when I just wanted one to run.
Instead of fixing this problem in nose I tried to move cinder to
testr. I copied a fair bit of code from nova to get this to work.
This way at least if some one makes an improvement to the nova
test framework cinder can improve here also.
Note that now all the tests a thread safe. Added a concurrency argument
to run_tests.sh that defaults to 1. You can specify your own level then
and take the risk of intermittent failures. Tell jenkins to use a
concurrency level of 1 to avoid failing gate jobs.
Note One of these tests is broken and I have disabled for now. There
is a bug for this here: https://bugs.launchpad.net/cinder/+bug/1173266
Note: cinder.api.openstack.FaultWrapper is deprecated and is causing
a circular import when I try and import cinder.tests.test_wsgi. This
is fixed by only importing the openstack.FaultWrapper during the
__init__ phase of the wsgi middleware.
Fixes: bug 1183434
Fixes: bug 1177924
Change-Id: I5e10b55c5b236eb81a6a3e0e9ea56af8ca4ef8e1
Currently tools/conf/generate_sample.sh collect options from project
modules by importing each module and looking at it's global variables
for instances of classes derived from cfg.Opt (or lists of such
instances). Sometimes this import can fail due to various reasons,
cfg.DuplicateOptError for example. And if import fails no options
from imported module written to sample config file. Error reporting
will at least warn user that some of options didn't get into sample
config.
Change-Id: I831464b1c1575c106d866a936a50ec74b2d44e59
Fixes: bug #1182611
Rename tools/pip-requires to requirements.txt and tools/test-requires
to test-requirements.txt. These are standard files, and tools in the
general world are growing intelligence about them.
Change-Id: Ifb2735151dc8c7f89ec01d237226669f7051ffa8
Fixes: bug #1179008
A bug in PBR levels less than 0.5.10 causes the
/usr/lib/python2.X/site-packages/cinder/db/sqlalchemy/migrate_repo/migrate.cfg
file to not be properly installed. This causes 'cinder-manage db sync'
to fail due to the missing file.
This change sets the required PBR level to >=0.5.10,<0.6 to avoid the problem.
In the case that user already has a 0.5.X level of PBR installed that is less
than 0.5.10 it should be updated rather than encountering issues as our
test system did.
Change-Id: I532158277a4acbb2f8cb75d03c91097e6d7e0312
fixes: bug 1182203
The update of log was mostly to get coloring to work again
in devstack, and jsonutils was picked up as well.
The update to jsonutils also requires the six dependency
which is added to pip-requires.
Change-Id: I95d23aafe19b12d4a427149aa5f7a66394d178c6
lintstack is a pylint-based static analysis tool to find bugs
in Python code.
To run the test via tox: $ tox -e pylint
To run the test directly: $ tools/lintstack.sh
Change-Id: If155f47ed84eb820ac505ee741bdd18edd41b1eb
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
Remove setuptools-git as a run time dependency since
it is only used to generate a tarball.
Change-Id: I6c48147408e97ab88ede660938e783f6b660746a
Signed-off-by: Chuck Short <chuck.short@canonical.com>
This has been deprecated in favour of git-review for quite a while now
and was removed from Nova 10 months ago.
Change-Id: Ic4bfa1aee3a4b6a7588be3678ac033a1b13e2b18
This patch updates all the files from oslo under
stable/grizzly but policy.py. policy.py is a high risk
change at this date and it has lots of changes since the
last time we updated it.
Fixes bug #1157126
Change-Id: I399a1cd8474f718ed5196def90d2fea546fb01f5
This patch is an update of pip-requires and test-requires
using the openstack/requirements script.
One exception was made to pep8, which is being fixed in the
upstream script.
Change-Id: I4bd61e0ec6f1995f9f36a724eb8dbe15345caca0
Fixes bug #1128256
oslo.config has now been released to PyPI in time for Grizzly RC1 so
we can switch to using it directly.
Change-Id: I655f831718ae5f4e25e941ee206fe195214a9a91
In order to support running unit tests on RHEL 6.x we need to patch
eventlet with contrib/redhat-eventlet.patch. We already
have support for this in the tools/install_venv_common.py but we
need to make a couple changes to allow tox to consume this:
1) Sync in the latest intall_venv_common.py from oslo. This changes
patch to use the -N option (ignore already applied patches) and
makes it safe to call the patching function more than once.
2) Add a new patch_tox_venv.py script in tools.
3) Update tox.ini to call patch_tox_venv.py before it runs tests and
coverage.
NOTE: This will hopefully go away eventually once this patch lands:
https://bitbucket.org/eventlet/eventlet/issue/89/add-a-timeout-argument-to-subprocesspopen#comment-3342969
Change-Id: I3e2b07c3f718e4aede5c5f231ff0cdb7721ec885
old install_venv_common used oslo-config, which makes for bad
recursive dependencies, and we can't build a venv from a fresh
tree.
Change-Id: I09336d760842d4eb57f2b70fdfe19afaf6520a48
Fixes bug 1130706
Related to blueprint xenapinfs-glance-integration
This patch enables users to use any images recognised by qemu-img to
create volumes on XenAPINFS.
Change-Id: I9dd8ec237309da82ec7f73db1acb48e5b7411c9e