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.
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.
Dirk Mueller [Mon, 5 May 2014 11:52:31 +0000 (13:52 +0200)]
Remove explicit dependency on amqplib
amqp (or amqplib) is only accessed via kombu, and kombu
already specifies the right dependency (either amqp if new
enough or amqplib for old versions of kombu).
Jay S. Bryant [Thu, 1 May 2014 22:13:25 +0000 (17:13 -0500)]
Ensure that lun_id is an int
The map_vol_to_host function was treating the lun number
as a string rather than an int. This was causing attempts
to mount storwize_svc volumes to Hyper-V nodes to fail as they
were checking an integer type against a unicode type which
would fail.
This change casts result_lun to an integer after the value has
gone through the ssh injection attack check. This way Hyper-V
is able to verify if the found LUN is the target LUN, enabling
mount of storwize_svc volumes to Hyper-V.
Mark Sturdevant [Fri, 25 Apr 2014 17:58:42 +0000 (10:58 -0700)]
Implement validate_connector in FibreChannelDriver
The base FibreChannelDriver didn't implement the
validate_connector() method. It fell back to the
parent class which simply does a pass. Now the
FCDriver checks to ensure that the connector has
wwnns and wwpns and raises an exception if either
one is empty or not set.
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.
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'.
Otherwise when running tgt-admin --delete, it might forget
to invoke tgtadmn with "--lld iscsi" in order to delete the low-level
iscsi exports, which can cause crashes or hangs later on.
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.
Bootable Status is set to "True" automatically when user
create a volume from a image. But user have to set bootable
status manually when creating a bootable volume manually.
blueprint add-bootable-option
this commit is related to https://review.openstack.org/#/c/83691/
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.
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)
Currently the VIM APIs including session creation API are retried for
cases which are unrelated to connection or session overload problems.
This change fix the retry logic as follows:
* Add an exception to indicate connection problem and raise it
appropriately from the VIM API client
* Modify the expected exceptions in the retry decorator to include
only connection and session overload related exceptions
This change also fixes the base class of VimFaultException
(VolumeBackendAPIException -> VimException). This change is required
so that we can handle the exceptions thrown by the VIM API client in
a consistent manner. Currently if we need to handle VIM API related
exceptions, we have to catch both VimException and VimFaultException.
For example, the API for checking active session raises
VimFaultException in some cases and we are handling only VimException.
Due to this, when session expires, the session re-establishment and API
retry fails (intermittently) since the check for active session throws
VimFaultException in some cases which is not handled.
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
"".