9803 Commits

Author SHA1 Message Date
Cao Shufeng
f9d52850e7 Do not conjecture volume-id from iscsi_name
Now iscsi target driver assumes that volume name always start with
"volume-". In fact the name can be configured[1]. This change gets
the volume id from volume object directly.

Closes-Bug: #1597317

[1]: 9da9ebb345/cinder/objects/volume.py (L142)

Change-Id: Iaa366fbc4ddc0265255e5a4d2bb9d166a665856c
2016-07-08 01:36:06 -04:00
Jenkins
9da9ebb345 Merge "Replace use of mox with mock in test_base_filter" 2016-07-08 01:41:14 +00:00
Jenkins
24e0309ecc Merge "EMC ScaleIO should return ceiling of volume size" 2016-07-07 19:47:04 +00:00
Yuriy Nesenenko
33e4ccd4bc Replace use of mox with mock in test_base_filter
This patch replaces the remaining cases of mox with mock
in scheduler/test_base_filter.py

Change-Id: I85d13dacf7445a299368b8e9db43c8d5b49154f8
2016-07-07 14:04:00 +03:00
Jenkins
0a2265d256 Merge "Fix manage existing volume fails after object merged" 2016-07-07 09:49:41 +00:00
Jenkins
4e3d2efdd9 Merge "check the validity of metadata when update volume" 2016-07-07 08:17:12 +00:00
Jenkins
5c40bf9225 Merge "RBD: uppercase rbd_opts for consistency" 2016-07-07 04:23:40 +00:00
Jenkins
6fa7634833 Merge "Implemented unit test cases for HPE LeftHand driver" 2016-07-07 04:19:50 +00:00
Jenkins
f0d891034a Merge "Huawei: Use versionedObject" 2016-07-07 04:19:34 +00:00
wanghao
e2a80eaa92 Fix manage existing volume fails after object merged
In updating manage_existing to use volume object,
some issues were introduced. Fix them quickly.

Co-Authored-By: Chuck Fouts <fchuck@netapp.com>

Change-Id: Id0a60c5eaf5e6a133d0f911ab00fc66540ade447
Closes-Bug: #1594421
2016-07-07 09:58:40 +08:00
Jenkins
5097a9eff5 Merge "Snapshot object has no attribute about size" 2016-07-07 01:38:51 +00:00
Jenkins
18239b69e7 Merge "Add unit tests in cinder component for 3PAR driver" 2016-07-06 23:48:10 +00:00
Jenkins
837beca474 Merge "Remove unused LOG" 2016-07-06 23:48:00 +00:00
Jenkins
11aa26bef9 Merge "'display-name' is not used in snapshot_manage" 2016-07-06 23:47:45 +00:00
Jenkins
b472011f72 Merge "Validate extra_specs type" 2016-07-06 23:47:29 +00:00
Jenkins
ca850533e5 Merge "cinder-manage db purge has issues with foreign keys" 2016-07-06 18:06:31 +00:00
Jenkins
7a629c3f0f Merge "Add return parameter info for manage_existing_get_size" 2016-07-06 17:35:30 +00:00
Jenkins
d03eee4707 Merge "Storwize: fix unmapped multi-attached volume failure" 2016-07-06 17:06:50 +00:00
liangjingtao
b5fca83a12 Snapshot object has no attribute about size
Snapshot object has no attribute about size,but some unit tests
still use snapshot['size'].We should use snapshot['volume_size']
to modify it correctly.This patch will fix it.

Change-Id: Ibe237334482fc2decdd23181d1843cd19df95bfa
Closes-Bug: #1599522
2016-07-06 14:14:25 +00:00
Eric Harney
1f8be4bebe Add return parameter info for manage_existing_get_size
The standard seems to be to use an integer here,
so let's document that.

TrivialFix

Change-Id: I1e690ca2edb175f83e255b1a1ed0b2fdcc8ece06
2016-07-06 13:54:12 +00:00
Jose Castro Leon
b6d5948988 cinder-manage db purge has issues with foreign keys
When executing purge on a database with snapshots created from volumes
with glance metadata, it fails due to a foreign key exception.
This patch adds the table at the end of the purge and forces the use of
foreign key checks on the tests

Change-Id: I67436a8319155bb47dfa67544ccae25f337ed246
Closes-Bug: #1489523
2016-07-06 14:52:29 +02:00
Wilson Liu
15ed23df11 Huawei: Use versionedObject
Since the core code has been changed to use
versionedObject, Huawei drivers now changes to
use versionedObject too.

Implements: blueprint huawei-use-versionedobject
Change-Id: I4d0e7ac804a9d42754e7f7ce70cdd8af132e173a
2016-07-06 19:36:33 +08:00
Jenkins
afb81cd022 Merge "Remove white space between print and ()" 2016-07-06 07:45:43 +00:00
Jenkins
a0a96a8e55 Merge "EMC VMAX - locking SG for concurrent threads" 2016-07-06 07:38:52 +00:00
Jenkins
a1105e3abd Merge "EQLX: Extend of snapshot or clone failure" 2016-07-06 04:14:52 +00:00
Jenkins
11bd594ad1 Merge "Add README in release notes directory" 2016-07-05 22:16:57 +00:00
Jenkins
4c7bd2dd21 Merge "Remove translation from config options" 2016-07-05 22:16:46 +00:00
Jenkins
cc87c5ee74 Merge "Log terminate_connection exception with traceback" 2016-07-05 22:16:31 +00:00
Jenkins
06adcf926f Merge "Fix some typos" 2016-07-05 22:16:15 +00:00
Jenkins
b81f4f2f94 Merge "Add logging when filtering returns nothing" 2016-07-05 22:11:12 +00:00
Pablo Iranzo Gómez
b96e3c2068
Fix some typos
Change-Id: Ie395b13e219d58894350fce26d57676a06d5d938
2016-07-05 15:11:39 +02:00
Jenkins
18cfc87056 Merge "Just a few spelling modification. "occurred"" 2016-07-05 12:38:20 +00:00
Jenkins
857343de60 Merge "Updated from global requirements" 2016-07-05 12:34:56 +00:00
Pranali Deore
7a1742c668 Add logging when filtering returns nothing
When hosts are filtered for a request, and no host passes all the
filters, operators can only see the last filter run; they have no
visibility into which filter removed which host. This attempts to
improve this situation by tracking the hosts remaining after each
filter is run and the number of hosts removed. If no host is left,
that information along with volume ID of the request would be logged.

