Kurt Martin [Thu, 1 Nov 2012 00:20:29 +0000 (17:20 -0700)]
Fixes 3par driver methods that were double locking
There were many cases where the 3par drivers(FC and iSCSI) were double
locking, e.g. we were locking in the individual driver and in ‘common’.
This patch set removes all the locks in ‘common’ except the one on
‘create_cloned_volume’.
The methods ’_get_volume_state’ and ‘_copy_volume’ are only called in
‘create_cloned_volume’, so those locks were removed as well. All the other
methods in ‘common’ are only called by the driver which provide the lock,
except ‘create_volume’ which is also called by ‘create_cloned_volume’.
Michael Kerrin [Wed, 17 Apr 2013 15:36:28 +0000 (15:36 +0000)]
Deleting a backup removed the backup record from database
Instead we should be marking the backup as deleted so that we have an audit
of all the backups. Backups are now marked deleted in the way that volumes
are.
This method is buggy because it works only on host machine with english language, and
apparently this method is also useless because we don't need to check if a path exist if
we can use command option -p for "mkdir" command and option -f for "rm" command.
If the CinderVolume service is restarted while an image-copy is
happening, the volume gets left in a 'downloading' state and
cannot be used or deleted. This fix adds code to init_host to
look for volumes (on this host) in such a state, and move them
to an error state. It also calls clear_download in the driver
in case the driver needs to perform an action, such as
detaching the volume.
Jay S. Bryant [Wed, 24 Apr 2013 17:56:03 +0000 (12:56 -0500)]
Avoid using whitespace in test_safe_parse_xml.
Updates the test_safe_parse_xml test case in
cinder.tests.test_utils.GenericUtilsTestCase to avoid using
whitespaces and to ignore extraneous newlines returned in the
parsed XML. This is required to work around differences in
the output from minidom in python 2.6.
John Griffith [Fri, 12 Apr 2013 17:11:38 +0000 (11:11 -0600)]
Add stats reporting to Nexenta Driver
Nexenta driver was never updated to report stats.
This change doesn't include support for backend_name assignment
via configs, there's some other work that will need to be
done to enable that.
Joseph Glanville [Wed, 10 Apr 2013 23:02:42 +0000 (16:02 -0700)]
iscsi: Add ability to specify or autodetect block vs fileio
When using block devices to back iSCSI logical units it is
advantageous to use blockio as it decreases latency and
increases throughput, effect is especially pronounced with
faster backing storage devices.
test_get_method_unknown_controller_action was defined twice,
checking however for different things. Rename the 2nd instance
to test_get_method_undefined_controller_action instead, otherwise
it gets overwritten later and not run. Increases test coverage
Michael Kerrin [Tue, 16 Apr 2013 08:09:35 +0000 (08:09 +0000)]
Cinder wasn't filtering the backups returned to backup list API
This has the side effect of return all backups in the system (regardless of
who created them) to the user. You should only see the backups created in your
current active project.
Yang Yu [Wed, 17 Apr 2013 08:00:07 +0000 (16:00 +0800)]
cinder volume service keeps retrying even code exception
Make sure that ProcessLauncher does not try to restart the failed
service. And make sure the ProcessLauncher exits, when the number
of the failed services equal the number of total services.
John Griffith [Fri, 12 Apr 2013 02:05:01 +0000 (20:05 -0600)]
Add capabilities reporting to ThinLVM driver
ThinLVM driver was missing the newly required capabilities reporting
and inheritance from the parent LVM driver doesn't work because the
capacity reporting methods between regular LVM and Thin LVM are not
compatible.
This patch add the basic requirements needed in the capabilities reporting
to make it usable by the filter scheduler.
The tests were failing due to an upgrade in the testing framework
(possibly due to upgrade of nose package from 1.2.1 to 1.3.0).
The actual reason was a bug in the suds client. A simple
workaround is utilised here, which sets the logging level of a
suds file to INFO instead of DEBUG.
Some 'FutureWarning' warnings from the test output were also
fixed.
John Griffith [Wed, 10 Apr 2013 05:07:52 +0000 (23:07 -0600)]
Add parsing to extra-specs key check
When using the filter scheduler which is now the default,
we can no longer pass in extra-specs like: {minIOPS:500, ....},
because the capabilities filter will reject this because there is
no host reporting minIOPS:500 capabilities.
We now need to scope the keys (ie qos:minIOPS:500....), but
that unfortunately requires a fix to the SolidFire driver.
This change add a check for the ':' in the key, and parses
on it if it's there.
Also fixes backend_name and uses VERSION var instead of
generating string in stats reporting.
Use a SSH pool to hold all SSH clients.It allows 4 SSH clients
at most to connect to the SSH server at the same time.
This patchset also enables every SSH client connect to the other
controller when they failed to connect to the current controller.
For example,failed to A,then to B,or,failed to B,then to A.
John Griffith [Fri, 12 Apr 2013 00:42:59 +0000 (18:42 -0600)]
Remove Flags usage from cinder.volume.driver
cinder.volume.driver was using a mix of FLAGS and the
new conf options for multi-backend. The result was failure
of multi-backend configrations to set the iscsi_helper
option.
This updates the driver.py file to use the OSLO.cfg and fixes the
check for iscsi_helper check in the initialize_connection call,
which was undefined.
Inconsistencies in the command line syntax between Storwize/SVC
models and firmware versions caused driver failures. This patch
makes commands compatible to fix driver crashes on the V3700 and
controllers with firmware version 6.3.
ID was being printed as %d instead of %s, causing tests to fail. This
error was previously undetected.
In addition, NetApp tests are failing due to a bug in the suds
package, which is no longer actively maintained. This patch adds skips
to the problematic tests, which should be removed once the issue is
resolved.
The code tested by test_preattach_status_volume was moved, and the
test no longer tested anything relevant (i.e., instead of checking
that the volume is 'attached', the test was changed to test for
'available' since the attach code was moved). This patch, therefore,
deletes that test.
Further, test_run_attach_detach_volume called database functions for
attaching and detaching. This patch changes those calls to call
higher-level functions which in turn call the database functions. This
gives better code coverage and gives the tests more meaning.
Don't see any reason to construct a list for request_spec['volume_id'].
And it indeed causes problems when the scheduler receives a reschedule
request with such a request_spec.
Stephen Mulcahy [Thu, 4 Apr 2013 16:10:16 +0000 (16:10 +0000)]
Allow deletion of backups where the service is None
If a backup is created while both cinder-backup and rabbitmq
are not running, backup records are created in the database with a
service entry of None.
There is no actual backup data created on the service, since the service
isn't running. This fix allows removal of these records without an error
when a delete backup request is received.
This fix also ensures backup status is set to error in the event of
an exception during a delete.
zhangchao010 [Tue, 26 Mar 2013 14:10:19 +0000 (22:10 +0800)]
Change format of some judgments
Because "not volume" will be True if volume id is 0.It can not
distinguish 0 from None.The same to some other judgments where
variable value may be 0.
This patch also does the following changes:
Deletes check storagepool in function _check_conf_file and adds
check default iscsi target IP in function initialize_connection.
Moves create host group from do_setup to initialize_connection.
Changes _get_login_info to be _update_login_info.
Removing this enables use with sqlalchemy 0.8.0
The deprecation is described upstream at:
http://docs.sqlalchemy.org/en/latest/changelog/changelog_08.html#change-ad44af79c886d1bb283042deb64f9cbe
Larry Matter [Thu, 28 Mar 2013 23:29:38 +0000 (16:29 -0700)]
REST session validity not checked in get_volume_info
The fix for bug 1157242 introduced a new bug in Coraid cinder driver
_get_volume_info that the login session is not checked for
validity/timeout. This change addressesthat issue for all
methods in the CoraidRESTClient class.
Cory Stone [Mon, 25 Mar 2013 20:09:37 +0000 (15:09 -0500)]
Add the volume and snapshot gigabytes together.
The quota sync functions were not working correctly for both
snapshots and volumes regarding gigabytes. Each would report
their own count as the total gigabytes.
Now the gigabytes sync is separate from the volume and snapshot
count syncs.