]> review.fuel-infra Code Review - openstack-build/cinder-build.git/log
openstack-build/cinder-build.git
10 years agoFixes an issue with 3PAR attach
Walter A. Boring IV [Fri, 2 May 2014 22:30:47 +0000 (15:30 -0700)]
Fixes an issue with 3PAR attach

There was a case that during vlun creation
the location returned back from the 3PAR
didn't include the NSP value.

Change-Id: I6c6341fda65df0e8ce148f3d926990a50471a2db
Closes-Bug: #1315542

10 years agoMerge "Replace tearDown with addCleanup - Part 2"
Jenkins [Fri, 2 May 2014 13:23:44 +0000 (13:23 +0000)]
Merge "Replace tearDown with addCleanup - Part 2"

10 years agoMerge "Add disabled kwarg to service_get_all_by_topic"
Jenkins [Wed, 30 Apr 2014 11:33:38 +0000 (11:33 +0000)]
Merge "Add disabled kwarg to service_get_all_by_topic"

10 years agoMerge "Fixed 3PAR driver issue finding correct vlun"
Jenkins [Tue, 29 Apr 2014 17:57:12 +0000 (17:57 +0000)]
Merge "Fixed 3PAR driver issue finding correct vlun"

10 years agoMerge "Fix double "the" in Cinder quota warning"
Jenkins [Tue, 29 Apr 2014 16:47:12 +0000 (16:47 +0000)]
Merge "Fix double "the" in Cinder quota warning"

10 years agoMerge "Improve consistency of help strings"
Jenkins [Tue, 29 Apr 2014 16:02:27 +0000 (16:02 +0000)]
Merge "Improve consistency of help strings"

10 years agoMerge "Replace tearDown with addCleanup - Part 5"
Jenkins [Tue, 29 Apr 2014 16:01:58 +0000 (16:01 +0000)]
Merge "Replace tearDown with addCleanup - Part 5"

10 years agoFix double "the" in Cinder quota warning
Arne Wiebalck [Tue, 29 Apr 2014 12:37:41 +0000 (14:37 +0200)]
Fix double "the" in Cinder quota warning

Amend a Cinder warning printed with a double "the".

Change-Id: I1471514c9bae84de4b2bef9b11a163314a00802e

10 years agoFixed 3PAR driver issue finding correct vlun
Walter A. Boring IV [Mon, 28 Apr 2014 21:30:47 +0000 (14:30 -0700)]
Fixed 3PAR driver issue finding correct vlun

This patch fixes an issue that happens when
a volume is attached to the same host
more than once.  The driver wasn't looking
for the correct VLUN on the 3par after the
VLUN was created.  We now get the VLUN
information in the return of the creation call.

Change-Id: Id570094f29900c0adcffe6c9d4145c9ad5e3ce4e
Closes-Bug: #1313894

10 years agoStorwize/SVC driver detach volume failed
Li Min Liu [Tue, 22 Apr 2014 02:56:54 +0000 (10:56 +0800)]
Storwize/SVC driver detach volume failed

If config two backends on the same storage, but the protocol is
different, one is FC and the other is iSCSI,  that will create two
hosts on the storage.

When detaching the volume which is attached to the iSCSI host, the
driver will get FC host by default, that causes volume status keeps
'detaching'.

Change-Id: Idbdb3861574197549625b4a6b6141197e42857ff
Closes-Bug: #1310559

10 years agoAdd disabled kwarg to service_get_all_by_topic
git-harry [Fri, 25 Apr 2014 16:03:13 +0000 (17:03 +0100)]
Add disabled kwarg to service_get_all_by_topic

service_get_all_by_topic disabled kwarg allows results to include
where disabled is True or False or both.

Updated code where service_get_all_by_topic is used to make use of
disabled kwarg instead of filtering afterwards.

Removed logging of disabled services in host_manager.

Closes-Bug: #1285673
Change-Id: I748461e64acd4e9563c4016781c5e1d4b116dac8

10 years agoMerge "Replace tearDown with addCleanup - Part 4"
Jenkins [Fri, 25 Apr 2014 08:20:19 +0000 (08:20 +0000)]
Merge "Replace tearDown with addCleanup - Part 4"

10 years agoMerge "Cinder list does not filter admin metadata."
Jenkins [Fri, 25 Apr 2014 08:14:25 +0000 (08:14 +0000)]
Merge "Cinder list does not filter admin metadata."

10 years agoMerge "Remove unused volume instance_uuid methods"
Jenkins [Fri, 25 Apr 2014 08:14:22 +0000 (08:14 +0000)]
Merge "Remove unused volume instance_uuid methods"

10 years agoImprove consistency of help strings
Andreas Jaeger [Sat, 18 Jan 2014 15:45:45 +0000 (16:45 +0100)]
Improve consistency of help strings

Fixes include rework of text, missing or extra spaces, wrong
capitalization and no sentence style capitalization.

