Dave McCowan [Mon, 7 Dec 2015 19:25:24 +0000 (14:25 -0500)]
Check context before returning cached value
The key manager caches the value of barbican client to be reused,
saving an extra call to keystone. The cached value is only
applicable to the current context, so the context must be checked
before returning the cached value.
Change-Id: Ib10909a098fb2cd070129c239b6d3b95edc8fea0
Closes-Bug: #
1523646
Jenkins [Sun, 6 Dec 2015 20:39:39 +0000 (20:39 +0000)]
Merge "Address potential races in SolidFire VAG"
Jenkins [Fri, 4 Dec 2015 21:47:50 +0000 (21:47 +0000)]
Merge "Use proper config option to connect to keystone"
Jenkins [Fri, 4 Dec 2015 05:21:34 +0000 (05:21 +0000)]
Merge "Remove version per M-1 release instructions"
Jenkins [Fri, 4 Dec 2015 01:43:20 +0000 (01:43 +0000)]
Merge "Adding devref about genconfig"
Jenkins [Thu, 3 Dec 2015 23:04:41 +0000 (23:04 +0000)]
Merge "Remove deprecated LVM ISCSI and ISER Drivers"
Jenkins [Thu, 3 Dec 2015 23:03:46 +0000 (23:03 +0000)]
Merge "VMware: Unit test refactoring (image to vol - 2/2)"
Jenkins [Thu, 3 Dec 2015 21:09:34 +0000 (21:09 +0000)]
Merge "VMware: Replace mox with mock"
Jenkins [Thu, 3 Dec 2015 20:59:24 +0000 (20:59 +0000)]
Merge "VMware: Unit test refactoring (image to vol - 1/2)"
Chris Morrell [Wed, 2 Dec 2015 22:27:37 +0000 (22:27 +0000)]
Address potential races in SolidFire VAG
While building the initial volume access group solution I realized there were
race conditions present. This patch attempts to address those by being far
more careful during VAG creation and removal. Tracking multiattach volume
detaches around VAG volume removal introduced all sorts of future race
conditions so instead multiattach volumes are treated differently and are only
removed from VAGs on volume removal. Not ideal but it'll get the job done.
Think I covered all the new branches with unit tests. Complexity was introduced
but it should be worth it due to the safety that was also introduced.
Change-Id: I80034cdf759295c8d379c02ed9e42659590b41a9
Sean McGinnis [Thu, 3 Dec 2015 02:39:08 +0000 (20:39 -0600)]
Remove version per M-1 release instructions
http://lists.openstack.org/pipermail/openstack-dev/2015-November/080692.html
Change-Id: I4b86c46c8fee6edad8e450c7b9f1606ff62af64e
Depends-on: Icce2f139b5ae88eab294f6547df766f9eceb03a6
Szymon Borkowski [Tue, 1 Dec 2015 13:12:03 +0000 (14:12 +0100)]
Use proper config option to connect to keystone
Earlier, quotas used to authenticate to endpoint from not required
option located in keymgr.encryption_auth_url. Now, the required
auth_uri option from config file is used to authenticate to
keystone.
Co-Authored-By: Michal Dulko <michal.dulko@intel.com>
Change-Id: I1076527704f8def2c6755c060df49232e5ebe805
Closes-Bug:
1516085
Jenkins [Thu, 3 Dec 2015 08:21:23 +0000 (08:21 +0000)]
Merge "Robustify writing iscsi target persistence file"
Jenkins [Thu, 3 Dec 2015 05:12:17 +0000 (05:12 +0000)]
Merge "Add a FakeGateDriver"
Jenkins [Thu, 3 Dec 2015 03:00:38 +0000 (03:00 +0000)]
Merge "LIO: Handle initiator IQNs as case insensitive"
Mitsuhiro Tanino [Fri, 25 Sep 2015 16:38:23 +0000 (10:38 -0600)]
Robustify writing iscsi target persistence file
With the current code, it's possible to end up with a zero-size
persistence file (or even corruption of the contents) if the
process gets killed or the system takes a power outage.
Switch to a "write to temp file and rename" model for writing the
persistence file. This will make it more robust against unclean
process termination or unclean system shutdown.
Change-Id: Ic4fdb5a9f6f622b2ab9658f7d4206e4c8ca55046
Closes-Bug: #
1499795
Jenkins [Wed, 2 Dec 2015 23:18:55 +0000 (23:18 +0000)]
Merge "Fix dictionary key error"
Jenkins [Wed, 2 Dec 2015 23:11:36 +0000 (23:11 +0000)]
Merge "Port Windows drivers to Python 3"
Kendall Nelson [Wed, 2 Dec 2015 20:59:33 +0000 (14:59 -0600)]
Adding devref about genconfig
This adds a description of the generation of opts.py and
cinder.conf.sample, the commands to generate them, and the scripts
that do the work generating them.
Change-Id: I6217e81acb9ee49c66cd510d55b40e1fd6fc3b3b
Eric Harney [Tue, 1 Dec 2015 23:14:17 +0000 (18:14 -0500)]
LIO: Handle initiator IQNs as case insensitive
If there is a mismatch in case between the stored
initiator IQN in the LIO ACL vs. the IQN provided
in a later call, rtstool would fail to find the
existing ACL.
Compare IQNs in a case insensitive manner to ensure
they will always match as intended. (Refer to RFC
3720 section 3.2.6.1 for details on this.)
Closes-Bug: #
1522053
Change-Id: I6f535f3f4fbfcbbb49da30cffb08d17b3cac778a
Tomas Hancock [Wed, 2 Dec 2015 15:07:05 +0000 (15:07 +0000)]
Fix dictionary key error
The key 'multipath' was being referenced in the 'connector' dictionary
in initialize_connection(), even though the key was not always set.
Change-Id: Ia3c7640a24ebe9bedec3402f6cefb7e457c66ecd
Closes-Bug: #
1522062
Jenkins [Wed, 2 Dec 2015 16:15:09 +0000 (16:15 +0000)]
Merge "Imported Translations from Zanata"
Vipin Balachandran [Wed, 25 Nov 2015 13:34:48 +0000 (19:04 +0530)]
VMware: Replace mox with mock
This patch replaces usages of mox with mock in the VMDK driver unit tests.
It also refactors the unit tests for copy_volume_to_image so that those
tests test only a single method.
Closes-Bug: #
1261097
Change-Id: I50925a3aed1df12a283e9ec20f2bc2add1aad162
Vipin Balachandran [Tue, 24 Nov 2015 12:04:12 +0000 (17:34 +0530)]
VMware: Unit test refactoring (image to vol - 2/2)
There are cases where a single test tests multiple methods. This
patch refactors the unit tests for the following methods in the
vmdk module to fix this issue:
* _create_virtual_disk_from_preallocated_image
* _create_virtual_disk_from_sparse_image
* _fetch_stream_optimized_image
There will be follow-up patches to fix the remaining unit tests.
Change-Id: I6b738f08b89e518c78a26a934fead42cc86e0c24
Depends-On: Icd2c3d506647b7b9405d83612433fea735d13cc9
Vipin Balachandran [Tue, 24 Nov 2015 12:00:44 +0000 (17:30 +0530)]
VMware: Unit test refactoring (image to vol - 1/2)
There are cases where a single test tests multiple methods. This
patch refactors the unit tests for the following methods in the
vmdk module to fix this issue:
* copy_image_to_volume
* _create_volume_from_non_stream_optimized_image
There will be follow-up patches to fix the remaining unit tests.
Change-Id: Icd2c3d506647b7b9405d83612433fea735d13cc9
Jenkins [Wed, 2 Dec 2015 11:47:50 +0000 (11:47 +0000)]
Merge "Fix typo in LIO terminate_connection error msg"
Jenkins [Wed, 2 Dec 2015 10:36:28 +0000 (10:36 +0000)]
Merge "Delete unused codes in rbd.retype"
OpenStack Proposal Bot [Wed, 2 Dec 2015 06:26:12 +0000 (06:26 +0000)]
Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: I88351b055df8fe0f973b9cf48b1276981ef07a2e
Jenkins [Wed, 2 Dec 2015 04:39:27 +0000 (04:39 +0000)]
Merge "Fix the bug of can't get the desired image info"
Sean McGinnis [Fri, 27 Nov 2015 21:18:50 +0000 (15:18 -0600)]
Remove deprecated LVM ISCSI and ISER Drivers
The LVMISCSIDriver and LVMISERDrivers were deprecated in the Kilo
release. This removes both drivers and related test code.
Any existing users of LVMDriver should switch to using the
LVMVolumeDriver and set the iscsi_helper to the desire iSCSI helper
(tgtadm, lioadm, or iseradm).
Some unit tests under these driver test classes were not actually
specific to these drivers. Relevant unit tests were moved to a
different test class if they looked useful.
Change-Id: I30aec59e639cdbbb50daa2caacc243518e593418
LisaLi [Thu, 12 Nov 2015 06:08:11 +0000 (06:08 +0000)]
Delete unused codes in rbd.retype
Before rbd.retype is called, encryption and host have
been checked so that encryptions are different and
host are same.
Meanwhile, as extra_spec is not used during the
rbd driver. As a result, even if they are different
rbd.retype can still return True which means no need
to do further migration.
Change-Id: Id025a51631676389203b8e3892a5826c834105ca
Closes-Bug: #
1515493
Closes-Bug: #
1514775
Jenkins [Wed, 2 Dec 2015 02:38:22 +0000 (02:38 +0000)]
Merge "EMC VMAX - Change naming convention for MV and SG for FAST"
Jenkins [Wed, 2 Dec 2015 02:38:11 +0000 (02:38 +0000)]
Merge "Add some missing fields to Volume object"
Jenkins [Wed, 2 Dec 2015 02:38:00 +0000 (02:38 +0000)]
Merge "Sheepdog: Optimization of error handling"
Jenkins [Wed, 2 Dec 2015 02:37:49 +0000 (02:37 +0000)]
Merge "Add retype in lvm driver"
Jenkins [Wed, 2 Dec 2015 02:37:36 +0000 (02:37 +0000)]
Merge "Add Mitaka-1 release notes"
Jenkins [Wed, 2 Dec 2015 01:42:11 +0000 (01:42 +0000)]
Merge "xio: fix regression in authentication"
Jenkins [Wed, 2 Dec 2015 00:14:27 +0000 (00:14 +0000)]
Merge "Cleanup orphaned code in sqlalchemy API"
Jenkins [Tue, 1 Dec 2015 20:43:32 +0000 (20:43 +0000)]
Merge "Take into consideration races in XtremIOClient3"
Sean McGinnis [Mon, 30 Nov 2015 19:50:01 +0000 (13:50 -0600)]
Add Mitaka-1 release notes
This adds release notes for changes up to the Mitaka-1
milestone for reno release note generation.
Change-Id: I8cd65b41994631d96c5d4cf4c0531a3c0f74149f
Jenkins [Tue, 1 Dec 2015 18:27:34 +0000 (18:27 +0000)]
Merge "Update compression license check"
Jenkins [Tue, 1 Dec 2015 17:45:18 +0000 (17:45 +0000)]
Merge "Imported Translations from Zanata"
Victor Stinner [Tue, 1 Dec 2015 10:00:03 +0000 (11:00 +0100)]
xio: fix regression in authentication
The change I75a5dee2fd1f8cf45dbf416b0353736a43efd8e8 replaced
base64.encodestring(auth_key)[:-1] with
oslo_serialization.base64.encode_as_text(auth_key)[:-1]. It's wrong
because base64.encodestring() adds '\n' to the output, wheras
oslo_serialization.base64.encode_as_text() doesn't add '\n'.
This change removes '[:-1]' to strip the newline, it's no more
needed.
Partial-Implements: blueprint cinder-python3
Change-Id: Ib015a850d7cc2e1259518fecfe66c836002b28d9
Szymon Wroblewski [Thu, 29 Oct 2015 11:45:06 +0000 (12:45 +0100)]
Add some missing fields to Volume object
Volume object was missing fields that were defined on
the SQLAlchemy model as relationships or backrefs such as
consistencygroup, glance_metadata and snapshots.
This commit adds fields representing these relationships.
Partial-Bug:
1509012
Co-Authored-By: Szymon Borkowski <szymon.borkowski@intel.com>
Change-Id: I2f4cae34833b6b97278adf2abb52cef44405c093
Jenkins [Tue, 1 Dec 2015 14:35:55 +0000 (14:35 +0000)]
Merge "Cleanup orphaned code from ceph backup driver"
OpenStack Proposal Bot [Tue, 1 Dec 2015 06:54:03 +0000 (06:54 +0000)]
Imported Translations from Zanata
For more information about this automatic import see:
https://wiki.openstack.org/wiki/Translations/Infrastructure
Change-Id: I3b3c0a26c4b16174e22b7a4d5b17a9b9195693cd
Jenkins [Tue, 1 Dec 2015 05:48:25 +0000 (05:48 +0000)]
Merge "Optimize "open" method with context manager"
Jenkins [Tue, 1 Dec 2015 05:35:00 +0000 (05:35 +0000)]
Merge "Fix ZFSSA drivers' local cache bugs"
Jenkins [Tue, 1 Dec 2015 03:55:22 +0000 (03:55 +0000)]
Merge "Remove db access in VNX driver"
Jenkins [Tue, 1 Dec 2015 03:36:25 +0000 (03:36 +0000)]
Merge "Declare multiattach is True in Dell Eqlx driver"
LisaLi [Fri, 13 Nov 2015 02:09:03 +0000 (02:09 +0000)]
Add retype in lvm driver
During retype operation, it makes sure that volume
types have same encryption, and same backend qos
before moving on.
In lvm driver, no extra_spec and qos are used. As
a result, if retype a volume to same host, it just
needs to return True, and no needs to migrate the
volume.
Change-Id: Id6273046424190ee3e36dabd4bfcf69466bf23ad
Closes-Bug: #
1515840
Jenkins [Tue, 1 Dec 2015 00:32:45 +0000 (00:32 +0000)]
Merge "Updated from global requirements"
Jenkins [Mon, 30 Nov 2015 18:08:14 +0000 (18:08 +0000)]
Merge "Force releasenotes warnings to be treated as errors"
Jenkins [Mon, 30 Nov 2015 16:38:43 +0000 (16:38 +0000)]
Merge "Improve metadata update operations"
Gorka Eguileor [Mon, 30 Nov 2015 11:04:58 +0000 (12:04 +0100)]
Take into consideration races in XtremIOClient3
When working with FC and xtremio is using XtremIOClient3 on FC's
terminate_connection we can get VolumeBackendAPIException saying a
resource could not be found when we shouldn't.
The cause is that Client3 is open to race conditions on 2 methods,
find_lunmap and num_of_mapped_volumes, where a list of mappings is first
retrieved and then we iterate this list to retrieved additional info on
the mappings.
The race would happen if one of the mappings is removed from the backend
in the time it takes to retrieve the additional info after we have
retrieved the list.
This patch fixes this issue by ignoring any mappings that have been
removed and are now NotFound when retrieving additional information for
a mapping in those 2 methods.
This patch also fixes this kind of race problems on volume creation
since it uses find_lumap method.
Closes-Bug: #
1521143
Change-Id: I40831e04093ff475395870a333211dd0cb60440f
Jenkins [Mon, 30 Nov 2015 15:42:30 +0000 (15:42 +0000)]
Merge "Add atomic conditional updates to objects"
xiexs [Sat, 28 Nov 2015 05:53:54 +0000 (13:53 +0800)]
Optimize "open" method with context manager
Replace the classic open() with opening context manager to open
files which is in the create_iscsi_target methods of volume targets.
Change-Id: I12e19801a21b1279308983fd0257dae9c9653641
OpenStack Proposal Bot [Sun, 29 Nov 2015 02:32:40 +0000 (02:32 +0000)]
Updated from global requirements
Change-Id: Ie81ad596ae6b473c90e01f91f293895532ca0756
zhangsong [Sun, 15 Nov 2015 15:46:23 +0000 (23:46 +0800)]
Sheepdog: Optimization of error handling
Since each place where _run_dog() is called needs to handle a
connection error, it would be more efficient to handle it inside
the _run_dog() method.
Change-Id: Ib1eb3044e583b46a8a42f820bf780600415122e8
zhangsong [Fri, 13 Nov 2015 16:44:53 +0000 (00:44 +0800)]
Fix the bug of can't get the desired image info
When we use 'qemu-img info' command to get image info, some kinds
of image may show an 'unavailable' disk size. For example:
$qemu-img info sheepdog:volume-
1af1afa0-7820-4063-9b90-
4fa6161a74a9
image: sheepdog:volume-
1af1afa0-7820-4063-9b90-
4fa6161a74a9
file format: raw
virtual size: 10G (
10737418240 bytes)
disk size: unavailable
$qemu-img info -f rbd rbd:data/foo
image: rbd:data/foo
file format: rbd
virtual size: 10G (
10737418240 bytes)
disk size: unavailable
cluster_size:
4194304
The current code didn't consider 'unavailable' size, and it will
raise a ValueError in this case. This patch fixed this bug by
adding the judgment of 'unavailable' size.
Change-Id: Ic5f3b80e172baaafc07432319f8aa24bf117b392
Closes-Bug: #
1516083
Jenkins [Fri, 27 Nov 2015 23:11:37 +0000 (23:11 +0000)]
Merge "ScaleIO extend volume round up capacity"
Sean McGinnis [Fri, 27 Nov 2015 20:12:06 +0000 (14:12 -0600)]
Cleanup orphaned code in sqlalchemy API
There were several methods in the sqlalchemy code that were no longer
being used anywhere. While some of these have potential for being useful,
they are not in use and should not be sitting around the codebase waiting
for someone to need them.
Change-Id: Ic30d27b29d19de5470c9fffadc136988899525ca
Sean McGinnis [Fri, 27 Nov 2015 05:25:31 +0000 (23:25 -0600)]
Cleanup orphaned code from ceph backup driver
The method _num_backup_snaps was not being called anywhere in the source.
This removes the unused call from the driver.
Change-Id: Ib094edff6c26a21177405a988f132c3c6c8c9646
Jenkins [Thu, 26 Nov 2015 17:01:34 +0000 (17:01 +0000)]
Merge "Nexenta Edge iSCSI backend driver"
Jenkins [Thu, 26 Nov 2015 16:08:36 +0000 (16:08 +0000)]
Merge "Update list_replication_targets"
Jenkins [Thu, 26 Nov 2015 16:08:15 +0000 (16:08 +0000)]
Merge "RBD: Make snapshot_delete more robust"
Jenkins [Thu, 26 Nov 2015 15:57:35 +0000 (15:57 +0000)]
Merge "Fix quotas issue during volume transfer"
Jenkins [Thu, 26 Nov 2015 15:54:58 +0000 (15:54 +0000)]
Merge "Hacking Checks for assertTrue/IsNone()"
Michał Dulko [Thu, 26 Nov 2015 09:15:32 +0000 (10:15 +0100)]
Force releasenotes warnings to be treated as errors
Change-Id: I03a8071114d8d4042ad143b55860e5562d86b34d
Xi Yang [Tue, 27 Oct 2015 04:11:15 +0000 (12:11 +0800)]
Remove db access in VNX driver
DB access should be removed in all CG related
operations. This patch is removing the DB access
in VNX driver.
Change-Id: Ifee0cdcaba41d39500c1ce7aef0d15b2737e6a20
Closes-Bug:
1511663
Jenkins [Thu, 26 Nov 2015 05:53:24 +0000 (05:53 +0000)]
Merge "Remove netaddr useless requirement"
Mitsuhiro Tanino [Fri, 13 Nov 2015 20:01:32 +0000 (15:01 -0500)]
Fix quotas issue during volume transfer
When admin transfers a volume with volume type from
one tenant to another, it correctly updates the quota
for the default values, but does not update for the
volume type values.
This patch fixes the problem to update quotas for
the volume type values.
Change-Id: If444639cea8e74a415220df43fccfb155ca89216
Closes-Bug: #
1501855
Jenkins [Thu, 26 Nov 2015 04:39:51 +0000 (04:39 +0000)]
Merge "Support insecure NAS security options in Quobyte"
Jenkins [Thu, 26 Nov 2015 04:37:34 +0000 (04:37 +0000)]
Merge "Revert "Add Scality SRB driver""
Jenkins [Thu, 26 Nov 2015 01:40:32 +0000 (01:40 +0000)]
Merge "Fix InstanceLocalityFilter scheduler filter"
wuyuting [Wed, 25 Nov 2015 02:00:44 +0000 (10:00 +0800)]
Declare multiattach is True in Dell Eqlx driver
An Eqlx volume can be attached to multi instances, however,
this feature is not declared in eqlx driver. As a result,
if a user create a multi-attached volume using eqlx as
backend, they will be failed.
In this commit, we declared multiattach is True in eqlx
driver.
Change-Id: Ia8e94e739c2573f1f26d8cb2713a6b851adf9428
Closes-Bug: #
1519570
mikhail [Tue, 24 Feb 2015 16:00:43 +0000 (08:00 -0800)]
Nexenta Edge iSCSI backend driver
Nexenta Edge project supports iSCSI block level storage.
This patch implements a driver for Nexenta Edge iSCSI backend.
DocImpact
Implements: blueprint nexentaedge-iscsi-volume-driver
Change-Id: I82c215ba85e9d49723e792d88d86553b3a75d3ac
Dirk Mueller [Thu, 29 Jan 2015 13:11:35 +0000 (14:11 +0100)]
RBD: Make snapshot_delete more robust
Since there is no equivalent of a force-snapshot-delete,
the normal snapshot-delete should be more robust to
also handle backend errors. In case the backend does not have
the image snapshot anymore, log an info message and succeed the
operation.
Change-Id: I7fe0878dbc07053ac78272b6998513fafa1c36e8
Closes-Bug: #
1415905
Related-Bug: #
1361926
Kendall Nelson [Tue, 17 Nov 2015 18:39:58 +0000 (12:39 -0600)]
Hacking Checks for assertTrue/IsNone()
This patch adds a hacking check to make sure that assertEquals isn't
comparing the result value to True or None. When developers
use assertEquals(None, return_value) the check will catch it when
pep8 runs and suggest using assertIsNone(return_value) instead.
Similar situations will occur when trying to use assertTrue(True,
return_value).
This patch also makes the necessary changes that get caught by the
new hacking check.
Change-Id: I56cc8121784eee617c09fb4e92b4ebb5877a0553
Jenkins [Wed, 25 Nov 2015 16:44:58 +0000 (16:44 +0000)]
Merge "Fix ScaleIO driver provisioning key"
Jenkins [Wed, 25 Nov 2015 16:34:26 +0000 (16:34 +0000)]
Merge "VMware: Validate extra spec opt vmware:clone_type"
Bertrand Lallau [Wed, 25 Nov 2015 15:52:26 +0000 (16:52 +0100)]
Remove netaddr useless requirement
This patch cleans up the requirement list to remove netaddr module
that is not used anymore directly by cinder.
Change-Id: I0d0efbf26fb43e94f2ccc1a62edaba6f2b13f27e
Gorka Eguileor [Fri, 21 Aug 2015 17:06:07 +0000 (19:06 +0200)]
Improve metadata update operations
Currently our metadata operations in the DB and the API are less than
optimal, main issues are:
- To update metadata first we get all metadata in the API and add
requested update metadata, then on the DB we retrieve each of the
metadata keys and update one by one contents.
- When deletion of existing keys is requested in the DB we retrieve all
metadata contents and for those that are not in the new metadata we
retrieve the contents from the DB (again) and delete the entry.
This patch changes this so we no longer retrieve metadata in the API,
deletion does not retrieve any metadata from the DB and just makes 1
deletion request to the DB, and for changes we retrieve metadata once
and then issue a bulk change to create new entries and update existing
ones.
Partial-Bug: #
1238093
Change-Id: I12506541cca61282122e319e3504560f68df225b
Gorka Eguileor [Sat, 25 Jul 2015 10:34:28 +0000 (12:34 +0200)]
Add atomic conditional updates to objects
To allow atomic state changes across Cinder services we need to
implement a way to easily do compare-and-swap.
This patch adds methods to allow compare-and-swap on DB models and on
Cinder Versioned Objects as well.
Conditions for the compare part of the update can consist of:
- Inclusion: status == 'available'
- Exclusion: status != 'in-use'
- Multi-inclusion: status in ('available', 'error')
- Multi-exclusion: status not in ('attaching', 'in-use')
- Sqlalchemy filters
A complete example of usage would be the compare-and-swap used in volume
delete requests that has to take in consideration not only the status
but the attach and migration status as well as the volume not having
snapshots:
now = timeutils.utcnow()
expected = {'attach_status': db.Not('attached'),
'migration_status': None,
'consistencygroup_id': None}
good_status = ('available', 'error', 'error_restoring',
'error_extending')
if not force:
expected.update(status=good_status)
# Volume cannot have snapshots if we want to delete it
filters = [~sql.exists().where(models.Volume.id ==
models.Snapshot.volume_id)]
updated = vol_obj.conditional_update(
{'status': 'deleting',
'previous_status': vol_obj.model.status,
'terminated_at': now},
expected,
filters)
It can also be specified whether to save already dirtied fields from the
objects or not and by default (if no expected_values argument is
provided) it will make sure that the entry in the DB has the same values
as the objects we are saving.
We can select values based on conditions using Case objects in the
'values' argument. For example:
has_snapshot_filter = sql.exists().where(
models.Snapshot.volume_id == models.Volume.id)
case_values = volume.Case([(has_snapshot_filter, 'has-snapshot')],
else_='no-snapshot')
volume.conditional_update({'status': case_values},
{'status': 'available'})
Exclusion and multi-exclusion will handle, by default, NULL values like
Python does instead of like SQL does, so NULL values will be considered
different than any non NULL values. That way if we search for something
not equal to 1 we will also get NULL values.
WARNING: SQLAlchemy does not allow selecting order of SET clauses, so
for now we cannot do things like
{'previous_status': model.status, 'status': 'retyping'}
because it will result in both previous_status and status being set to
'retyping'. Issue has been reported [1] and a patch to fix it [2] has
been submitted.
[1]: https://bitbucket.org/zzzeek/sqlalchemy/issues/3541
[2]: https://github.com/zzzeek/sqlalchemy/pull/200
Specs: https://review.openstack.org/232599/
Implements: blueprint cinder-volume-active-active-support
Related-Bug: #
1490944
Related-Bug: #
1238093
Related-Bug: #
1490946
Related-Bug: #
1469659
Related-Bug: #
1493120
Related-Bug: #
1493419
Related-Bug: #
1493476
Related-Bug: #
1494466
Change-Id: If90a37f8c7d6fad8fc1f861d52ba862875920cdc
Nicolas Trangez [Wed, 25 Nov 2015 13:45:09 +0000 (14:45 +0100)]
Revert "Add Scality SRB driver"
The Scality SRB kernel-driver is being re-designed to optimize for
specific workloads, which are (initially) not compatible with VM-style
block device access. Not to confuse users, we believe it's advisable to
remove the Cinder SRB driver in the meantime.
This reverts commit
a23f17f8cebe5e1e57f675aedf6272257257d1b7.
Some references to the SRB driver and test modules added in later
commits are removed as well.
Conflicts:
cinder/tests/unit/test_srb.py
cinder/volume/drivers/srb.py
etc/cinder/rootwrap.d/volume.filters
See:
2f9e4163f42ae5246fd997b9f35e16d3d97be54f
See:
3fda737f53824170bd59eb6e8ce2e991c89c3c1d
Change-Id: Ic9d79b09363ef904932128f63371ba01a15c5d31
Jenkins [Wed, 25 Nov 2015 13:41:49 +0000 (13:41 +0000)]
Merge "Remove kombu as a dependency for Cinder"
Jenkins [Wed, 25 Nov 2015 13:41:27 +0000 (13:41 +0000)]
Merge "Port xio driver to Python 3"
Jenkins [Wed, 25 Nov 2015 12:53:32 +0000 (12:53 +0000)]
Merge "Port key manager to Python 3"
Vipin Balachandran [Wed, 25 Nov 2015 12:06:21 +0000 (17:36 +0530)]
VMware: Validate extra spec opt vmware:clone_type
This patch validates the value of extra spec option 'vmware:clone_type'.
It raises an exception if the value is invalid.
Change-Id: Idab59a090184e1ea1446e9e9ed18c753d5c803cc
Closes-Bug: #
1288254
Jenkins [Wed, 25 Nov 2015 05:16:08 +0000 (05:16 +0000)]
Merge "Remove stubs and add resource cleanup"
John Griffith [Tue, 24 Nov 2015 21:46:19 +0000 (14:46 -0700)]
Update list_replication_targets
We were planning to let the list targets call be a
free for all, and just be a generic dict of info.
This probably isn't such a great idea, inparticular since
we have a required identifier field for each replication
device it makes more sense to just use that in the response
and leave the rest of the info internal.
In the future if there's a need we can always implement a
show command that displays all the dirty details.
This patch changes the identifier name to 'target_device_id'
to be more self describing, and updates the docstrings and
devref docs to reflect the changes and agreed upon changes.
Change-Id: If14130f5d5bb2e6df4478bd0e14a1f33d706bf78
Jenkins [Tue, 24 Nov 2015 20:03:09 +0000 (20:03 +0000)]
Merge "Declare multiattach is True in RBD driver"
Victor Stinner [Tue, 24 Nov 2015 16:42:07 +0000 (17:42 +0100)]
Port key manager to Python 3
* Replace text.decode('hex') with binascii.unhexlify(text)
* test_barbican: base64 string is a bytes string
* tests-py3.txt: add keymgr tests
Partial-Implements: blueprint cinder-python3
Change-Id: Icc19fa354603857b259458b858e27c5bdd600360
Jenkins [Tue, 24 Nov 2015 19:10:42 +0000 (19:10 +0000)]
Merge "Don't build two tox envs for pep8(-constraints)"
Jenkins [Tue, 24 Nov 2015 19:10:31 +0000 (19:10 +0000)]
Merge "Add check_uptodate.sh --checkopts to "pep8""
Jenkins [Tue, 24 Nov 2015 19:10:18 +0000 (19:10 +0000)]
Merge "Fix metadata retrieval in GPFS driver"
Jenkins [Tue, 24 Nov 2015 18:21:04 +0000 (18:21 +0000)]
Merge "VMware: Skip unsupported datastore types"
Jenkins [Tue, 24 Nov 2015 18:00:06 +0000 (18:00 +0000)]
Merge "Move oslo-incubator's scheduler module to cinder"
Jenkins [Tue, 24 Nov 2015 17:14:34 +0000 (17:14 +0000)]
Merge "Port IBM storewize_svc driver to Python 3"
Jenkins [Tue, 24 Nov 2015 16:49:06 +0000 (16:49 +0000)]
Merge "CG API should return volume type IDs"