8492 Commits

Author SHA1 Message Date
Deepti Ramakrishna
fc119315f1 Fix volume filtering for quoted display name
Cinder v2 API allows creating a volume with a quoted (single or double
quotes or even unbalanced number of quotes) display name. But when we
try to get info for such volume, we end up getting an error message
saying that no volume with such a name or ID exists. This error is due
to the inadvertent stripping of quotes from the filter in the api layer.

The api call eventually comes to check_volume_filters() in
cinder/volume/api.py. The invocation of ast.literal_eval() inside this
method strips the quotes for certain quoted strings leading to this
incorrect filtering. ast.literal_eval() is used to convert string
representations into python objects which are then used to frame the
SQL queries in the db layer. For example, the string "[1,2]" for a
filter (not the display name filter) gets converted to a list object
and results in an "IN" operation being emitted in the SQL query as
opposed to an exact match.

When display_name does not contain any quotes or contains an unbalanced
number of quotes, then ast.literal_eval() throws (just like the Python
interpreter would throw for an unquoted string literal or one with
unbalanced number of quotes). We handle this by ignoring the exception
and using the raw input value as the filter and moving on. For string
containing balanced number of quotes, such as, '"foo"',
ast.literal_eval() succeeds and returns the input with the surrounding
quotes stripped (just like how the python interpreter strips quotes
from a string literal to initialize a string var's value in memory).
To always use the raw user input string as the filter value, we can
either not pass string inputs to ast.literal_eval() or encode the
string using encode("string-escape") so that we get the original string
back after passing through ast.literal_eval(). We choose the former as
the latter buys us nothing.

Change-Id: I48e0aea801ccb011cb974eea3d685bb9f35c61b2
Closes-Bug: #1503485
2016-03-02 18:12:18 -05:00
Jenkins
077b8593ae Merge "always use pip constraints" 2016-02-29 18:45:29 +00:00
Jenkins
f1d60b155e Merge "Move deprecation release notes to correct section" 2016-02-29 16:47:46 +00:00
Jenkins
6268c4bc0d Merge "Check for service existance in capabilities API" 2016-02-29 16:46:08 +00:00
Jenkins
350f19d031 Merge "Remove unused pngmath sphinx extension" 2016-02-29 16:29:09 +00:00
Jenkins
b0aac3b865 Merge "Huawei: delete_snapshot need not return any value" 2016-02-29 16:28:51 +00:00
Jenkins
6f81a13654 Merge "Add description when rename LUN in Huawei driver" 2016-02-29 16:28:32 +00:00
Jenkins
a1183d7b7f Merge "Match the ip more accurately in Huawei driver" 2016-02-29 16:27:05 +00:00
Jenkins
5be8ba1586 Merge "Modify the number of params of hypermetro in HuaweiDriver" 2016-02-29 14:18:44 +00:00
Jenkins
14d7b1448b Merge "Move anyjson to test-requirements" 2016-02-29 13:35:40 +00:00
Jenkins
5f2b909ad3 Merge "Add pip-missing-reqs tox env" 2016-02-29 12:59:31 +00:00
Andreas Jaeger
379f272924 always use pip constraints
This flips the tox.ini to always use constraints installation for
all targets. It drops the extra -constraints targets in the process.
This makes it so there is no developer change required to operate in our
new world order.

Change-Id: I2b56835edb2d75b7c871aae030e909578dbb958d
Depends-On: Iecd35d6bc3b1e9e0ed31b48a34e4149d34d55ac2
2016-02-29 13:00:11 +01:00
Jenkins
4d093d4eca Merge "Propoerly call oslo's Service stop and wait" 2016-02-29 10:29:23 +00:00
Jenkins
8b548ce352 Merge "Remove unused kill method from Service" 2016-02-29 10:29:05 +00:00
Jenkins
53f37b9607 Merge "replace deprecated oslo_messaging _impl_messaging" 2016-02-29 10:05:05 +00:00
Jenkins
dc5f1f8d95 Merge "Delete volumes with snapshots" 2016-02-29 05:40:34 +00:00
Jenkins
687ea8dd30 Merge "Improve logging to debug invalid "extra_specs" entries" 2016-02-29 03:14:25 +00:00
Jenkins
23268a686d Merge "Handle OverQuota exception during volume transfer" 2016-02-29 03:14:13 +00:00
Jenkins
d933ca7a04 Merge "Return all target_wwpns for FC storwize" 2016-02-29 02:51:18 +00:00
Jenkins
9c28691578 Merge "Disable multi-attach for RBD" 2016-02-29 02:42:19 +00:00
Jenkins
62a65629ce Merge "Huawei: Judgement failure when creating hypermetro" 2016-02-29 01:56:39 +00:00
Jenkins
064e4775e2 Merge "Fix race condition in RemoteFS create_snapshot_online" 2016-02-29 01:29:46 +00:00
Jenkins
0f9163a8ca Merge "VMware: manage_existing_get_size for VMDK driver" 2016-02-29 01:27:51 +00:00
Jenkins
d04caad581 Merge "Updated from global requirements" 2016-02-28 21:32:24 +00:00
Andreas Jaeger
5abb3d6ce6 Remove unused pngmath sphinx extension
The extension is not used, remove it.

Change-Id: I0720058e8d2235772b5bb82224b68b1b52e6060d
2016-02-28 20:38:22 +01:00
Jenkins
18229c4c68 Merge "Add basic workflow of attach/detach to devref" 2016-02-28 16:09:13 +00:00
Eric Harney
bf2b6b9d90 Delete volumes with snapshots
This adds the 'cascade' parameter to volume delete,
which deletes snapshots along with a volume in
one call.

This is done in the volume manager, and not in
a driver-optimized way, which will be a later
improvement.

Blueprint: del-vols-with-snaps
Change-Id: I33d15b76d4bd0de14c635d404b2c97096c977a58
2016-02-28 14:11:37 +00:00
Jenkins
d46fbf0e13 Merge "Fix error message in cinder type-update" 2016-02-28 01:35:13 +00:00
Jenkins
a34f3be904 Merge "Misprint in policy.json" 2016-02-28 00:35:40 +00:00
Jenkins
bda22d6495 Merge "Enable all unit tests on Python 3.4" 2016-02-27 14:02:25 +00:00
Evgeny Antyshev
4d5e78e436 Misprint in policy.json
Erroneous space in "rule: admin_api" was introduced in change Ibbd6f47c370d8f10c08cba358574b55e3059dcd1
oslo_policy regards space as a separator,
and fails to parse this rule: http://paste.openstack.org/show/488452/

Change-Id: I5de45c97a06b7ddecb36c2a1793c4f3fd5fd21d6
2016-02-27 12:22:44 +00:00
Jenkins
d3fd2828f6 Merge "EMC VMAX - Changing PercentSynced to CopyState in isSynched" 2016-02-27 03:10:40 +00:00
OpenStack Proposal Bot
a5e455c4f2 Updated from global requirements
Change-Id: Iea494af5b9112af93030f5e8b86c907551e9ee40
2016-02-27 02:42:33 +00:00
Jenkins
33af888db3 Merge "Volume manage/unmanage support to ZFSSA drivers" 2016-02-27 02:21:55 +00:00
Jenkins
0572862455 Merge "Change frozen error messages from _LE to _" 2016-02-27 02:20:04 +00:00
Wilson Liu
66a77e4112 Huawei: delete_snapshot need not return any value
Currently delete_snapshot return True or False to indicate
whether the snapshot is really deleted on the array. This
is useless and just write for unit tests. Now we will remove
the return value and add another unit test for delete_snapshot.

Closes-Bug: #1549584
Change-Id: I17fea61e3c0f5565ab04bc82f172e638480f45dc
2016-02-27 09:59:17 +08:00
Wilson Liu
b2816f3b4a Match the ip more accurately in Huawei driver
Currently we didn't match the ip in the iqn accurately,
now we will fix this in this patch.

Closes-Bug: #1545914
Change-Id: I32232fcc6cad733b0dd8fa8c323297f6fbac3137
2016-02-27 09:51:43 +08:00
Jenkins
842c5d8825 Merge "Replication v2.1 (Cheesecake)" 2016-02-27 01:50:21 +00:00
Wilson Liu
5e0bc7cb2e Add description when rename LUN in Huawei driver
Sometimes when we rename a LUN on the array, we should
add some description to record some information like
volume id on cinder side. This patch will enable this.

Closes-Bug: #1537304
Change-Id: Ib156e61b5b1e305c41426cf5c6001dd44770140c
2016-02-27 09:44:23 +08:00
GaoZqiang
4c692ba363 Modify the number of params of hypermetro in HuaweiDriver
When attaching or detaching hypermetro volume, the initialization
instance has three parameters, but the function definition has five
parameters.

Change-Id: I8343a7b75e02962c321a838de148acc54498f952
Closes-Bug: #1545971
2016-02-27 09:08:19 +08:00
Jenkins
63cc4a2b77 Merge "Fix NoneType error in service_get_all" 2016-02-26 22:51:09 +00:00
Helen Walsh
cfba8b3584 EMC VMAX - Changing PercentSynced to CopyState in isSynched
In SE 8.x PercentSynced no longer works for VMAX3 as a criteria to
determine whether a device is synched or not. Luckily 'CopyState'
works for both VMAX2 and VMAX3 and is backward compatible with 7.6.x.

Change-Id: I443e5f17f3c0e779ebdfd868bcd05cb85b52f525
Closes-Bug: #1517103
2016-02-26 22:18:23 +00:00
Jenkins
6b7bc11700 Merge "LeftHand: Updating minimum client version" 2016-02-26 21:34:14 +00:00
John Griffith
9906ea1ed7 Add basic workflow of attach/detach to devref
This is something that confuses folks and isn't centrally
located.  So... add it to the devref docs and hope that
developers read it.

There's tons of detail we can add in the future of course,
but this at least clears up some of the common misconceptions
that exist currently.

Change-Id: Ic5fb8da06d18fac3369a91a525accc75c1d28100
2016-02-26 21:24:29 +00:00
John Griffith
a1152a786e Change frozen error messages from _LE to _
The super secret formula states that the error messages should
use '_' instead of '_LE'.  This patch changes the ones introduced
in Replication V2.1.

Change-Id: I9a4b87421eeda69ca918cbf869f2990ef113e158
2016-02-26 21:22:01 +00:00
John Griffith
106c14a84b Replication v2.1 (Cheesecake)
This focuses the replication work on a specific use case,
and eliminates some of the ambiguity in earlier versions.

Additionally this implementation addresses needs for
devices that do replication based on the whole backend-device
or on Pools.

Use case:
  DR scenario, where a storage device is rendered inoperable.
  This implementation allows the preservation of user data
  for those volumes that are of type replication-enabled.

  The goal is NOT to make failures completely transparent
  but instead to preserve data access while an Admin tries
  to rebuild/recover his/her cloud.

It's very important to note that we're no longer interested in
dealing with replication in Cinder at a Volume level.  The concept
of have "some" volumes failover, and "others" left behind, proved
to not only be overly complex and difficult to implement, but we
never identified a concrete use-case where one would use failover
in a scenario where some volumes would stay and be accessible on
a primary but other may be moved and accessed via a secondary.

In this model, it's host/backend based.  So when you failover,
you're failing over an entire backend.  We heavily leverage
existing resources, specifically services, and capabilities.

Implements: blueprint replication-update

Change-Id: If862bcd18515098639f94a8294a8e44e1358c52a
2016-02-26 13:15:19 -07:00
Jenkins
0f5e61bf6e Merge "EMC ScaleIO - fix bug in extend volume" 2016-02-26 19:45:52 +00:00
Jenkins
5f5485e79c Merge "Huawei: Fix create volume with prefetch value error" 2016-02-26 19:25:37 +00:00
Jenkins
eccd7d7c5b Merge "EMC VMAX - not cleaning up HW Resource WWPN initiators" 2016-02-26 18:21:08 +00:00
Jenkins
0018c92d96 Merge "Huawei: Don't fail when port group does not exist" 2016-02-26 18:19:54 +00:00