Co-Authored-By: Diane Fleming <diane.fleming@rackspace.com>
Change-Id: Iddab947ce9597f4a1de885f1f6c0fb0e5ba9dc46

10 years agoMerge "Fix handling multiple WWPNs on preferred FC node"
Jenkins [Thu, 24 Apr 2014 18:35:54 +0000 (18:35 +0000)]
Merge "Fix handling multiple WWPNs on preferred FC node"

10 years agoRemove unused volume instance_uuid methods
Walter A. Boring IV [Thu, 24 Apr 2014 17:44:37 +0000 (10:44 -0700)]
Remove unused volume instance_uuid methods

This patch removes a db api call that is only
used in unit tests.

Change-Id: Ic686eacdee21d13f8c7c7a16d7353211abc7579a
Related-Bug: #1255925

10 years agoCinder list does not filter admin metadata.
Juan Manuel Olle [Wed, 23 Apr 2014 20:44:28 +0000 (17:44 -0300)]
Cinder list does not filter admin metadata.

For example, if you want to filter by 'readonly' attribute,
you do not get results.
This patch adds the admin metadata for filtering.

Change-Id: Ia2a72776e649abd82160cb13ad63489cc760b190
Closes-Bug: #1311277

10 years agoMerge "vmware: Remove deprecation warning from VC driver"
Jenkins [Thu, 24 Apr 2014 11:44:57 +0000 (11:44 +0000)]
Merge "vmware: Remove deprecation warning from VC driver"

10 years agoMerge "Keep volume available if retype fails due to quota"
Jenkins [Wed, 23 Apr 2014 16:42:21 +0000 (16:42 +0000)]
Merge "Keep volume available if retype fails due to quota"

10 years agoMerge "Remove old driver mappings from Havana"
Jenkins [Wed, 23 Apr 2014 15:45:31 +0000 (15:45 +0000)]
Merge "Remove old driver mappings from Havana"

10 years agoMerge "Fallback to None on missing Glance image attrs"
Jenkins [Wed, 23 Apr 2014 15:41:57 +0000 (15:41 +0000)]
Merge "Fallback to None on missing Glance image attrs"

10 years agoMerge "Fix bad indentation in tests"
Jenkins [Wed, 23 Apr 2014 15:34:32 +0000 (15:34 +0000)]
Merge "Fix bad indentation in tests"

10 years agoReplace tearDown with addCleanup - Part 2
Julia Varlamova [Mon, 17 Feb 2014 13:34:09 +0000 (17:34 +0400)]
Replace tearDown with addCleanup - Part 2

Replace tearDown with addCleanup in some cinder unit tests.

Infra team has indicated that tearDown should not be used and should
be replaced with addCleanup in all places.

Remove duplicated self.stubs and self._mox declaration in
cinder/tests/test_windows.py.

Implements blueprint replace-teardown-with-addcleanup

Change-Id: I5865cf0197e1d8229afc706b9b14b746f09b5acd

10 years agoKeep volume available if retype fails due to quota
Mike Perez [Tue, 22 Apr 2014 23:27:42 +0000 (16:27 -0700)]
Keep volume available if retype fails due to quota

If we're over quota for a volume type that we're retyping a volume to,
keep the volume available.

Closes-Bug: #1308819
Change-Id: I7e66e95bf12b7e5a6df04eeb5a501badb5f2941f

10 years agoMerge "Update tests to use CONF.set_override"
Jenkins [Tue, 22 Apr 2014 19:36:04 +0000 (19:36 +0000)]
Merge "Update tests to use CONF.set_override"

10 years agoMerge "Remove unused 3PAR driver method"
Jenkins [Tue, 22 Apr 2014 07:22:58 +0000 (07:22 +0000)]
Merge "Remove unused 3PAR driver method"

10 years agoMerge "Remove unused reservation methods from db.api"
Jenkins [Tue, 22 Apr 2014 03:09:49 +0000 (03:09 +0000)]
Merge "Remove unused reservation methods from db.api"

10 years agoRemove unused 3PAR driver method
Kurt Martin [Mon, 21 Apr 2014 21:59:02 +0000 (14:59 -0700)]
Remove unused 3PAR driver method

Remove the "parse_create_host_error" method as it is no longer
used in the 3PAR drivers. It can safely be removed from the
3PAR common code and the unit test were no longer using the method.

Change-Id: I81898e075107b55002c2d07f5e06db76a16c3e28
Closes-bug: 1310807

10 years agoFix bad indentation in tests
Eric Harney [Mon, 21 Apr 2014 18:41:10 +0000 (14:41 -0400)]
Fix bad indentation in tests

Remove a number of bad indentation errors flagged
by pylint.

Change-Id: I0a048d96aba09b2f14360ceffb1fe167fb613674

10 years agoFix handling multiple WWPNs on preferred FC node
Jay S. Bryant [Fri, 18 Apr 2014 22:07:15 +0000 (17:07 -0500)]
Fix handling multiple WWPNs on preferred FC node

