Erlon R. Cruz [Tue, 17 Nov 2015 17:43:01 +0000 (15:43 -0200)]
Fixing HNAS XML parser
HNAS XML parser does not handles situations where the user
could accidentally insert a blank space in the parameter value
breaking the driver in execution time. With this fix, an
error is raised in the driver setup.
Angela Smith [Mon, 9 Nov 2015 18:14:35 +0000 (10:14 -0800)]
Adds friendly zone name support
Added user friendly names for zones to include host and storage
names along with ids to easily identify the host and storage port
details.
This is done by extracting the host and storage name from connection
info object in the zone manager. The host and storage names are passed
to the zone drivers to form a friendly name. The method signature has
been changed which accepts host and storage name, with default as None.
Also added test cases to test this support. Changes have been made to
zone manager test code to accommodate the change in signature of some
methods.
Moved get_friendly_zone_name method to utils.py so that it can be used
by both cisco and brocade drivers
Changed cisco driver to accommodate host_name and storage_system
parameters in add/delete connection.
Tom Barron [Thu, 21 Jan 2016 18:17:59 +0000 (13:17 -0500)]
Fix torpid coordinator unit tests
The test_coordination.py unit module tests a _reconnect() method
which does a randomly seeded exponential retry backoff. This
retry/backoff mechanism introduces needless delay in unit test
runs.
This commit mocks out random.uniform, improving run time by about
a factor of nine, as documented in the accompanying bug.
Sheel Rana [Fri, 15 Jan 2016 20:23:49 +0000 (01:53 +0530)]
Added 'bootable volume' filter for non-admin user
During launch instance from Horizon, if non-admin
user selects volume as source for launching
instance, drop down list for volumes will also
show non-bootable volumes. It is wrong behaviour.
To fix this, 'bootable volume' search filter is
enabled so that only bootable volumes get
displayed in drop down list of volume.
APIImpact
DocImpact:Need to add bootable against
query_volume_filters in OpenStack Configuration
Reference
Eric Harney [Wed, 13 Jan 2016 15:29:50 +0000 (10:29 -0500)]
Set LVM driver default overprovisioning ratio to 1.0
This introduces a config option, 'lvm_max_over_subscription_ratio',
which allows overriding the global max_over_subscription_ratio.
This is needed because the way we handle configuration with
multi-backend does not allow setting a value which will be applied
to each LVM backend without manually setting it in each backend,
and it would be better to default to a safe overprovisioning
ratio for the LVM driver. It is often used in smaller deployments
and POCs which may not have all of the capacity monitoring
infrastructure used with other drivers, so overprovisioning should
be an opt-in capability rather than opt-out.
Partial-Bug: #1472803
DocImpact: new config option lvm_max_over_subscription_ratio
chenzongliang [Sat, 12 Dec 2015 09:11:55 +0000 (17:11 +0800)]
Huawei: Refactor driver for the second time
After a few new features being added into drivers,
we found it hard to maintain the code. For further working,
we need to refactor our code. The work contains the following:
1. Define a new class, named HuaweiConf, to parse xml config file.
We used an external xml file to store SAN info.
But we do config parsing anywhere in our code,
even two different functions do the same parsing.
2. Adjust some function structures.
3. Rename some functions & variables.
Nikesh [Wed, 13 Jan 2016 13:39:33 +0000 (19:09 +0530)]
Add cinder backup driver for Google Cloud Storage
Implement cinder backup driver for Google Cloud Storage.
It supports:
- creating backup which is stored on Google Cloud Storage
- restoring backup from Google cloud storage
- incremental backup
- independent of any volume backend
Marc Koderer [Mon, 18 Jan 2016 07:11:16 +0000 (08:11 +0100)]
Activate sparse copy for Netapp
Activating sparse copy of files since using
"volume migration" or "retype" the size of the resulting
file is larger than before. Due to the reason that the
sparse blocks in the file are copied over completely. This
is inefficient performance wise and wastes space on the
storage itself.
Yusuke Hayashi [Wed, 6 Jan 2016 08:02:54 +0000 (17:02 +0900)]
Add Fujitsu ETERNUS DX Volume Driver (FC part)
As I explained in my blueprint,
this patch completes Fujitsu ETERNUS DX Volume Driver.
Fujitsu ETERNUS DX Volume Driver consists of two parts, iSCSI and FC.
The iSCSI part [1] had been reviewed and
thanks to the nice reviews, it's merged.
The iSCSI and FC parts have a lot of common codes,
and all the common codes are included in the iSCSI part.
Accela Zhao [Sat, 16 Jan 2016 06:43:29 +0000 (22:43 -0800)]
Disallow transferring volume in consistency group
Currently, transferring a volume in a consistency group would
success. But consistency group is not designed to span multiple
tenants. If the accepted volume is attached to an instance, and
the original user try to delete the CG, it would fail and could
not find the attachment.
This patch fixes it by adding a check in transfer API accept. It
raises InvalidVolume exception if the volume being transferred
belongs to a consistency group.
Eric Harney [Fri, 15 Jan 2016 21:52:56 +0000 (16:52 -0500)]
Reduce use of eval()
Calling eval() is less than ideal security practice,
and does not appear to be needed in these instances.
Convert to ast.literal_eval() which is a safer
mechanism for parsing inputs like this.
Thelo Gaultier [Fri, 4 Dec 2015 07:29:44 +0000 (15:29 +0800)]
ITRI DISCO cinder driver
This commit adds a Cinder volume driver for ITRI DISCO product.
The DISCO driver supports the following features:
* Volume Create/Delete
* Volume Attach/Detach
* Snapshot Create/Delete
* Create Volume from Snapshot
* Get Volume Stats
* Copy Image to Volume
* Copy Volume to Image
* Clone Volume
* Extend volume
Implements: blueprint disco-driver-cinder
This patchset also includes the unit tests.
New config options for the cinder driver were also added.
related nova patchset : https://review.openstack.org/253353
related os_brick patchset : https://review.openstack.org/253352
Ankit Agrawal [Fri, 15 Jan 2016 09:56:56 +0000 (01:56 -0800)]
Python 3: Replace reduce and xrange with six.moves
1. Builtin function 'reduce' in Python 2 has been moved to standard
library module in Python 3 [1]. To make code compatible, replaced
reduce(expr) with six.moves.reduce(expr).
2. xrange is renamed to range in Python 3, replaced it with
six.moves.range
3. Added __bool__() method in FeatureState class to make it python 3
compatible because Python 3 calls the __bool__() method instead of
__nonzero__ when evaluating an instance in a boolean context.
4. Added this test case to tests-py3.txt.
In the case where a LUN is extended beyond it's supported geometry,
a new LUN must be created and only the used blocks should be copied
to the new LUN. Currently, we do not pass the block count, source
block, and destination block information. This causes the extend to
fail.
Lucian Petrut [Wed, 14 Oct 2015 12:40:00 +0000 (15:40 +0300)]
Refactor Windows drivers using os-win
A common library abstracting Windows specific operations has been
created in order to remove duplicated code among OpenStack projects,
also being easier to maintain.
This patch refactors Windows drivers, leveraging the os-win library.
The Windows iSCSI driver unit tests needed to be updated, for which
reason those where rewritten using mock.
Gorka Eguileor [Thu, 14 Jan 2016 14:35:15 +0000 (15:35 +0100)]
Fix ChunkedBackupDriver _create_container
Current _create_container method in ChunkedBackupDriver is not behaving
as expected.
According to update_container_name docstring the method should return
None if the container name that comes in to the driver is to be used,
but code was using backup_default_container instead.
Also, if None is returned by update_container_name the logging will
report that it will be using None instead of the name that it will be
really using.
If update_container_name returns the same value we already have in the
DB, driver will unnecessarily update the DB.
Patrick East [Tue, 12 Jan 2016 18:22:18 +0000 (10:22 -0800)]
Remove DB calls from Pure Volume Driver CG methods
After the updates to the CG API’s to pass in the objects we didn’t need
to call the DB anymore. This finally fixes that issue and updates to
return the actual database updates.
Alex O'Rourke [Mon, 23 Nov 2015 18:43:13 +0000 (10:43 -0800)]
LeftHand: Implement v2 replication (managed)
This patch implements the managed side of v2 replication in the HPE
LeftHand driver.
At this time, only periodic mode is supported with LeftHand arrays.
extra_spec value 'replication:sync_period' will specify the sync period
for the volume type. If it is not provided, it will be defaulted to 1800
seconds, or 30 minutes. 'replication:retention_count' determines how
many snapshots will be kept on the primary system. The maximum is 50,
and if the value is not specified, it defaults to 5.
'replication:remote_retention_count' determines how many snapshots will
be kept on the secondary system. The maximum is 50, and if the value is
not specified, it defaults to 5.
cinder.conf should have the replication config group (lefthandrep)
and at least one other target group (lefthand) as such:
Chris Morrell [Thu, 7 Jan 2016 23:06:22 +0000 (23:06 +0000)]
Enable trim/discard in SolidFire's driver
Pretty straight forward change to set a flag in the connection info
returned from initialize_connection. This change will work pending
upcoming Nova code reviews, as trim/discard support has been supported
by SolidFire since its inception.
Followed the Cinder Liberty spec titled
'cinder-backend-report-discard' for this change.
Eric Harney [Mon, 11 Jan 2016 20:48:18 +0000 (15:48 -0500)]
Return BadRequest for invalid Unicode names
If the database fails to insert values due to them
containing Unicode that the database can't support (or other
similar errors that fall under DBDataError), return an
HTTP 400 Bad Request rather than HTTP 500.
The following fix in oslo.db is needed for this to be
most useful, but is not a requirement:
https://review.openstack.org/#/c/265921/
This will need to be applied to numerous calls other
than just volume_create, as well.
Sheel Rana [Mon, 11 Jan 2016 20:06:46 +0000 (01:36 +0530)]
Handling Invalid argument iflag=direct in dd
During volume/snapshot create/delete operations,
dd command is used to clear contents of disk.
Before invoking dd, it is checked if iflag=direct
supports dd or not by executing dd command with
iflag=direct and if=/dev/zero combination.
But this always results in invalid argument
error.
Handling for this argument is done to eliminate
unnecessary call to dd command when it is used
with iflag=direct and if=/dev/zero combination
to check if this argument supports dd or not.
Tom Patzig [Mon, 11 Jan 2016 19:55:01 +0000 (20:55 +0100)]
Execute mount.nfs check as root
Currently the existence of 'mount.nfs' is checked with a
non-root user, in this case cinder. This results, for example on SUSE,
in the error:
NfsException: mount.nfs is not installed
Because mount.nfs is located under /sbin, unprivileged users do not
have /sbin in their PATH to search for executables.
This change switches the parameter run_as_root to true, to find
the binary in privileged directories, as well.