Brent Roskos [Sun, 16 Aug 2015 12:41:48 +0000 (08:41 -0400)]
adds user_id to check_is_admin
A small tactical update to allow cinder to consider user_id
when checking for admin.
This is needed in the field until the larger changes around
admin scoping are completed. Checking for role only is not
sufficient in a multi-domain configuration.
John Griffith [Thu, 9 Jul 2015 21:11:54 +0000 (21:11 +0000)]
Cinder replication V2
This adds a scaled back replication implementation
that leaves the bulk of the work up to the driver.
We just provide basic admin API methods to do things
like enable/disable and fail-over. Set up and
specification of replication targets for a specific
back end are now intended to be part of the cinder.conf
in the driver section itself.
Replication targets are configured via the cinder.conf
file in their associated driver section. See the devref
doc included in this commit for details on the format.
The next step in configuration is to create a volume-type
with replication info in the extra-specs.
extra-specs = replication=enable, volume_backend_name=foo
This instructs the driver to utilize replication, default is
up to the driver but would suggest single way rep and in the case
of multiple targets, driver could choose or have a default.
If the back end doesn't report replication=enabled in it's stats
updates the scheduler will fail to place the volume due to invalid
host, or no hosts available.
Vendors can easily modify extra-specs or their own config settings
to modify this behavior, any vendor-unique adaptation can be
provided through the use of scoped keys. Suggested examples
will be published in docs.
See doc/source/devref/replication.rst for more info
Tom Swanson [Fri, 21 Aug 2015 22:00:23 +0000 (17:00 -0500)]
Dell SC: Added logging for the find_wwns functions
Added additional LOG.debug() statements to find_wwns and associated
functions. Right now there aren't enough bread crumbs to easily triage
a problem with the return for the FC intitialize_connection function.
John Griffith [Thu, 20 Aug 2015 19:09:57 +0000 (19:09 +0000)]
Update provider_id column on SolidFire init
This patch just implements an init routine to update
the cinder db with provider_id mappings to known/active
volumes on the SolidFire cluster.
Now that we have added a mapping feature in the DB, we need
to go back and populate these columns on an upgrade. It's
also helpful to have this mechanism for internal mappings on
init, that's why it's here as an init routine instead of part
of an upgrade migration or cinder-manager script.
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.
Cinder currently doesn't check the existing resource
when user lowers the quota sets. It should have an optional
action that doesn't allow to update the quota of resources
lower than current usage.
This patch adds code to validate the update value of quota and
ensure the value can't be lower than existing resource.
APIImpact
Add an optional boolean argument 'skip_validation' with default value True.
{
"quota_set": {xxxx},
"skip_validation": 'True'/'False'
}
If skip_validation=False and the update value is lower than existing resource,
API will return 400 Bad Request.
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.
Tina [Wed, 5 Aug 2015 03:15:03 +0000 (23:15 -0400)]
Return multiple iSCSI portals in VNX Cinder driver
Return multiple iSCSI portals (using keys target_portals, target_iqns
and target_luns) in VNX Cinder driver whether the multipath option
is used or not. A single portal is continuously being returned in
target_portal, target_iqn and target_lun for drivers other than
libvirt driver.
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.
The following patch is part of the cinder effort to
support rolling upgrade. This patch adds columns
to the services table to track the RPC and
oslo_versionedobjects versions of each service.
Follow up patches will be made to have each service:
register its RPC and oslo_versionedobjects versions on
startup, make the RPC and oslo_versionedobjects versions
compatible with an older release, and update the versions
once all services are updated to the latest release.
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.