There was a bug in the code that checked to see if the
appropriate WWPN for a preferred node was available on the storage
host in intialize_connection.  It was assumed that there would only
ever be one preferred WWPN.  The code just checked to see if the list of
preferred WWPNs was in the list of available WWPNs.  This would only work
if all of the WWPNs were available on the storage host.  This resulted in
volumes not being able to be mounted when they should have been
available.

This fix changes the check of the preferred WWPNs to check each
item in the list until one is found.  The first one found is used
as the target WWPN.  If no match is found, the old default behavior
of selecting the first available WWPN is used.  I have added a
warning message for this case as it is quite possible that this
won't work in the user's environment as was the case that uncovered
this bug.

Note that this change is only relevant for systems that are not using
multipath as systems that use multipath don't choose one WWPN, they
just send the whole available list back.

Change-Id: I8d3239da24a8f9fbd8309ba5c90b05b29a068754
Close-bug: 1308298

10 years agoMerge "Add exception catch if Storwize/SVC driver failed when retyping"
Jenkins [Fri, 18 Apr 2014 19:53:45 +0000 (19:53 +0000)]
Merge "Add exception catch if Storwize/SVC driver failed when retyping"

10 years agoMerge "Fixes HostTestCase failures due to slow test run"
Jenkins [Fri, 18 Apr 2014 18:50:30 +0000 (18:50 +0000)]
Merge "Fixes HostTestCase failures due to slow test run"

10 years agoMerge "Correct metadata ordering issue in tests"
Jenkins [Fri, 18 Apr 2014 08:29:05 +0000 (08:29 +0000)]
Merge "Correct metadata ordering issue in tests"

10 years agoMerge "Re-raise exceptions in upload-to-image"
Jenkins [Fri, 18 Apr 2014 06:05:06 +0000 (06:05 +0000)]
Merge "Re-raise exceptions in upload-to-image"

10 years agoFallback to None on missing Glance image attrs
Mike Perez [Fri, 18 Apr 2014 01:46:36 +0000 (18:46 -0700)]
Fallback to None on missing Glance image attrs

It's possible for glance images to be missing attributes like name and
checksum. We'll just set those to None by default to avoid missing key
exceptions being raised.

Closes-Bug: #1308058
Change-Id: I85c42f8351763da201021a22f5ff0ebd62c6b2db

10 years agoRemove old driver mappings from Havana
Mike Perez [Thu, 17 Apr 2014 16:38:22 +0000 (09:38 -0700)]
Remove old driver mappings from Havana

These were deprecated in Havana and don't need to be in Juno.

Change-Id: I5ff537cc08f38f16f3d36a8a3714c025266f67fb

10 years agoMerge "Create volume fail when image id is """
Jenkins [Thu, 17 Apr 2014 15:54:49 +0000 (15:54 +0000)]
Merge "Create volume fail when image id is """

10 years agoAdjust sample config for keystoneclient 0.8.0 release
Dirk Mueller [Thu, 17 Apr 2014 13:33:07 +0000 (15:33 +0200)]
Adjust sample config for keystoneclient 0.8.0 release

Helps fixing the gate again.

Change-Id: Ic962613fd7ee3e978890c25f911f509e9533ef8a

10 years agoRemove unused reservation methods from db.api
liyingjun [Fri, 22 Nov 2013 04:15:49 +0000 (12:15 +0800)]
Remove unused reservation methods from db.api

There are several unused reservation methods are not called directly,
so it could be removed from the db API.

closes-bug: #1255925

Change-Id: I8dffa1d4222da162e55ddd6cfce656b4620f3fad

10 years agoRe-raise exceptions in upload-to-image
Jon Bernard [Fri, 11 Apr 2014 14:44:55 +0000 (10:44 -0400)]
Re-raise exceptions in upload-to-image

This patch catches any exceptions returned from Glance during an
upload-to-image operation and re-raises them so that the user can see
the failure message and make the appropriate adjustments.  More
specifically, this addresses an invalid container format.

For example, the following command:

    $ cinder upload-to-image --container-format foobar ...

Goes from:

    ERROR: The server could not comply with the request since it is
           either malformed or otherwise incorrect. (HTTP 400)
           (Request-ID: req-f19bad2f-c39d-40a2-a3cc-6db9b9fe64cd)

To:

    ERROR: 400 Bad Request
    Invalid container format 'foobar' for image.
        (HTTP 400) (HTTP 400)
        (Request-ID: req-47cb2772-78c4-48b7-87ce-fb124ecfa989)

Closes-Bug: #1308689
Change-Id: If18851e0b9f5c242f84b1eab928b42d809335d80

10 years agoUpdate Cinder dev doc
Veronica Musso [Wed, 16 Apr 2014 11:12:48 +0000 (08:12 -0300)]
Update Cinder dev doc

Removing mention of adding your name and email to Author files in
Cinder dev doc.

Change-Id: I5b723dd9ff1153096852a4c1c6a7b59bf0d04d3c
Closes-Bug: #1309581

