John Griffith [Thu, 30 Jul 2015 17:43:00 +0000 (11:43 -0600)]
Use prefix for SolidFire template account
The SolidFire template account was not using the
account_prefix setting when the account was created.
This means that if a deployment is configured to use
the prefix, that calls to make the actual clone will fail
because the clone routine prepends the prefix from the
config settings on every lookup.
This patch just adds the same account adjustment that
we use in our regular account creation routines.
Transient DB errors should not kill the thread for FixedIntervalLoopingCall.
This was noticed and fixed for the DBError case in Bug#1466991, but the
exception from sqlalchemy is not handled. Basically, self.model_disconnected
should be set to True, but the looping thread should carry on regardless of
the error.
The VMDK driver reports the protocol as 'LSI Logic SCSI' in
backend stats. This patch changes the protocol to 'vmdk'
which is in sync with driver support matrix at:
https://wiki.openstack.org/wiki/CinderSupportMatrix
It might happen that multiple cinder nodes/backends are trying to add
volumes to the same target. In this situation, the driver can get an
error trying to add a volume to a hlun just taken by other instance.
This patch fix this avoiding concurrency using mutual exclusion and adds
retries to the failed attempts to cover scenarios where multiple cinder
hosts are used.
Extending a linear LVM volume that has a snapshot requires
that the LV be deactivated explicitly prior to extending.
This adds a deactivate_lv method and calls it prior to
issuing the extend call. If auto_activation_volume_list
is not defined lvm.conf, then volumes will be reactivated
automatically after the extend. If auto_activation_volume_list
is defined, then volumes that should be automatically
reactivated should be added to the auto_activation_volume_list
or they won't be activated automatically.
NOTE: This doesn't apply to thin provisioned LVs as they don't
require the deactivation step.
DocImpact: When a user extends LVM Volumes with a snapshot, the
volumes will be deactivated. Their re-activation is automatic,
unless auto_activation_volume_list is defined in lvm.conf.
See lvm.conf for more info. Thin provisioned LVM Volumes
will not be deactivated as they don't require it.
Co-Authored-By: John Griffith <john.griffith8@gmail.com>
Change-Id: If746625cfe658c3528525dc7f4bf869f1c9704dc
Closes-Bug: #1470558
Fix exception on uploading a volume to image with glance v2 API
This fixes an exception on uploading a volume to image when
the glance v2 api is enabled. Also, this adds the unit tests
for updating metadata and data both with glance API v1 and v2.
The Nimble driver does not set the VERSION variable
causing its version to be logged as N/A. This patch
updates that variable so that the correct version
number is reflected in the log.
Eric Harney [Mon, 27 Jul 2015 17:24:36 +0000 (13:24 -0400)]
Log which service is down
This changes the message "Manager for service cinder-volume
is reporting problems..." to
"Manager for service cinder-volume myhost@backend1 is
reporting problems..."
This makes it more clear in the log file which backend this
message is referring to.
The update_migrated_volume() function on volume/manager.py
calls the update_migrated_volume() from the driver. If the
driver does not implement the function, the manager falls
back (by catching the NotImplementedError exception) and
implements a default behavior, not renaming the volume. If
the driver does not have the function implemented, the
migration will fail as in this case, an AttributeError
exception can be raised.
We fix this by implementing the method
update_migrate_volume() in the BaseVD driver so all drivers
now throw the proper exception.
Jon Bernard [Thu, 23 Jul 2015 17:47:03 +0000 (13:47 -0400)]
RBD: use user-configured value for max_clone_depth
This patch allows the user to override the default max-clone-depth in
cinder.conf. Without this, the driver will ignore the user setting and
always use the default.
Tom Barron [Sat, 25 Jul 2015 21:11:29 +0000 (17:11 -0400)]
Fix cleanup_temp_volume_snapshots for missing vol
The cleanup_temp_volume_snapshots method raises an exception that
causes the backup service to exit if there is a backup without a
corresponding volume.
This commit catches these exceptions so that the backup service is
not prevented from starting in this circumstance.
This change helps create cinder volumes on a GPFS cluster,
when the cinder services are not running directly on one of
the GPFS nodes.
The NFS export created on GPFS cluster will be locally mounted
on a node running the cinder service. The cinder volume service
will communicate with GPFS nodes over SSH to execute CLIs remotely.
This change also ports the GPFSDriver to ABC driver model.
Implements : blueprint ibm-gpfs-nfs-support
DocImpact
Needs an update in gpfs driver documentation, as this patch
adds an NFS based access for GPFS cinder driver.
Mike Perez [Mon, 27 Jul 2015 05:46:17 +0000 (22:46 -0700)]
Remove deprecated SimpleScheduler
This has been deprecated for three releases now. It's time! By default
it was already having Cinder use the FilterScheduler with certain
weighers and filters to continue the chance behavior, so definitely not
scary!
Shay Halsband [Mon, 8 Jun 2015 16:08:46 +0000 (19:08 +0300)]
XtremIO support for iscsi discovery auth
- Discover existing Initiator Groups (a grouping object for initiators)
from connection information.
- add unit tests for better code coverage.
- handle 'system is busy' array error.
Michal Dulko [Tue, 21 Jul 2015 10:30:56 +0000 (12:30 +0200)]
Refactoring of manager's create_volume flow
This commit resolves a TODO item (bulk metadata create), rephrases
some comments and makes use of new TaskFlow functionality to save
results of revert command to make decisions in c-vol manager instead
of doing an ugly workaround by injecting the information into exception
raised.
Michal Dulko [Thu, 9 Jul 2015 07:05:10 +0000 (09:05 +0200)]
Remove unused arguments from c-vol's create_volume
Arguments snapshot_id, image_id, source_volid, source_replicaid,
consistencygroup_id and cgsnapshot_id in volume.rpcapi.create_volume
RPC method are duplicated either in request_spec dictionary passed as
one of the arguments or are saved into the databased and are retrieved
by flow processing the request.
To simplify the flow this commit removes these duplicated parameters
and adapts rest of the code to use occurrences that are already there.
Edwin Wang [Mon, 20 Jul 2015 12:25:25 +0000 (20:25 +0800)]
Add I/T mapping check for IBM FlashSystem
No initiator_target_map within properties is needed if no more I/T
connection. Otherwise the FCZone manager will remove the zoning
between I/T. This patch is to add host check in terminate_connection.
If no I/T exists, host will be removed in _unmap_vdisk_from_host.
Remove simple scheduler which is deprecated since Juno
Chance and Simple scheduler functionality can be archived using
FilterScheduler, config details is described here:
http://docs.openstack.org/developer/cinder/api/cinder.scheduler.simple.html
The implementation has been deprecated in Juno,so we can remove
it safely now.
The create_volume_from_snapshot() and migrate_volume() use
dd command for data copy, but the copy always copies full blocks
even if the source data contains many null or zero blocks.
When we use thin provisioned LVM, blocks are not pre-allocated,
so unused region returns zero.
If we copy full block for destination volume, unnecessary blocks
will be allocated and the usage will be 100%.
The dd command has conv=sparse option in order to copy data more
efficiently. This patch enables conv=sparse option for
create_volume_from_snapshot() and migrate_volume() when we use
thin provisioned LVM.
Patrick East [Thu, 23 Jul 2015 23:02:43 +0000 (16:02 -0700)]
Implement retype for Pure drivers
Currently retyping on the same backend requires a migration to occur
due to using the default implementation of retype on the base volume
driver.
Volumes on the Pure arrays do not have any differentiation
between volume types Cinder may be using. Because of this we can
implement a retype method that will be used whenever changing
types on the same backend that essentially does nothing except return.
Sean McGinnis [Wed, 24 Jun 2015 21:55:33 +0000 (16:55 -0500)]
Dell SC: Add support for driver retype
Previously there was no need to support retype by the driver
since any kind of retyping would require migration. With the
addition of the ability to set specific Storage Profiles to
use by commit Icf76fceca5a0ae20bb08b276b0c41ef6cdb31087 we
now have something the driver can handle to optimize the
retyping operation.
This adds handling for changes in the selected Storage Profile
if the backend stays the same. Any other retype changes will
return failure, resulting in it falling back to full volume
migration.
Patrick East [Tue, 23 Jun 2015 00:38:30 +0000 (17:38 -0700)]
Add Cinder internal tenant support
This adds two new config options as well as a
helper method to get a RequestContext for the
Cinder internal tenant.
The current implementation will not create a
request context that can be used for calls to
other services, it is (as the name implies) only
for internal Cinder operations.
DocImpact: This adds new config steps that should
be covered in the Cinder docs including the new config
options: 'cinder_internal_tenant_project_id' and
'cinder_internal_tenant_user_id'
VMware:Replace vCenter calls with oslo.vmware calls
Currently we call vCenter APIs to find storage policy
associated with a volume. There are methods defined
in oslo.vmware to query storage policies. This patch
replaces vCenter API calls with oslo.vmware method
calls.