John Griffith [Thu, 20 Aug 2015 16:45:03 +0000 (10:45 -0600)]
Add ability to update provider_id during init
During the Liberty release we added the ability to store
a provider_id for a volume in the Cinder database. This
simplifies a number of things for back ends when accessing
volumes.
One missing piece here however is that we have no way to
populate this data for existing deployments if/when they
upgrade.
This patch provides a simple solution that issues an update
call to the drivers on host init. It works by fetching a
list of volumes for the specific host, and passes those in
to the driver. The driver can do nothing, or it can go
through and sync up the Cinder ID's with it's internal
ID's and return the provider update info.
John Griffith [Thu, 20 Aug 2015 21:49:59 +0000 (15:49 -0600)]
Add SolidFire svip to config options
The SolidFire driver uses a simple method of gathering
the Storage Virtual IP, it just queries the Cluster and
asks for the SVIP. This is great almost all the time,
BUT it doesn't take into consideration that the deployer
may be using VLAN's and accessing the cluster from multiple
clouds, or multiple networks.
This patch just adds a config option to specify an SVIP
if the admin has configured VLANs in their environment and
on their cluster. The default behavior is to still use the
global SVIP.
fileutils is graduated in the oslo.utils library.
Use the open function from builtins instead of fileutils.file_open.
Change the test_backup_volume (test_scality module) and
test_restore_backup (test_scality, test_volume) functions to use
mock library instead of mox.
John Griffith [Wed, 19 Aug 2015 21:07:49 +0000 (21:07 +0000)]
Parse out SolidFire account from api response
In the SolidFire create-cache account routine we broke the response
check and are trying to use the entire api response as if it were an
account object.
This patch just pulls the actual account object out of the response
instead of using the entire API response.
Tom Swanson [Tue, 18 Aug 2015 19:36:38 +0000 (14:36 -0500)]
Dell SC: Better exception handling in init_conn
Now re-raising VolumeBackendAPIExceptions in initialize_connection.
And logging any other exceptions as VolumeBackendAPIException. This
preserves the actual failure in the logs.
Adriano Rosso [Mon, 10 Aug 2015 19:19:31 +0000 (16:19 -0300)]
Adds the random option to cinder retry function
The current retry functionality in Cinder, always uses fixed
numbers to define the time to wait before performing the next
attempts. This behaviour can make the retries of multiple
requisitions to collide in each attempt as they will wait the
same amount of time and try to use the same resource together
again.
This patch changes the behaviour of cinder.utils.retry() to
receive a parameter that allows the function to implement
randomly generated wait intervals.
Kurt Martin [Tue, 18 Aug 2015 23:15:28 +0000 (16:15 -0700)]
LeftHand driver is ignoring reserved_percentage
The LH driver was hard coding the reserved_percentage parameter to 0.
The LeftHand driver should be reading this value from the cinder
configuration file as it's used in the capacity filter for calculating
capacities.
John Griffith [Tue, 18 Aug 2015 23:08:13 +0000 (17:08 -0600)]
Update devref unit tests doc
Simple update for our painfully out of date devref docs.
Just a short refresh on unit_tests, there's a lot that could
and probably should be added there, but this change just gets
rid of the obsolete references to Nose and adds info regarding
tox and how to use it.
Eric Harney [Tue, 18 Aug 2015 22:10:58 +0000 (18:10 -0400)]
Tests: Fix zfssa TestRestClientURL.test_request
This test can currently fail with mismatched parameters
to urlopen. Just ensure that urlopen is called so
that this works across all environments/versions.
Eric Harney [Tue, 18 Aug 2015 21:09:50 +0000 (17:09 -0400)]
Test whether sample config generation works
Adds --checkonly to tools/config/check_uptodate.sh.
This allows verifying that a configuration file was
generated.
We have had a number of issues introduced which
have caused config file generation to fail since we
removed the sample config file check in the gate.
This does not add back checks to ensure that the file
has been updated, it only checks to ensure that it is
still possible to update the sample file.
Adding optional dependency tracking would be nice,
but Cinder is not yet in a place to do this.
- Cinder supports tox 1.6 (minversion in tox.ini)
- This functionality does not work on 1.6, requires 1.7. Tox
fails to build a test environment if using tox 1.6.
- We have decided we can't move to tox 1.7 for now.
( https://review.openstack.org/#/c/211614/ )
Jay S Bryant [Tue, 18 Aug 2015 19:24:52 +0000 (14:24 -0500)]
Register the volume_opts config options in remotefs.py
With commit bc23e0bf415defb1956c9864ac33390bb4cc2017 a new
volume_opts configuration option list was added into
cinder/volume/drivers/remotefs.py. This new list, however,
was never registered. When an options list is not registered
genconfig cannot figure out the right place to put the config
options and will fail to generate the sample file.
To resolve this, the patch simply registers the new options
list in remotefs.py. Once the list is registered we are,
once again, able to generate the sample file.
Sean McGinnis [Tue, 18 Aug 2015 13:08:18 +0000 (08:08 -0500)]
Dell SC: Fix error causing missed log message
Extremely trivial fix. An extra comma at the end of a
logging line actually made it into a statement that
doesn't perform logging. This patch removes the extra
comma so that the message gets logged as expected.
Capacity filter uses free_virtual capacity to filter out a host if
thin provisioning is enabled and over-subscription ratio is less
than or equal to max_oversubscription_ratio. The current formula
for free_virtual is not calculating the real free virtual capacity.
Rather it computes "adjusted" free virtual capacity which is the
current free capacity (after taking into account of reserved space)
we can over-subscribe. This patch adds necessary documentation and
renames free_virtual to adjusted_free_virtual to clarify this.
Yusuke Hayashi [Sat, 8 Aug 2015 14:12:18 +0000 (23:12 +0900)]
Update deprecated version of novaclient
Update novaclient v1.1 to v2
because warning messages are shown as below when executing run_test.sh:
UserWarning: Module novaclient.v1_1 is deprecated
(taken as a basis for novaclient.v2).
The preferable way to get client class or object
you can find in novaclient.client module.
Joel Coffman [Tue, 4 Aug 2015 19:12:22 +0000 (15:12 -0400)]
Correct comment to be consistent with code
The volume_encryption_metadata_get function returns more than just
the encryption key id. This change generalizes the comment to refer
to all the metadata that is returned.
Liu Xinguo [Tue, 14 Jul 2015 03:25:46 +0000 (11:25 +0800)]
Add volume migration support for Huawei driver
If the target host and the original volume are on the same array,
then Huawei driver will do the migration now instead of having
it done by the general migration process.
In vCenter inventory, volumes are organized under the folder:
<datacenter_vm_folder>/<volume_folder>, where <volume_folder>
is the value of driver config option 'vmware_volume_folder'.
Due to this organization certain project-specific maintenance
tasks (using vSphere client) might be difficult for vCenter
admin. For example, the admin may need to migrate the volumes
of a particular project from one vCenter datastore to another.
This patch changes the folder hierarchy to:
<datacenter_vm_folder>/OpenStack/Project
(<project_id>)/<volume_folder>
for better organization.
DocImpact
Modified default value of config option
'vmware_volume_folder' and updated its description.
Eric Brown [Sat, 15 Aug 2015 18:36:33 +0000 (11:36 -0700)]
Use min and max on IntOpt option types
Latest version of oslo.config support the ability to set valid
range on IntOpt option values. This path makes use of that feature
for a number of options with well known minimum and maximum values.
Patrick East [Tue, 11 Aug 2015 21:08:29 +0000 (14:08 -0700)]
Implement Clone CG in Pure Volume Drivers
This adds support for the consisgroup-create-from-src method specifying
a source consistency group.
The driver will create a new Purity Protection Group, take a temporary
snapshot of the source Protection Group, create new volumes from the
consistent snapshot, and then add these new volumes into the newly
created protection group.
Jacob Gregor [Thu, 13 Aug 2015 20:31:16 +0000 (15:31 -0500)]
Reduced file size to prevent timeout
We currently have a test system that appears to be I/O constrained
and is hitting timeouts. Rather than mocking out the file copy, we
decided to reduce the file size in order to avoid timeouts. This way
we are not changing the way these test cases work, but we are reducing
the time required to run each test case. This patch will help improve
check and gate performance as well.