10 years agoCreate volume fail when image id is ""
ling-yun [Fri, 4 Apr 2014 13:58:14 +0000 (21:58 +0800)]
Create volume fail when image id is ""

When call create volume api with image id "", it will create an empty
volume.
But when create volume with snapshot id "" or srv volume "", it will
return an 404 error.
So it should create volume fail when call create volume api with image id
"".

Change-Id: If2c7b061753bbbd172a09d35b343e73e90a1b7b4
Closes-Bug: #1302609

10 years agoMerge "Use cached db object in volume_mig_status ext"
Jenkins [Wed, 16 Apr 2014 05:20:27 +0000 (05:20 +0000)]
Merge "Use cached db object in volume_mig_status ext"

10 years agoMerge "Disable oslo.messaging debug logs"
Jenkins [Wed, 16 Apr 2014 01:33:37 +0000 (01:33 +0000)]
Merge "Disable oslo.messaging debug logs"

10 years agoMerge "Fixes HP LeftHand driver with Paramiko 1.13.0"
Jenkins [Wed, 16 Apr 2014 01:27:26 +0000 (01:27 +0000)]
Merge "Fixes HP LeftHand driver with Paramiko 1.13.0"

10 years agoMerge "Inform about instance_uuid in volume usage notification"
Jenkins [Wed, 16 Apr 2014 01:07:44 +0000 (01:07 +0000)]
Merge "Inform about instance_uuid in volume usage notification"

10 years agoUse cached db object in volume_mig_status ext
Vishvananda Ishaya [Tue, 15 Apr 2014 21:29:38 +0000 (14:29 -0700)]
Use cached db object in volume_mig_status ext

There is no need to rerequest the volume object from the db in
the extension because we already have a cached copy in the request.
This can potentially save hundreds of db queries in list.

Change-Id: I46da8c7b6c2af2435d246ebd8e95d4712065f1e7
Resolves-bug: 1308255

10 years agoAdd exception catch if Storwize/SVC driver failed when
Li Min Liu [Fri, 11 Apr 2014 02:50:24 +0000 (10:50 +0800)]
Add exception catch if Storwize/SVC driver failed when
retyping

If adding a copy for a volume of Storwize/SVC which is under
migration, Storwize/SVC command will fail because the
number of the copies of the volume exceed the limit which
is 2.

Modifying the volume type when adding a copy for the volume,
Storwize/SVC driver will also fail, should add exception catch.

Also add exception catch when getting the volume from the database.
This change is necessary to enable resolving bug 1305550
(https://bugs.launchpad.net/cinder/+bug/1305550 - Failed retype with
driver raised exception should set volume status to "error" ).

Change-Id: I1cf4b6606b5228c8adcb2bde21f345fa979bc13e
Closes-Bug: #1298201

10 years agoReplace tearDown with addCleanup - Part 5
Julia Varlamova [Thu, 27 Feb 2014 14:31:29 +0000 (18:31 +0400)]
Replace tearDown with addCleanup - Part 5

Replace tearDown with addCleanup in:
- cinder/test.py
- cinder/tests/test_migrations.py

Remove empty tearDown methods from:
- cinder/tests/test_hp3par.py
- cinder/tests/test_hplefthand.py
- cinder/tests/test_ibmnas.py
since it does not add any functionality (and empty setUp methods as well).

Infra team has indicated that tearDown should not be used and should
be replaced with addCleanup in all places.

Implements blueprint replace-teardown-with-addcleanup

Change-Id: Id2fdd3e2e1ab8458083697b6ea6714ca019fd00a

10 years agoReplace tearDown with addCleanup - Part 4
Julia Varlamova [Fri, 21 Feb 2014 06:50:46 +0000 (10:50 +0400)]
Replace tearDown with addCleanup - Part 4

Infra team has indicated that tearDown should not be used and should
be replaced with addCleanup in all places.

All addCleanup methods will be executed even if one of them fails, while
a failure in tearDown method can leave the rest of the tearDown un-executed,
which can leave stale state laying around.

Moreover, tearDown methods won't run if an exception raises in setUp method,
while addCleanup will run in such case.

This patch replaces tearDown with addCleanup or removes redundant tearDown
methods in cinder unit tests.

Implements blueprint replace-teardown-with-addcleanup

Change-Id: I6947eafa419ed7dda53582484090cd5210274f73

10 years agoEnable flake8 H303,H304 checking
Alexander Bochkarev [Mon, 24 Feb 2014 11:10:44 +0000 (15:10 +0400)]
Enable flake8 H303,H304 checking

We had two types of wildcard imports in the code. Unneeded ones
in test files that are just removed, and some that we actually
want which are kept using the '#noqa' comment to tell flake8
to skip specific checks (such as H303) for that line.

Change-Id: I7d194a7bbcccdba419a2a49a919e17c047633cf0

