Jeegn Chen [Sun, 14 Dec 2014 09:17:41 +0000 (17:17 +0800)]
EMC VNX Cinder Driver Update
VNX Direct Driver was contributed in Icehouse and updated in Juno.
This commit is to continuously improve the driver with the
following enhancements in Kilo:
* Performance improvement, especially the synchronized operations
initiatlize_connetion and terminate_connection.
* LUN Number Threshold Support
* Initiator Auto Deregistration
* Force Deleting LUN in Storage Groups
* Code refactor to enhance the robustness
Xing Yang [Mon, 19 Jan 2015 18:27:31 +0000 (13:27 -0500)]
Roll back if VMAX masking view not created
In emc_vmax_masking.py, an exception object is created if
there is a failure in the masking view creation logic.
However, the exception is not raised. As a result,
initialize_connection will succeed in spite of a failure
but the VM will not be able to access the disk.
This patch adds rollback logic to handle failures in
creating masking view. If the masking view cannot be
created, the volume will be added back to the default
storage group and an exception will be raised.
Jay Wang [Tue, 27 Jan 2015 20:02:59 +0000 (12:02 -0800)]
Fixes attribute content checking
Use proper way to check the volume attribute contents in display_name
and display_description. If they are not empty, translate them to
volume backend description. Modify other places where return empty
string makes sense than None as well as the return value checking.
Aviram Bar-Haim [Sun, 25 Jan 2015 20:50:46 +0000 (22:50 +0200)]
Support iSER driver within the ISCSITarget flow
Currently the iSER driver is supported over TGT only,
and there are a couple of iSER classes that inherits
from iSCSI classes, but most of their functionality is
the same as the iSCSI classes. This code duplication caused
instability in the iSER driver code, when new features or
changes are added to the iSCSI driver flow.
Main changes:
1. Added a new parameter to volume/driver.py in order to
set the iSCSI protocol type to 'iscsi' or 'iser', with default
to 'iscsi'.
2. Configured TGT VOLUME_CONF and VOLUME_CONF_WITH_CHAP_AUTH
with the new iSCSI protocol parameter.
3. Added support for RDMA (using iSER) to cinder-rtstool.
4. Set "driver_volume_type" to "iscsi" or "iser" value, according
to the new parameter value.
5. Added unit tests for the new iSER flow.
6. Added deprecation alert to ISERTgtAdm.
Rich Hagarty [Wed, 14 Jan 2015 17:11:27 +0000 (09:11 -0800)]
HP3Par: Set snapCPG when managing existing volumes
This fixes a corner case where the user did not assign a "Copy CPG"
value to the volume when originally created on the back-end, and
then the user does not assign a "Volume Type" to the volume
when it is then "managed" into OpenStack.
This results in an undefined "snapCPG" value which means no
snapshots can be created for the volume.
The fix is to set the "snapCPG" value to match the "User CPG"
value associated with the volume when the volume is "managed"
TaoBai [Tue, 20 Jan 2015 12:18:39 +0000 (04:18 -0800)]
Failed to discovery when iscsi multipath and CHAP both enabled
Storage server may be configured to protect target discovering phase with CHAP
authentication, in this case existing discovery command will be failed in Nova
when iscsi multipath enabled. Nova need these below discovery auth properties.
"discovery.sendtargets.auth.authmethod",
"discovery.sendtargets.auth.username",
"discovery.sendtargets.auth.password"
Cinder Storage driver need to send discovery auth properties to Nova in this
case and the properties are:
iscsi_properties['discovery_auth_method']
iscsi_properties['discovery_auth_username']
iscsi_properties['discovery_auth_password']
This issue not just for IBM Storwize, but also other storage drivers who need
CHAP authentication to do iscsi discover.
The according nova change: https://review.openstack.org/#/c/148516/
John Griffith [Wed, 28 Jan 2015 04:59:28 +0000 (22:59 -0600)]
Add completion logging for snapshots and volumes
While trying to debug insufficient resource issues occasionally
seen in the gate, it was noted that there's no logging for
resource deletion of volumes and snapshots.
This patch adds some simple logging in the cinder.volume.api
to note when and why a delete call might fail as an info
message indicating when the request is successfully issued
to the scheduler/rpc layer.
In addition, this patch also adds the same sort of logging
to the LVM backend driver.
This additional logging will help troubleshoot the current
resource issues/races we're encountering in the gate.
Rich Hagarty [Sat, 24 Jan 2015 01:44:53 +0000 (17:44 -0800)]
HP 3PAR modules have bad log messages
Some log messages are incorrectly formatted. Specifically, those
messages that take multiple variables. In this case, each variable
needs to be assigned a unique placeholder.
This defect was recently introduced when all log messages where
updated to use "," instead of "%" (see
Change-Id: I23d53d66fda47981ed8f20b618b2ced8ef6e0682),
which allowed translations to be ignored if not required by current
log levels.
John Griffith [Mon, 26 Jan 2015 22:21:30 +0000 (15:21 -0700)]
Create SolidFire Template account on init
The standard flow in the SolidFire volume is to create
accounts dynamically as needed based on project id.
Unfortunately the clone_image method "forgot" about this
detail and calls the private clone_volume method without
a valid account resulting in an AccountNotFound
Exception.
The clone_image method is enabled using a specific account
provided via the configuration file. Rather than worry
about dynamic account creation on clone_image call, this
patch just makes it part of the init phase. We check to
see if template caching is enabled and if it is, just
go ahead and check/create the account on startup.
wuyuting [Mon, 26 Jan 2015 18:50:28 +0000 (02:50 +0800)]
Fetch_to_volume_format calls copy_volume using wrong parameter
When creating a volume from an image, if qemu-img is not installed,
fetch_to_volume_format will call volume_utils.copy_volume to copy
image to volume. Copy_volume need the size of image in megabyte,
but fetch_to_volume_format call it using size in bytes.
Zhiteng Huang [Mon, 12 Jan 2015 05:27:15 +0000 (13:27 +0800)]
Raise correct exception when validate_connector failed
Cinder volume manager uses validate_connector() method to verify if required
information is in connector when handling initialize_connection() request.
validate_connector() is actually a pure input validation method, basically
checking if 'initiator' or 'wwpns' is in connector if storage protocol is
iSCSI or FC. However, when required information is missing, currently drivers
raises either VolumeBackendAPIException or VolumeDriverException, which would
then bubble up to API and then to user (Nova) as InternalServerError.
This change adds a new exception - InvalidConnectorException, that drivers
should raise when connector is found not valid. With that, Cinder API would
raise BadRequest instead to user, suggesting things are missing in request.
Xing Yang [Fri, 16 Jan 2015 17:45:53 +0000 (12:45 -0500)]
Add provisioned_capacity
This change is needed by the over subscription patch:
https://review.openstack.org/#/c/142171/
This patch makes the following change:
Add 'provisioned_capacity' to Cinder base driver, Cinder reference
driver (LVM), and scheduler host_manager.
provisioned_capacity is the apparent allocated space indicating how
much capacity has been provisioned.
Example: User A created 2x10G volumes in Cinder from backend A, and
user B created 3x10G volumes from backend A directly, without using
Cinder. Assume those are all the volumes provisioned on backend A.
The total provisioned_capacity will be 50G and that is what the driver
should be reporting.
Yusuke Hayashi [Fri, 26 Dec 2014 12:21:04 +0000 (21:21 +0900)]
Move 3 Fujitsu ETERNUS DX related file
Since there are three volume driver files relating to
Fujitsu ETERNUS DX in cinder.volume.drivers,
I make 'fujitsu' directory at cinder.volume.drivers
and I move these files to the directory.
John Griffith [Thu, 22 Jan 2015 18:22:25 +0000 (11:22 -0700)]
Add retry to lvm snapshot create
We have some occasional issues with snapshot-create
failing for what looks to be conflicts with udev. It
looks like this problem is a status conflict between LVM
cache and udev, and in most cases the best way to get
around this is to retry the command a few times until
the cache and udev are back in sync.
This patch uses the newly added retry decorator and
for now we're just adding it to the snapshot create
call. We're using the default values for interval and
retry count but we can certainly adjust this as needed.
John Griffith [Thu, 22 Jan 2015 17:35:31 +0000 (10:35 -0700)]
Add a generic retry decorator to cinder/utils
Retries are something that we use in a number of
places, and could probably use in a few more. Rather
than continue writing custom retry code or silly loops
let's add a generic retry decorator class that can be
initialized and used as needed.
This patch leverages the retrying library that's already
in OpenStack Requirements and used in other places. We
just add a wrapper around it for some logging and add
a bit of error handling incase somebody sets retries to 0
Zhiteng Huang [Wed, 14 Jan 2015 03:54:40 +0000 (11:54 +0800)]
Cleanup unused DB APIs, part I
There are unused DB APIs, some of them were leftovers of other features
removal, some are purely added without being used. This change removes
these unused DB APIs.
Note that there are some DB APIs only used by unit tests, in other words
they are used in unit tests where they are not the unit of code being
tested. Those will be cleaned up in follow-up patch(es).
rajinir [Tue, 20 Jan 2015 19:52:32 +0000 (13:52 -0600)]
Fix the eqlx driver to retry on ssh timeout
When the ssh session is timing out, the driver
should make attempts to retry based on the value
in eqlx_cli_max_retries. Instead it was raising
the exception and bailing out on a single attempt.
Fixed the driver to raise a different exception
so the ssh sessions can be retried.
Added unit tests to ensure the max retries
happen
Also fixed the actual attempts made in the message
John Griffith [Fri, 23 Jan 2015 00:21:27 +0000 (17:21 -0700)]
Add retrying lib from global requirements
Submitted a retry decorator and it was pointed out that
the retrying library was already in global-requirements,
it would probably be good to leverage this and use it rather
than roll our own, so let's add it to our version of requirements
and then we can look at whether using a decorator or just
leveraging the lib is the right way to go.
Joshua Harlow [Thu, 22 Jan 2015 19:22:21 +0000 (11:22 -0800)]
Remove usage of taskflow 'utils.misc' module
The failure type at its old location in an internal
utils directory of taskflow is deprecated (in general
usage of taskflow utils code should be restricted/not
done) and it has been moved to a public location of
taskflow.types (which is ok to use and is not
deprecated).
This change updates to use the better and more supported
module/code location instead.
Jay S. Bryant [Wed, 21 Jan 2015 07:43:00 +0000 (01:43 -0600)]
Move oslo.serialization to oslo_serialization namespace
This is the fifth in a series of changes to move to using
the new oslo_<library> namespace that is being used for
oslo libraries.
There is currently a shim in place that is allowing the old
oslo.<library> imports to work, but we need to be prepared for
when the shims go away. Thus, we need patches like this one to
move to the new namespace.
This patch also updates our hacking check to ensure that no instances
of oslo.utils sneak back in.
Sean McGinnis [Tue, 20 Jan 2015 22:50:19 +0000 (16:50 -0600)]
Improve debug logging of Dell Storage Center driver
Adding debug message and expanding some existing log statements
to make debugging and auditing easier. Some interesting calls
were not being logged while others had logging that was missing
some relevant arguments.
Ilya Tyaptin [Thu, 6 Nov 2014 12:32:33 +0000 (16:32 +0400)]
Fix _usage_from_snapshot in volume.utils
Now in this function we trying to get snapshot_ref.volume for
collecting 'availability_zone'. It's invalid because snapshot_ref
in this function is __dict__. In this patchset there is fix for
it.
Creating vCenter inventory folder for grouping volumes will
fail with AttributeError if the vCenter's datacenter doesn't
have any child folder under vmFolder (inventory folder for
grouping virtual machines). This patch fixes it.
Joshua Harlow [Thu, 22 Jan 2015 00:32:28 +0000 (16:32 -0800)]
Shrink down customized logging listener
Most of the code for this has been moved into taskflow
upstream; so now we should be able to override a single
*cinder-specific* method and retain the same functionality
that previously existed but in a more shareable manner (for
example glance will be using similar code).