Since that can be a lot of information, it will call LOG.info with
just the counts for all but the final filter, which will contain
the last deleted host names, LOG.debug will output the full record
of each filter and the hosts remaining after each step.

This will better enable operators to determine why a particular host
was not selected.

Change-Id: I3baf75a4a4430c55b30dde1cae86fa5e195ec6d3
2016-07-05 07:26:04 -04:00
Vipin Balachandran
618139e5f7 Validate extra_specs type
Currently volume type creation with extra_specs set to null or
a string fails with AttributeError. This is because the current
validation logic assumes that extra_specs is a dictionary. This
patch fixes it by checking whether extra_specs is a dictionary
and raises InvalidInput if it is not.

Change-Id: Icc3580b5b1d784fa9c7fe07ac1c539af1b292075
Closes-bug: #1599106
2016-07-05 15:47:29 +05:30
Hyeock Kwon
4547afd0db Just a few spelling modification. "occurred"
Change-Id: If7ba51cb61a1d9caae26a27d0e94d8fedd630003
2016-07-05 17:54:09 +09:00
Jenkins
c99ac09a8c Merge "Add proper scheduler_hint key to dev-ref" 2016-07-05 08:11:40 +00:00
yuyafei
8d33f6b97a Remove white space between print and ()
TrivialFix

Change-Id: Ibd777ccd779a1b70e3862430ebd7dbafc0b73ffb
2016-07-05 15:58:04 +08:00
Jenkins
421f625494 Merge "Add __ne__ built-in function" 2016-07-05 05:37:45 +00:00
zhufl
4c6dc3a6c1 Remove unused LOG
This is to remove unused LOG to keep code clean.

Change-Id: I768eb14992e2b65255b3f4356dda77030e17d6d4
2016-07-05 10:36:28 +08:00
Jenkins
60b3dfdb02 Merge "Replace use of mox with mock in test_api_urlmap" 2016-07-04 20:14:09 +00:00
Béla Vancsics
bcaa956028 Use assertEqual/Less/Greater/In/IsNone
Instead of using assertFalse(A * B) / assertTrue(A * B),
developers should use assertEqual/NotEqual/Less/LessEqual
/Greater/GreaterEqual/In/NotIn/IsNone/IsNotNone
The * operator: '==', '!=', '<', '<=', '>', '>='

Change-Id: I11b60a93c089f688c6b243da01d20c205c4f2df9
2016-07-04 17:58:16 +02:00
OpenStack Proposal Bot
a13e1dba2f Updated from global requirements
Change-Id: I28fb711fef983981cbc5b82148d5baad4bdcead6
2016-07-04 11:35:17 +00:00
yuyafei
e6e2ef4d69 Add __ne__ built-in function
In Python 3 __ne__ by default delegates to __eq__ and inverts the
result, but in Python 2 they urge you to define __ne__ when you
define __eq__ for it to work properly [1].There are no implied
relationships among the comparison operators. The truth of x==y
does not imply that x!=y is false. Accordingly, when defining
__eq__(), one should also define __ne__() so that the operators
will behave as expected.
[1]https://docs.python.org/2/reference/datamodel.html#object.__ne__

Change-Id: I40878c38fd27933d73225ba49bd69b425f13dc6a
2016-07-04 17:07:41 +08:00
xiexs
f63d89dd3b Add proper scheduler_hint key to dev-ref
In the dev-ref, the hint key for volume create API
should be 'OS-SCH-HNT:scheduler_hints' but not 'scheduler_hints'.
Furthermore, it should be parallel with the key 'volume'.
To be more clear fix the example as well.

Change-Id: I999aebb0e53ebac5dc121ef1ccdc98f9d5ac816a
2016-07-04 00:11:49 -04:00
wangxiyuan
f6aec5bb96 check the validity of metadata when update volume
The volume update API also allow users to update the volume'metadata.
But cinder doesn't check the length limit. It'will raise 500 error
if the metadata is longer than 255. We should check it and raise
413 at the api layer to keep the same with the volume metadata
update API.

Change-Id: I3928ffff9aab6a8071d0641fa6b40b10b1f6bc10
Closes-bug: #1598007
2016-07-04 11:10:27 +08:00
Jenkins
6f2112caa8 Merge "Deprecate defining c-vol backends in DEFAULT" 2016-07-02 20:08:42 +00:00
Sean McGinnis
a337fb3f80 EQLX: Extend of snapshot or clone failure
When creating a volume from a snapshot or cloning an existing
volume the driver first creates a new volume of the original
size, then extends the volume if needed to meet the requested
size. The extend call in these operations were passing the
wrong arguments into the extend_volume call, resulting in an
exception being thrown.

Change-Id: I503543fc45a0607d295a2ebe3602436857fc8ff8
Closes-bug: #1598148
2016-07-02 14:37:53 -05:00
Jenkins
a63059db85 Merge "Implement match-set type 3PAR FC VLUN creation" 2016-07-02 19:06:01 +00:00
Jenkins
8f60693610 Merge "Correct reraising of exception" 2016-07-02 17:03:27 +00:00