10 years agoMerge "Switch over to FixedIntervalLoopingCall"
Jenkins [Mon, 14 Apr 2014 21:45:16 +0000 (21:45 +0000)]
Merge "Switch over to FixedIntervalLoopingCall"

10 years agoMerge "Force detach should only be an admin api"
Jenkins [Mon, 14 Apr 2014 18:21:57 +0000 (18:21 +0000)]
Merge "Force detach should only be an admin api"

10 years agoMerge "Storwize/SVC driver crashes when check volume copy status"
Jenkins [Mon, 14 Apr 2014 18:09:14 +0000 (18:09 +0000)]
Merge "Storwize/SVC driver crashes when check volume copy status"

10 years agoStorwize/SVC driver crashes when check volume copy status
Li Min Liu [Tue, 8 Apr 2014 02:18:56 +0000 (10:18 +0800)]
Storwize/SVC driver crashes when check volume copy status

Storwize/SVC driver does not clear up property of _vdiskcopyops
when deleting a volume. So if a volume which under async copy is
deleted before sync completed, the driver will crash.

When delete a volume, add a check for _vdiskcopyops, if volume
is in the dict, remove it.

Change-Id: I4905404b72a7ac8f90bd92fa4345ba771a78418b
Closes-Bug: #1304115

10 years agoSwitch over to FixedIntervalLoopingCall
Dirk Mueller [Mon, 14 Apr 2014 15:12:23 +0000 (17:12 +0200)]
Switch over to FixedIntervalLoopingCall

Change-Id: Iebe5269ea01acdd4ba011742831ca5e569f66b28
Closes-Bug: #1307560

10 years agoCorrect metadata ordering issue in tests
Juan Manuel Olle [Fri, 21 Mar 2014 19:46:03 +0000 (16:46 -0300)]
Correct metadata ordering issue in tests

Some test including test_volume_get_all_filters
fails randomly because metadata is in a dict and
the items order is undefined.
The test comparison was changed to avoid unexpected
test results.

Change-Id: Ibb24d21cd05aa1eefb45b61c63de067b34fb1013
Closes-Bug: #1293792

10 years agoMerge "Fixes cinder error state volume delete on Windows"
Jenkins [Mon, 14 Apr 2014 05:21:09 +0000 (05:21 +0000)]
Merge "Fixes cinder error state volume delete on Windows"

10 years agoMerge "driver.create/remove_export() require elevated context"
Jenkins [Fri, 11 Apr 2014 04:22:12 +0000 (04:22 +0000)]
Merge "driver.create/remove_export() require elevated context"

10 years agoMerge "GlusterFS: Delete active snapshot file on volume delete."
Jenkins [Fri, 11 Apr 2014 01:56:23 +0000 (01:56 +0000)]
Merge "GlusterFS: Delete active snapshot file on volume delete."

10 years agoMerge "Check for silent failure of tgtadm remove"
Jenkins [Fri, 11 Apr 2014 00:23:04 +0000 (00:23 +0000)]
Merge "Check for silent failure of tgtadm remove"

10 years agodriver.create/remove_export() require elevated context
Eric Harney [Wed, 9 Apr 2014 17:05:54 +0000 (13:05 -0400)]
driver.create/remove_export() require elevated context

The volume manager should call driver.create_export()
and driver.remove_export() with an elevated context.

This is already done for remove_export() in some cases
but not in initialize_connection error paths, or for
terminate_connection.

This will at a minimum cause issues with the LVM LIO
driver as its create/remove_export methods uses database
queries requiring admin access (volume_get_iscsi_target_num,
iscsi_target_count_by_host).

Partial-Bug: #1300148
Closes-Bug: #1305197

Change-Id: I5c1091cf9720ebccefc328b64fbf2982b3aac397

10 years agoMerge "Updated from global requirements"
OpenStack Jenkins [Thu, 10 Apr 2014 15:46:15 +0000 (15:46 +0000)]
Merge "Updated from global requirements"

10 years agoInform about instance_uuid in volume usage notification
Pavel Kirpichyov [Thu, 10 Apr 2014 07:20:29 +0000 (10:20 +0300)]
Inform about instance_uuid in volume usage notification

Change-Id: I6f43a2ef2401d6369ad0258f61fe2d3a8c168734

10 years agoMerge "GET details REST API next link missing 'details'"
Jenkins [Thu, 10 Apr 2014 07:17:58 +0000 (07:17 +0000)]
Merge "GET details REST API next link missing 'details'"

10 years agoCheck for silent failure of tgtadm remove
John Griffith [Thu, 10 Apr 2014 00:10:08 +0000 (00:10 +0000)]
Check for silent failure of tgtadm remove

