The way these are organized makes it rather hard to
associate comments and their messages, and makes it
more work to modify this list in a meaningful way (or
re-use it for a project like os-brick).
Move things around a bit to make this easier to manage.
Change-Id: Ieebca9f97f6b15832693a37fa03f97c1074d64e8
The most recent version of bandit no longer requires a configuration
file (bandit.yaml) to run the default test suite. Removing the
configuration file and updating the bandit arguments will run all of
the currently available bandit tests in the default test suite.
Change-Id: If144c4017ce9bb58c3e83b62a5e31325353200b5
Most of the parts for oslo-incubator have moved to
oslo libraries. Cinder only had imageutils.py and
_i18n.py remaining in cinder/openstack/common. I
was to able remove both of these remaining incubator
components.
oslo_utils now has imageutils available. I moved
cinder/image/image_utils.py to use the new
imageutils from oslo_utils and updated all the other
places that were using the old imageutils import.
_i18n was only being used in scheduler/base_filter.py
which appears to have been accidentally left when the
scheduler was previously pulled out of incubator. I
fixed this oversight.
Finally, this patch deletes cinder/openstack/common
cinder/openstack and the openstack-common.conf file.
Change-Id: I8fe0b5d6c278715620f93f682289df7ae60dbeba
Closes-bug: 1517861
This currently doesn't report failures.
Also restrict files tested to HEAD~1..HEAD
instead of HEAD~2..HEAD.
Change-Id: I4983db5594fc2746eb28ec87a74d5d0ba27c9aaf
Previously in the generation of the opts.py file, the option groups
were hard coded. Now, they are pulled out as the lines are parsed.
If a group doesn't already exist in the dictionary it gets added and
then the options are added to the section. If the group already exists,
the options are added to the proper section as you would expect, and if
the options being registered don't have a group, they are added to the
default section.
This patch also moves the check for a non-zero exit code from
oslo-config-generator to the right location in the file. This
logic had been put too late in the file and was not catching
oslo-config-generator failures as it should have been.
Change-Id: I59c8067e8091d8bb212e3609f3a174ddc287707e
This patch adds the opts.py file to the tree as a fix for deployers
that package cinder. The opts.py file is no longer being deleted right
away by generate_sample.sh after the cinder.sample.conf is being
generated.
This patch also introduces a pep8 check to make sure that the opts.py
file is up to date, so that it will catch when new opts get added to
Cinder without the opts.py being updated.
To support the ability to keep and check the opts file a number
of changes were needed in the check_uptodate.sh script as well as
the generate_sample.sh script:
- check_uptodate now takes --checkopts instead of --checkonly
When checkopts is used the opts.py file is generated using the
current code and the generated file is compared to the existing
file. The check fails if there are differences.
- generate_sample now has the --nosamplefile option.
When this option is used, only the opts.py file is generated.
The oslo-config-generator code is skipped so no sample file
is created.
- generate_sample also has some coding style consistency changes.
- Added the 'genopts' option to tox so users can generate
a fresh opts.py without a sample file when necessary.
Closes-Bug: 1501820
Co-Author: Jay Bryant <jsbryant@us.ibm.com>
Change-Id: I1f5494ebb19d5f4e8c651cbeef0acad07ad96829
The following patch updates create_volume API to use
volume versionedobjects. Changes were made to be
backwards compatible with older RPC clients. It
only includes changes to the core cinder code.
Changes in the drivers are left to each driver
maintainer to update.
Note that this patch DOES NOT try to use
object dot notation everywhere, since it would
increase the size of the patch. Instead, it
will be done in subsequent patches.
Co-Authored-By: Michal Dulko <michal.dulko@intel.com>
Change-Id: Ic1b0f09132f8fc500b29650abbd57f18ea8bd9dd
Partial-Implements: blueprint cinder-objects
Change-Id: Ief9c63e8bddb2b40bdef4465b9099cff33d7c3bc
This replicates the run_tests.sh -8 behavior, running
flake8 only on changes made in the last commit and
working tree.
Change-Id: Iebd5746c78e840225f0860843c77f4c638877c26
As it stands, the opts.py file that is passed into
oslo-config-generator isn't being generated dynamically
and the old way of generating the cinder.conf.sample is
dependent on oslo-incubator which Cinder is trying to
move away from. oslo-config-generator works differently
than oslo-incubator so a number of changes had to be made
in order to make this switch.
This patch adds the config directory to Cinder and in it
are two files:
-generate_cinder_opts.py that will take the
results of a grep command to create the opts.py
file to be passed into oslo-config-generator.
-cinder.conf which is the new configuration for
oslo-config-generator. The file is inside the config
directory to be consistent with other projects.
Some changes were made to the generate_sample.sh file in
order to give the base directories and target directories
to the generate_cinder_opts.py program.
tox.ini was edited to remove the checkonly option because
all that needs to happen in check_uptodate.sh is a check to
ensure that the cinder.conf.sample is actually being
generated with no issues.
All options were removed from the check_uptodate.sh
because they were unnecessary given the new, more simple
way of generating the cinder.conf.sample.
setup.cfg was also edited in order to add information
oslo-config-generator needs to run.
Co-Authored By: Jay Bryant <jsbryant@us.ibm.com>
Co-Authored By: Jacob Gregor <jgregor@us.ibm.com>
Change-Id: I643dbe5675ae9280e204f691781e617266f570d5
Closes-Bug: 1473768
Closes-Bug: 1437904
Closes-Bug: 1381563
Change I3febb95bb2b3dd8f10da4f01ffa705e39cb20520 wasn't passing pylint
gate because of missing objects_ignore_messages entries in linstack.py.
This commits adds these entries.
Change-Id: I9e42a065d6584b445f2fed8995de32adbea7739b
Closes-Bug: 1493905
When importing backup metadata only required fields were being imported,
and all other fields were being ignored.
This led to some serious problems when importing backups back, since
you would lose not only the original Volume ID, but also relevant parent
id information needed to restore incremental backups.
This patch fixes this by importing everything back and creating backup
records with the right ID.
Closes-Bug: #1455043
Closes-Bug: #1476416
Depends-On: Id7ab6e174c1fe85772477f03059c4f457c5c8b17
Change-Id: Ia42ba73e9078d993c63f8e16308151ad11721ea9
Add versionedobjects abstraction layer to services. Distinguish time
zone aware DateTime fields. The object derives from
CinderObjectDictCompat, so it supports both object (obj.prop) and dict
(obj['prop']) syntax to access properties. Complete move to object
notation will be made in a follow up clean up patch.
Co-Authored-By: Michal Dulko <michal.dulko@intel.com>
Change-Id: I09f593f9f9aa8befa40d989b731159b78a429071
Partial-Implements: blueprint cinder-objects
Adds --checkonly to tools/config/check_uptodate.sh.
This allows verifying that a configuration file was
generated.
We have had a number of issues introduced which
have caused config file generation to fail since we
removed the sample config file check in the gate.
This does not add back checks to ensure that the file
has been updated, it only checks to ensure that it is
still possible to update the sample file.
Change-Id: I2e0e376fbdec5a1bb584c6739231649e1d0f5d8e
This change adds a basic bandit config for Cinder. It can be invoked
by running the tox environment for bandit;
tox -e bandit
This is intended as a starting point for using bandit with Cinder
and it should be revisited to improve the testing as more is learned
about the specific needs of the Cinder code base.
Tox is configured to only show results for high and medium severity
results.
https://wiki.openstack.org/wiki/Security/Projects/Bandit
Change-Id: I0247e0ccaed6faacacb2b8d2f8b141a8edc704af
It is useful to have a maintained (in source control) list
of drivers that exist in Cinder. It could be used in docs
and unit tests to check method impl on backend drivers.
This change add tool for generate list of drivers based on
existing BaseVD class in class hierarchy of volume drivers.
Output example:
Drivers: ['cinder.volume.drivers.lvm.LVMVolumeDriver',
'cinder.volume.drivers.rbd.RBDDriver',
...]
Implements: blueprint drivers-list-generator
Change-Id: I0e10906873e659e09a6e34531a0c932495d7c399
SQLite doesn't support 'drop constraint' statament. So it notifies:
SAWarning: Table 'encryption' specifies columns 'volume_type_id'
as primary_key=True, not matching locally specified columns
'encryption_id'; setting the current primary key columns to
'encryption_id'. This warning may become an exception in a future
release.
Add new strategy for sqlite upgrade: table is renamed to temporary
name, new table is created followed by INSERT statements, and
renamed to original one.
Change-Id: I723fdadb946f6944dde03954409899a9ddc3ee0e
Closes-Bug: #1431374
Use oslo.service.service and periodic_task entry points to generate
a sample configuration file. oslo.service library doesn't have
an oslo.service entry point.
Change-Id: Ib3c320d73494258e2ef973a62a54b6afb6b95988
Closes-Bug: 1468955
oslo.service has graduated, so cinder should consume it.
Change-Id: I80487f559302b0e88953835ffb4a3bfe2a347501
Closes-Bug: #1466851
Depends-On: I305cf53bad6213c151395e93d656b53a8a28e1db
Noticed today while working on fixing issues
with the config generator that oslo_policy
had been added in the wrong location for
pulling the config options in to the config
generator.
This fix moves the items that had been put in
oslo.config.generator.rc but were missing in generate_sample.sh
over to the appropriate location. I also removed the option for
importing additional libraries in oslo.config.generator.rc
given that it will not work.
I am still working on a longer term solution, but
we really should get this fixed so we can generate sample
config files again.
Change-Id: I2c14c1acc49d68305dca5a3dedc686ab07ed2088
This patch adds VersionedObjects abstraction layer to volume backups.
The object derives from CinderObjectDictCompat, so it supports both
object (obj.prop) and dict (obj['prop']) syntax to access properties.
Complete move to object notation will be made in a follow up clean up
patch.
Co-Authored-By: Grzegorz Grasza <grzegorz.grasza@intel.com>
Change-Id: Icff37261b367463b71a1268be16f9c97f595bf0c
Partial-Implements: blueprint cinder-objects
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
The following patch switches direct db calls in
volume/api.py get_all_snapshots to use SnapshotList
instead.
Partial-Implements: blueprint cinder-objects
Change-Id: Ifdccc81a087f9797fcfbf098d3ecea3875ad7bd9
This patch dumps pretty_tox.sh and gets Cinder on board
with using ostestr. We're setting a concurrency value
of 6 (instances in the gate are 6 VCPU's), and things
seem to be stable at this value.
For folks running on 'smaller' system, it's still possible
to run in parallell; > ncpu's but if there are problems you
can still specify concurrency in your tox argument. Tox will
take the last occurence of the conncurrency argument; so for
example if you specify "tox -epy27 -- --concurrency=4" the
interpretted value for concurrency in the run will be 4.
Closes-Bug: #1459852
Change-Id: Iae12b42e915da22c863781015512df4f30aa95ca
Replace list(dict.iterkeys()) with list(dict). The call to iterkeys() is
useless and the iterkeys() method of dictionaries was removed in
Python 3
Change-Id: I16733643d4b92fe8134eec2549bbd679fe75fb9c
We just moved to using a hybrid approach that
uses the new oslo-config-generator for pulling out
library options to create the cinder.sample.conf file.
In that patch it was expected that we should use oslo_*
for the namespace. That, however, is not how
oslo-config-generator works.
This patch switches to using oslo.* for the namespace to get
the library options pulled in. This also fixes the fact that
we were putting multiple '[DEFAULT]' sections into the file.
Change-Id: Ie799d4d7e6deb2c486a93c5095fc3b766679fa95
Partial-bug: 1449235
After moving to oslo.config we still were using
incubator config generator. This was ok, but the
problem is we haven't been pulling config options
from the oslo libs.
This is a hack that just appends external lib calls
and appends those options to the sample file being built.
Change-Id: I2634b20ef4abd3bf7990f845d59ad3d208db234f
Closes-Bug: #1447380
Abstract volumes and volume snapshots into objects.
Get, create, and delete snapshot APIs were changed to
use new snapshot objects. A skeleton volume object was
created, but cinder internals were not changed to use
the volume object, although volume is referenced and
used by the snapshot object. The internals will be
changed to use volume object in a subsequent patch.
Change-Id: I387018e80c8539565e99454db65d976030002c0f
Implements: blueprint cinder-objects
This patch is to insert the objects code base, currently based
on nova.objects. It will be later based on
oslo_versionedobjects once it is available. This is done
to make progress on changing cinder internals to use objects,
since nova.objects and oslo.versionedobjects are similar.
Inserted objects code base into cinder and modified cinder services
to use object-aware serializer.
Change-Id: I42a6cc43da19ca29db4cfb33cbf794afed18f758
Implements: blueprint cinder-objects
This commit adds the pretty_tox.sh script and the usage of
subunit-trace to the cinder unit test jobs. This also updates the
run_tests.sh script to use subunit-trace so it'll have consistent
output formatting with the tox job.
Change-Id: I8ceafb476dc488b388c7f63501ef48128d8383d2
We used extra library oslo.concurrency in Cinder, and oslo.concurrency
provides configuration options, we need include these options in sample
config file. This commit handles that.
Change-Id: I534539b7e87a3f5dc36722395cbe241a10b2d75e
Change oslo.db to oslo_db
Change oslo.config to olso_config
Change oslo.rootwrap to oslo_rootwrap
The oslo libraries are moving away from namespace packages.
Partial-bug: 1409733
Change-Id: I3429282afa2db4c0b3aa630eb3a0eaece04405ed
The install_venv_common modules hasn't had a sync done
since early in the icehouse release. This sync brings
Cinder's version up to date with the latest code.
Current HEAD in OSLO:
---------------------
commit 36b0e8570b449129d6d474c03b02ceb62edb78df
Date: Thu Dec 11 11:27:08 2014 +0100
We shouldn't replace `oslo-incubator` in comments
Change being merged with this patch:
---------------------
fe3389e5 - Improve help strings
Change-Id: I66fd66650a7106b8d20e4fc483dabb91184922f9
The following pylint error was found:
cinder/backup/drivers/swift.py:486: [E1101, SwiftBackupDriver.backup]
Module 'hashlib' has no 'sha256' member
Affected patch:
https://review.openstack.org/#/c/110068/
A similar pylint error "Module 'hashlib' has no 'sha224' member"
was also generated.
However, both 'sha256' and 'sha224' are functions in 'hashlib'. So
these errors should be ignored.
Change-Id: I84690813b6c6a15e661e27acdf97149996951978
auth_token middleware in python-keystoneclient is deprecated and has
been moved to the keystonemiddleware repo.
Closes-Bug: #1342274
Change-Id: I1aadbe24db63eb2507b088cd53886d7f2e192cab
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