Eric Harney [Thu, 24 Oct 2013 20:18:54 +0000 (16:18 -0400)]
GlusterFS: set correct filename when cloning volume
When cloning a volume, the volume[name] field was populated
with incorrect data, resulting in an unexpected filename containing
the volume data. This results in failures of later operations on
that cloned volume.
John Griffith [Wed, 23 Oct 2013 20:08:30 +0000 (20:08 +0000)]
Handle NotFound exceptions in API
There were a number of calls in the API that
weren't catching NotFound exceptions. The result is
unhandled exception traces and errors in the logs on good
runs in tempest.
Basicly any negative test that requests a non-existent element
would result in an unhandled exception. This patch adds try/except
around the volume_api.getxxx calls in cinder/api/... methods to
clean this up.
Michael Kerrin [Thu, 24 Oct 2013 15:17:47 +0000 (15:17 +0000)]
Unit test fails in pbuilder environment
When running tests inside a pbuilder environment we don't
have /dev/disk/by-path directory and so the test_host_driver
test fails. Fix test by overriding the isdir method to
return True and pretend that the directory is there.
John Griffith [Thu, 24 Oct 2013 00:04:51 +0000 (18:04 -0600)]
Check if dir exists before calling listdir
Changes along the way to how we clean up and detach after
copying an image to a volume exposed a problem in the cleanup
of the brick/initiator routines.
The clean up in the initiator detach was doing a blind listdir
of /dev/disk/by-path, however due to detach and cleanup being
called upon completion of the image download to the volume if
there are no other devices mapped in this directory the directory
is removed.
The result was that even though the create and copy of the image
was succesful, the HostDriver code called os.lisdir on a directory
that doesn't exist any longer and raises an unhandled exception that
cause the taskflow mechanism to mark the volume as failed.
Victor Rodionov [Wed, 16 Oct 2013 18:00:16 +0000 (11:00 -0700)]
Nexenta drivers ignore "does not exist" exception
Ignore "does not exist" exception in NFS and iSCSI driver,
delete_volume and delete_snapshot methods.
This exceptions means that the volume or the snapshot not exists in the
backend, so we can avoid "delete" errors, when the resource was already
deleted.
liudong [Tue, 22 Oct 2013 10:37:50 +0000 (18:37 +0800)]
Fix volume transfer href issue
The volume transfer collection in url defined as "os-volume-tranfer",
but I got another define "tranfers" in href url. They are different.
So it should be modify.
Navneet Singh [Sun, 20 Oct 2013 13:00:36 +0000 (18:30 +0530)]
Brick connector fix for NFS drivers
This change fixes the error that comes
while getting brick connector and attaching volumes
in case of NFS drivers in cinder. The attribute for
mount point base was not passed to attach_volume method
as the connector initialization logic is common for all
types of protocols. It is fixed by populating
the required parameter in the RemoteFsConnector
for NFS drivers.
Navneet Singh [Sun, 20 Oct 2013 00:55:55 +0000 (06:25 +0530)]
NetApp fix ssc volume filtering inconsistency
This fixes the situation when the actual netapp
volume data structure becomes inconsistent
because of operating on the actual object
than the copy of it. It also introduces some checks
before calculating volume stats.
Navneet Singh [Sat, 19 Oct 2013 18:04:15 +0000 (23:34 +0530)]
NetApp fix mirrored stats
This fixes the incorrect reporting of mirrorred
statistics for NetApp iscsi and nfs backend.
The uninitialized and broken snapmirror is
not reported and only snapmirrored state
is reported back.
zhangchao010 [Fri, 18 Oct 2013 08:32:56 +0000 (16:32 +0800)]
Add extend_volume for Huawei drivers
This patch adds extend_volume function for Huawei drivers.
Huawei T driver needs to create a slave LUN for the extended LUN.
And accordingly it needs to delete all these slave LUNs before deleting
the extended LUN.
HVS driver just sends a rest command to finish extending volume.
John Griffith [Wed, 16 Oct 2013 02:51:07 +0000 (20:51 -0600)]
Provide gettext _ in missing locations
A while back a change was merged that moved
our shortcut for gettext out of __init__
(change here: If4125d6bcbde63df95de129ac5c83b4a6d6f130a)
This worked out fine for the most part but broke the sphinx doc
builder for a number of files. This patch just adds the proper
import to each of these files to get the builder working correctly
again.
Avishay Traeger [Wed, 16 Oct 2013 08:14:22 +0000 (11:14 +0300)]
Storwize: Fix iogrp availability check
Do not check if vdisk_count is greater than zero to determine iogrp
availability. This is wrong, and leads to the driver not being able to
use empty iogrps.
Zhongyue Luo [Tue, 13 Aug 2013 03:32:00 +0000 (11:32 +0800)]
Uses oslo.imageutils
Commit 035668 had the QemuImgInfo class moved to Oslo.
This class diverged from Nova and then missed some changes
made in Nova since then. The two projects will be able to use
identical classes by adapting imageutils.
John Griffith [Wed, 16 Oct 2013 01:39:22 +0000 (19:39 -0600)]
Don't zero out thin provisioned LV's on delete
Thin provisioned LV's don't need secure delete to protect
from data leakage. Also, zeroing these out kinda defeats
the purpose of using thing provisioning.
This patch add a check for the lvm type and if it's thin simply
returns from the lvm.clear_volume() method.
John Griffith [Wed, 16 Oct 2013 01:13:45 +0000 (19:13 -0600)]
Fix lvm.extend_volume to pass Gig suffix
The extend function in the lvm driver was not converting
the cinder size value to Gigabytes before passing the call
to the vg module. The result was that we would attempt to
extend a volume to "new size in Megabytes" which of course
is less than the current size since we do a Gigabyte string
conversion on create and everywhere else.
This change makes sure we pass the integer change through
the sizestr method to get the G suffix needed to work properly.
John Griffith [Tue, 15 Oct 2013 19:57:48 +0000 (13:57 -0600)]
FK lookup failures during migration
There are a couple of cases where migrations have failed
upgrading from Grizzly to Havana, this seems to be isolated
to a couple of migrations so far and the error message is a
failure to lookup/associate the volume-id FK dependency.
It appears that this is caused by not setting the charset
in the migration, so the result is that the initial db setup
uses utf8 and the migrations are using the default latin1.
This patch goes through all of the migrations in Havana that
specify InnoDB and explicitly sets the charset to utf8 to match
the volumes table (and the other original tables).
zhangchao010 [Mon, 14 Oct 2013 04:47:44 +0000 (12:47 +0800)]
Fix Huawei drivers to support other host OSs
Huawei drivers create Linux hosts by default when attaching volumes.
This patch makes them also support Windows, XenServer, AIX, etc.
The default OS is still Linux if it is not specified.
Users need to configure the host OS types in Huawei XML configuration
file. They need to set the items like this:
<Host OSType="Windows" HostIP="10.10.0.1, 10.10.0.2, ..." />
<Host .../>
When attaching a volume, the driver will get the host IP from nova. We
compare that IP with the IP in "HostIP" to get the corresponding OS type.
VMware: Fixed upload-to-image for available volume
Cinder generally does not allow upload-to-image operation on a volume
that is 'in-use'. This can however be over-ridden using the '--force True'
flag. The VMware driver cannot support upload-to-image when the volume is
in-use. This is a restriction for the VMware driver alone. When the user forces
an upload on a volume that is 'in-use' the Cinder api layer sets the volume
status to 'uploading' and calls into the driver code to upload. In this
scenario the VMware driver needs to fail the operation.
The current driver code here does this check wrongly by looking for volume
status of 'in-use'. Fixing this check to identify an in-use volume correctly.