In order to work around a failure to remove targets that
had a reconnect the force flag was added to the tgt delete cmd.
    (https://bugs.launchpad.net/cinder/+bug/1159948)

It turns out there's a bug in tgt where some versions will
sometimes silently fail when using the force flag.
    (https://bugs.launchpad.net/ubuntu/+source/tgt/+bug/1305343)

The problem is that in the gates since we merged the force change
there's a very high number of cases where lvremove fails because
the device is still active.  It appears that this is a result of
the silent force failures in target.

This patch adds a simple check after the force target removal,
if it detects the target is still present it reverts back to the old
non-force method to catch the cases that don't actually need the
force option.

This is a work-around until the version of target in the distros
is updated and can be used reliably, but closes the gate issue
bug that was reported.

Change-Id: I9150669040815e4831bd570964d12676b83ecbc9
Close-Bug: #1304122

10 years agoMerge "Log initialize_connection error before remove_export"
Jenkins [Wed, 9 Apr 2014 17:54:56 +0000 (17:54 +0000)]
Merge "Log initialize_connection error before remove_export"

10 years agoGlusterFS: Delete active snapshot file on volume delete.
Thang Pham [Tue, 8 Apr 2014 20:45:34 +0000 (16:45 -0400)]
GlusterFS: Delete active snapshot file on volume delete.

If a snapshot is taken of a volume that is attached to an active
instance, the volume file used by the instance will be switched to
the new snapshot file that is created.  When you delete the
snapshot, the base volume file will be merged with the snapshot
file and the base volume is deleted.  Upon a deleting the active
volume, the active snapshot file is not deleted because it does not
have the expected name that cinder is looking for, i.e.
volume-<uuid>.  Instead, the snapshot file has the name
volume-<uuid>.<snapshot-uuid>.  This patch looks at the volume info
file to find any active snapshot file and properly delete it when
the volume is deleted.

Change-Id: Ib0af4401d839ec3bd1eb3a81e1671811e0d4a288
Closes-Bug: #1300303

10 years agoFixes HP LeftHand driver with Paramiko 1.13.0
Jim Branen [Fri, 4 Apr 2014 20:36:42 +0000 (13:36 -0700)]
Fixes HP LeftHand driver with Paramiko 1.13.0

With Paramiko 1.13.0, the method exec_command now returns Unicode.
This causes a problem when the driver tries to build the XML returned
from the LeftHand array. The XML header returned from the array defines
the encoding as encoding=UTF-8. Therefore, we must now ensure the
encoding passed to the parser is utf-8.

Change-Id: I7b504626e2d9a0ee2b62820b11f56eb136e31987
closes-bug: #1298608

10 years agoFixes cinder error state volume delete on Windows
Lucian Petrut [Tue, 8 Apr 2014 16:35:10 +0000 (19:35 +0300)]
Fixes cinder error state volume delete on Windows

If the volume creation fails and the iSCSI disk is not created,
trying to delete the error state volume will fail on Windows.

Deleting the iSCSI disk must be skipped when it does not exist.

Change-Id: I2cd615e71fe457c241bea207c4bd8904c1ffd9cb
Closes-Bug: #1304516

10 years agoLog initialize_connection error before remove_export
Eric Harney [Tue, 8 Apr 2014 17:55:25 +0000 (13:55 -0400)]
Log initialize_connection error before remove_export

The way this code is currently structured, if
self.driver.remove_export() raises an exception, you see the
error message logged for that but the original exception
from initialize_connection() never gets logged.

Change-Id: I454c73e8fdc88e5a9542369a5bca33f29617f013

10 years agoForce detach should only be an admin api
ling-yun [Tue, 8 Apr 2014 05:03:14 +0000 (13:03 +0800)]
Force detach should only be an admin api

Since force delete volume apis are only admin apis, force detach volume api
should also be an admin only api.  Currently, the force detach api,
which uses the default rule in policy.json, can be called by admins and owners.
This patch make force detach volume api an admin only api like force
delete volume.

Closes-Bug: #1303882
Change-Id: I12f927e816a5ba6809da9a27ac4ad150546286a1

10 years agoMerge "ceph backup driver: improve log messages"
Jenkins [Tue, 8 Apr 2014 10:01:59 +0000 (10:01 +0000)]
Merge "ceph backup driver: improve log messages"

10 years agoUpdated from global requirements
OpenStack Jenkins [Mon, 7 Apr 2014 21:19:32 +0000 (21:19 +0000)]
Updated from global requirements

Change-Id: I0cf3c003d307ace43b09c0377fac3dec42151f42

10 years agoMerge "Check that all po/pot files are valid"
Jenkins [Mon, 7 Apr 2014 15:11:55 +0000 (15:11 +0000)]
Merge "Check that all po/pot files are valid"

10 years agoMerge "Enable flake8 F841 checking"
Jenkins [Sun, 6 Apr 2014 20:04:30 +0000 (20:04 +0000)]
Merge "Enable flake8 F841 checking"

10 years agoMerge "Append nas_opts to IBMNAS_NFSDriver configuration"
Jenkins [Fri, 4 Apr 2014 19:34:56 +0000 (19:34 +0000)]
Merge "Append nas_opts to IBMNAS_NFSDriver configuration"

10 years agoMerge "Change iogrp property when retyping for Storwize/SVC"
Jenkins [Fri, 4 Apr 2014 07:16:52 +0000 (07:16 +0000)]
Merge "Change iogrp property when retyping for Storwize/SVC"

10 years agoMerge "Adds ionice command permutations to rootwrap filters"
Jenkins [Fri, 4 Apr 2014 06:31:35 +0000 (06:31 +0000)]
Merge "Adds ionice command permutations to rootwrap filters"

10 years agoMerge "_translate_from_glance() can cause an unnecessary HTTP request"
Jenkins [Fri, 4 Apr 2014 05:49:10 +0000 (05:49 +0000)]
Merge "_translate_from_glance() can cause an unnecessary HTTP request"

10 years agoChange iogrp property when retyping for Storwize/SVC
Li Min Liu [Tue, 1 Apr 2014 09:08:37 +0000 (17:08 +0800)]
Change iogrp property when retyping for Storwize/SVC

If need migration when retyping, Storwize/SVC driver will add a copy
of the volume first, and then start a task to check volume sync
progress which will run each 10 mins. At last delete the origin copy
when sync finished.

But iogrp property is not a parameter of addvdiskcopy, so the iogrp
of the copy volume is the same as the origin. If iogrp property is
diff between the old and new volume type, the property will not
change when retyped.

Change-Id: Ie4414bcf95fa6e61d7d618618f48837eef740da4
closed-bug: #1298247

10 years agoMerge "Allow deprecated volume update keys in v2"
Jenkins [Fri, 4 Apr 2014 03:47:33 +0000 (03:47 +0000)]
Merge "Allow deprecated volume update keys in v2"

10 years agoMerge "GlusterFS: Delete volume-<uuid>.info file when volume is deleted."
Jenkins [Fri, 4 Apr 2014 03:47:00 +0000 (03:47 +0000)]
Merge "GlusterFS: Delete volume-<uuid>.info file when volume is deleted."

10 years agoMerge "Fixes cinder volume delete on Windows"
Jenkins [Fri, 4 Apr 2014 03:42:51 +0000 (03:42 +0000)]
Merge "Fixes cinder volume delete on Windows"

10 years agoCheck that all po/pot files are valid
Andreas Jaeger [Mon, 31 Mar 2014 18:37:27 +0000 (20:37 +0200)]
Check that all po/pot files are valid

Perform minimal checks on po and pot files so that no broken files can
get imported.

Change-Id: I5dd0ca872fa25f8ef9557f039904090c4a672ff3
Co-Authored-By: Clark Boylan <clark.boylan@gmail.com>
Related-Bug: #1299349

10 years agoAllow deprecated volume update keys in v2
Mike Perez [Thu, 3 Apr 2014 00:52:11 +0000 (17:52 -0700)]
Allow deprecated volume update keys in v2

Keys like display_name and display_description were deprecated for other
actions in v2 like creating volumes, so for consistency they should work
with updating.

DocImpact
Closes-Bug: #1301172
Change-Id: I19bc7c85352578bb57fa9fdaf1817f78e0ee2f2a

10 years ago_translate_from_glance() can cause an unnecessary HTTP request
Chris Buccella [Thu, 3 Apr 2014 04:02:45 +0000 (04:02 +0000)]
_translate_from_glance() can cause an unnecessary HTTP request

After returning from a get() call to python-glanceclient, cinder runs a
translation function on the returned Image to get the data it wants. Part of
this process is checking for an expected set of attributes, one of which is
the deletion time ('deleted_at'). However, if the image has not been deleted,
deleted_at key will not exist. This forces another call to glance to occur for
the same image. A similar problem exists for the checksum attribute, which does
not exist before an image is active. The fix here is to only consider
deleted_at and checksum if they are expected to be present.

This change was made in nova as change I67b7dd16

Change-Id: Iedc16cb9316f9610fdb8ac03f448bc375a4e6bfa
Closes-Bug: #1275173

10 years agoAdds ionice command permutations to rootwrap filters
Bryan D. Payne [Mon, 31 Mar 2014 22:50:43 +0000 (15:50 -0700)]
Adds ionice command permutations to rootwrap filters

When setting volume_clear_ionice, the ionice command is prepended to a dd
command before executing it.  Previously, this would have failed because it
wasn't allowed through the default rootwrap filters.  This commit fixes this
problem.

Note that due to the way that the RegExpFilter works, we need three different
expressions to cover all cases.  This is because the various options result
in a different number of arguments.  And this filter will fail immediately
if the number of arguments is incorrect.

Change-Id: Ie29f7fa21b34982ed5394c2c8f38c3e066ef0112
Closes-Bug: #1300496

10 years agoAppend nas_opts to IBMNAS_NFSDriver configuration
Sasikanth [Thu, 27 Mar 2014 15:14:50 +0000 (20:44 +0530)]
Append nas_opts to IBMNAS_NFSDriver configuration

'nas_opts' were added in the NFS Driver (nfs.py), but were not appended
to the IBMNAS driver configuration, causing failure with the multi-backend
configuration of driver.

Adding the missing configuration.

Change-Id: I55727566d03573908750d01ae1345c4b6276f131
Closes-Bug: #1298279

10 years agoEnable flake8 F841 checking
Alexander Bochkarev [Thu, 20 Feb 2014 11:26:04 +0000 (15:26 +0400)]
Enable flake8 F841 checking

This check looks to see whether a local variable
is unused. This change fixed all violators of said check.

Change-Id: Iba4ab2b2a172d0c8b90ba29be33ebb129fce5e6b

10 years agoGET details REST API next link missing 'details'
Steven Kaufer [Mon, 31 Mar 2014 20:32:39 +0000 (20:32 +0000)]
GET details REST API next link missing 'details'

When executing a pagination query a "next" link is included in the
API reply when there are more items then the specified limit.

See pagination documentation for more information:
http://docs.openstack.org/api/openstack-compute/2/content/
Paginated_Collections-d1e664.html

The caller should be able to invoke the "next" link (without
having to re-format it) in order to get the next page of data.
The documentation states "Subsequent links will honor the
initial page size. Thus, a client may follow links to traverse
a paginated collection without having to input the marker parameter."

The problem is that the "next" link is always scoped to the non-
detailed query.

For example, if you execute "/v2/<tenant>/volumes/detail?limit=1",
the "next" link does not have the URL for a detailed query and is
formatted as "/v2/<tenant>/volumes?limit=1&marker=<marker>". In this
case the "next" link needs to be scoped to "/v2/<tenant>/volumes/detail".

The user could work around this issue my manually inserting '/details'
into the "next" link URL.

Test code is included to verify that the '/details' URL is correctly added
when the "next" link is included in a detailed pagination query. Also,
existing tests were changed to ensure that the correct controller function
(ie, 'index' vs. 'detail) are invoked for the appropriate query
(ie, non-detailed or detailed) -- 'index' was previously alwayed invoked
for detailed URL requests.

Change-Id: Ib00d6deb25255fac1db0f7bf4ecd3c8d30e1c39d
Closes-bug: 1299247

10 years agoGlusterFS: Delete volume-<uuid>.info file when volume is deleted.
Thang Pham [Mon, 31 Mar 2014 19:22:47 +0000 (15:22 -0400)]
GlusterFS: Delete volume-<uuid>.info file when volume is deleted.

glusterfs creates a file named volume-<uuid>.info to hold volume
data, mapping cinder snapshot UUIDs and filenames. When the
volume and its associated snapshots are both deleted, this file
remains. This patch deletes the volume-<uuid>.info (if one exists)
when the volume is deleted.

Change-Id: Iefc8bd4768b30a75c648c4689d935daeab3afe98
Closes-Bug: #1299182

10 years agoFix Jenkins translation jobs
Andreas Jaeger [Sat, 29 Mar 2014 05:38:52 +0000 (06:38 +0100)]
Fix Jenkins translation jobs

The jobs cinder-propose-translation-update and
cinder-upstream-translation-update do not update from
transifex since our po files contain duplicate entries where
obsolete entries duplicate normal entries.

Remove all obsolete entries to fix the jobs.

Change-Id: I6d41dbdcc41646fcbd1ee84ce48cb0c461cd454c
Closes-Bug: #1299349

10 years agoFixes HostTestCase failures due to slow test run
git-harry [Mon, 31 Mar 2014 12:59:56 +0000 (13:59 +0100)]
Fixes HostTestCase failures due to slow test run

Status check in _list_hosts() fails if tests take longer than the
service_down_time.

Stubbing utcnow() guarantees that status check passes for tests.

Change-Id: I188443730ce077a8117812f1089db36ece184e7a
Closes-Bug: 1292643

10 years agoMerge "Updated from global requirements"
OpenStack Jenkins [Sat, 29 Mar 2014 19:46:39 +0000 (19:46 +0000)]
Merge "Updated from global requirements"

10 years agoMerge "Imported Translations from Transifex"
OpenStack Jenkins [Sat, 29 Mar 2014 19:00:47 +0000 (19:00 +0000)]
Merge "Imported Translations from Transifex"

10 years agoMerge "Fixes cinder volume attach on Windows"
Jenkins [Sat, 29 Mar 2014 18:55:29 +0000 (18:55 +0000)]
Merge "Fixes cinder volume attach on Windows"

10 years agoImported Translations from Transifex
OpenStack Jenkins [Sat, 29 Mar 2014 06:12:44 +0000 (06:12 +0000)]
Imported Translations from Transifex

Change-Id: Ifd2be3ff6ec8e81aa34fc40bda6e1c7f4d441e4d

10 years agoUpdated from global requirements
OpenStack Jenkins [Sat, 29 Mar 2014 01:30:34 +0000 (01:30 +0000)]
Updated from global requirements

Change-Id: Ie0bccd435dd2d897365eb17238e72a0e6113ae60