John Griffith [Fri, 30 May 2014 15:59:52 +0000 (15:59 +0000)]
Update cinder.conf
This is mostly just a sanity check, we're revmoving
this whole check from the gate, but we've had
conflicting versions of the truth here and I'm trying
to figure out why.
This patch is a fresh run of generate_sample, which differs
from https://review.openstack.org/#/c/96784/
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.
Scott Devoid [Mon, 5 May 2014 21:44:44 +0000 (16:44 -0500)]
Fix solaris_execute in SolarisISCSIDriver.
A previous refactor [1] of SolarisISCSIDriver and SanDriver renamed
the `_execute` function to `san_execute`. However, SolarisISCSIDriver
still called the _execute function, which no longer exists in it's
parent classes.
This change calls san_execute instead of _execute in
super(SolarisISCSIDriver, san).
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.
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.
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.
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)
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.
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" ).
Joe Gordon [Mon, 24 Mar 2014 21:44:27 +0000 (14:44 -0700)]
Disable oslo.messaging debug logs
oslo.messaging debug logs are too verbose, turn them off. A similar patch
dropped nova-conductor logs in the gate down from 7MB to under 300K.
Cherry-Pick from oslo-incubator since we are in feature freeze:
Ia12c003dae196e2220a5f6ea768758a75f2ede23 and
Icc61964c6a2b002ac1c8566f174e6a5230674c75
On upload-to-image failure before initiating the data transfer or during
data transfer, the source volume status is restored properly whereas the
image created remains in queued or saving state. This change deletes the
image during such failures.
This patch flushes IO for each SCSI device that
brick removes from the system. The patch also
flushes a multipath device prior to removing
each underlying LUN associated with the
multipath device. We were seeing kernel
IO errors in the syslog without calling flush
on the block device, during a detach for a
multipath FibreChannel copy image to volume
action.
Rahul Verma [Tue, 3 Jun 2014 22:26:48 +0000 (15:26 -0700)]
Remove Quota Exception Stack Traces from Cinder Logs
Added an if clause to the Cinder API FaultWrapper so that
a warning is printed rather than an error and stack trace
if an exception of type QuotaError is thrown.
Nikola Dipanov [Fri, 25 Apr 2014 11:38:31 +0000 (13:38 +0200)]
Make begin_detaching fail if volume not "in-use"
Like it's counterpart from Nova's volume-attach functionality standpoint
- reserve_volume, begin_detaching should fail if the volume is not in
the correct state to be detached. This will prevent nova from
attempting to check and then detach, which is inherently racy.
Mark Sturdevant [Tue, 27 May 2014 21:49:34 +0000 (14:49 -0700)]
3PAR volume detach with host in a host set
When deleting the last VLUN for a host, try to
delete the host. If the host is in a host set
this will fail. When that happens, log a nice
message including the reason, but don't fail
or hang the delete VLUN. Leave hosts in host
sets.
John Griffith [Fri, 30 May 2014 15:59:52 +0000 (15:59 +0000)]
Update cinder.conf
This is mostly just a sanity check, we're revmoving
this whole check from the gate, but we've had
conflicting versions of the truth here and I'm trying
to figure out why.
This patch is a fresh run of generate_sample, which differs
from https://review.openstack.org/#/c/96784/
Juan Manuel Olle [Thu, 22 May 2014 13:24:36 +0000 (10:24 -0300)]
Fix a message format error in migration cleanup
In some situations, the volume migration failed. After the cleanup
begin, code was trying to format a string value as an int,
this caused "copy_error = True" not being invoked, resulted
in UnboundLocalError exception.
Yi Chun, Huang [Thu, 29 May 2014 10:10:50 +0000 (06:10 -0400)]
Add support for z/VM driver.
Add 'FCP' into connection_info in initialize_connection
in order to support IBM z/VM hypervisors. This change only
because z/VM need FCP(fibre channel port) info while other
platform don't need it. It will not have side effect
to other platforms since they can safely ignore it.
Mike Perez [Thu, 22 May 2014 21:29:06 +0000 (14:29 -0700)]
Handle volumes no longer existing in resume delete
init_host resumes deletes for volumes with a status of 'deleting'. It
does these sequentially, and sometimes a volume could be deleted under
it, causing a bad stacktrace. This will gracefully handle those
situations and move on. Added coverage for resume volume delete being
successful as well.
Eric Harney [Tue, 27 May 2014 14:11:53 +0000 (10:11 -0400)]
Fix ISER scan retry option
The 'num_iscsi_scan_tries' option was renamed to
'num_volume_device_scan_tries'.
Remove it from the test where the deprecated name is
referenced since it is not used there anyway.
Fix the ISER driver to set the new config field rather than the
old one. Presumably this made the num_iser_scan_tries option
not work since only the new field is passed to the brick
connector.
1. Currently cinder doesn't check whether the image is active
when create volume with an image id, we can even create volume
with a deleted/saving/queued image.
2. For deleted image, it only happened when using admin credentials.
When using non-admin credentials, it returned an error that image
is not found by using 'glance image-show' on a deleted image, which
is expected. Also when creating a volume from this deleted image,
it returned a 404 error upfront. This again is the expected result.
When using admin credentials, we can view the details of deleted image
with 'glance image-show'. If create a volume out of an image ID (which
is now deleted), the operation succeeds, but the volume is left in
'error' state.
3. This accounts for a bug(he volume shouldn't be created) and should be fixed.
This allows you to specify host=XXX in your backend configuration
to override the host value that is specified in the DEFAULT section,
allowing for some backends to share a hostname while others can
have unique names.
Andreas Jaeger [Thu, 22 May 2014 16:33:09 +0000 (18:33 +0200)]
Remove all mostly untranslated PO files
We only import PO files that are at least 75 % translated,
so we can delete now all other PO files. The patch only
removes the mostly untranslated files. Once a file becomes mostly
translated, the bot will import it again.
Joshua Harlow [Thu, 22 May 2014 02:26:15 +0000 (19:26 -0700)]
Remove create_from* functor jump table
To make it easier to debug during runtime which method was
called remove the dictionary type -> functor mapping and
use a set of if statements instead. This makes it so that
if one of these methods fails we can gather more information
from the traceback than what was previously possible.
Lynxzh [Mon, 19 May 2014 10:47:16 +0000 (18:47 +0800)]
SSHPool in utils should allow customized host key missing policy
The cinder/utils SSHPool should allow missing key policy and host key
file being customized so that any caller can determine by their own
scenario if the host key file can be customized, or if an 'AutoAdd' is
appropriate, or just reject the key when mismatch. This will give more
flexible customization and also prevent any security issue as a middle
man.
vitas.yuzhou [Mon, 12 May 2014 18:57:48 +0000 (02:57 +0800)]
Check whether O_DIRECT is supported to iflag and oflag separately
The problem is when this is used for volume clear and the clear method
specifies use of the 'zero' option (/dev/zero) setting iflag direct is
not a valid option for that input file, but oflag direct is a valid
option for output file, so we should check iflag and oflag separately.
Mike Perez [Sat, 17 May 2014 19:18:59 +0000 (15:18 -0400)]
Set volume usage audit period to not NoneType
The setting of NoneType causes cinder-volume-usage-audit to not start up
and throw a stacktrace. This sets the config default back to something
it can use.
Lynxzh [Mon, 19 May 2014 09:49:00 +0000 (17:49 +0800)]
BrcdFCSanLookupService should allow customize host key and policy
In BrcdFCSanLookupService, the initialization should allow the
customization of the known_hosts_file and missing_key_policy so that the
hosts key and missing policy can be customized according to the
different scenario and customer aspect. This will not change the default
behavior when no argument is given, but more flexible to allow the
caller to give more options according to different requirements.
Mark Sturdevant [Mon, 12 May 2014 21:27:48 +0000 (14:27 -0700)]
eliminate the need for hplefthandclient in tests
In order to eliminate the need to have the hplefthandclient in the
global-requirements project, we need to remove the hplefthandclient
from being imported in all HP LeftHand driver unit tests in cinder.
Scott Devoid [Mon, 5 May 2014 21:44:44 +0000 (16:44 -0500)]
Fix solaris_execute in SolarisISCSIDriver.
A previous refactor [1] of SolarisISCSIDriver and SanDriver renamed
the `_execute` function to `san_execute`. However, SolarisISCSIDriver
still called the _execute function, which no longer exists in it's
parent classes.
This change calls san_execute instead of _execute in
super(SolarisISCSIDriver, san).
Mark Sturdevant [Mon, 5 May 2014 21:13:48 +0000 (14:13 -0700)]
eliminate the need for hp3parclient in tests
In order to eliminate the need to have the hp3parclient in the
global-requirements project, we need to remove the hp3parclient
from being imported in all 3par driver unit tests in cinder.