Masaki Kanno [Sat, 1 Aug 2015 08:40:39 +0000 (17:40 +0900)]
NetApp SSC job will be run periodically
NetApp cDOT driver is supposed to run SSC job at intervals of 1800
seconds. However, after SSC job ran when cinder-volume services
were started, SSC job does not run again.
The driver should use 'is_older_than' method of oslo_utils to
confirm 1800 seconds passed from last SSC job.
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
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.
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.
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.
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.
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.
Xing Yang [Mon, 22 Jun 2015 21:46:32 +0000 (17:46 -0400)]
Non-disruptive backup
This patch adds support for non-disruptive backup for
volumes in 'in-use' status as follows:
Adds a force flag in create backup API when backing up
an 'in-use' volume.
For the default implementation in volume/driver.py:
* Create a temporary volume from the original volume
* Backup the temporary volume
* Clean up the temporary volume
For the LVM driver:
* Create a temporary snapshot
* Obtain local_path for the temporary snapshot
* Backup the temporary snapshot
* Cleanup the temporary snapshot
Attach snapshot will be implemented in another patch.
Philipp Marek [Wed, 22 Jul 2015 11:36:24 +0000 (13:36 +0200)]
DRBD: Rename a constant to a better name
As requested in a Icb7347d55dc5b22720269405b6d2b4053c2ad819 review
(https://review.openstack.org/#/c/178573/19..20/cinder/volume/drivers/drbdmanagedrv.py)
constants should consist of uppercase letters only.
Tom Swanson [Tue, 21 Jul 2015 19:05:14 +0000 (14:05 -0500)]
Dell SC: Fix legacy bug, init_conn bug and REST API bug.
If Dell iSCSI ports are in legacy mode rather than virtual port
mode initialize_connection would fail to return connection information.
If initialize_connection was called more than once for the same
connection it would attempt to map the volumes again and fail. It should
instead just return the connection information and not try to map the
volumes again.
The Dell REST API 2.2 and later changed the format of the payload
filter. We need to support either format.
Finally consistency group support is only supported in Dell REST API
2.1 or later. If the version is 2.0 we raise NotImplemented.
Tom Swanson [Tue, 14 Jul 2015 17:21:19 +0000 (12:21 -0500)]
Dell SC: Fix Consistency Group issues
The Dell Storage Center driver was not honoring the consisgroup_id
in the volume object in volume creation. Updated create_volume,
create_cloned_volume and create_volume_from_snapshot to honor this
value.
The driver was also not checking that volumes were initialized prior
to snapshotting a consistency group. The Dell backend does not
actually create the volumes until there is data or the volumes are
mapped to a server.
On create_volume_from_snapshot the driver was not checking for
cgsnapshot_id before snapshot_id.
Changed from calling the db to update snapshots to retrieving
the SnapshotList() object.
In addition some tests were not checking results. Fixed that.
Anton Arefiev [Wed, 17 Jun 2015 15:57:34 +0000 (18:57 +0300)]
Add drivers list generator
It is useful to have a maintained (in source control) list
of drivers that exist in Cinder. It could be used in docs
and unit tests to check method impl on backend drivers.
This change add tool for generate list of drivers based on
existing BaseVD class in class hierarchy of volume drivers.
Test test_create_volume_with_consistencygroup_invalid_type in
tests.unit.api.v2.test_volumes is verifying consistency group
logic in cinder.volumes.api. This patch moves this test to
tests.unit.test_volume.py.
John Griffith [Mon, 15 Jun 2015 21:23:39 +0000 (15:23 -0600)]
Remove logging statements from migrations
One of the things that I believe is causing problems with the move to
ostestr and concurrency in unit test run is the copious amounts of
logging that is coming from the db migrations. In most cases much of
this logging doesn't really seem all that useful, a debug or info log
stating a migration failed, followed by a raise which should generate
a stack trace with the error anyway, seems we could easily do without
this.
Also the "performing migration xxxx/completing migration xxxx" doesn't
seem overly helpful either. Keep in mind that the migration engine
does some amount of logging anyway.
In addition, catching the exceptions and logging them isn't overly
beneficial or needed either. When calling migrate from cinder-manage
if one of the migrations raises an exception that will be propogated
up to cinder-manage and displayed. In other words all of the info is
already available, so there's no need to put it here.
Finally, if you take a look in general most migrations in other
projects don't LOG every thing for the same reasons.
So this patch removes logging statement from the migrations themeselves.
Philipp Marek [Mon, 20 Jul 2015 20:23:19 +0000 (22:23 +0200)]
DRBD: Define a separate prefix for snapshots
As snapshots and volumes are done via one namespace (DRBD resources),
having distinct names helps during debugging - it's easy to see which
type of Cinder element is.
Patrick East [Mon, 13 Jul 2015 22:49:40 +0000 (15:49 -0700)]
Prevent missing Purity hosts from raising errors
Occasionally a Purity host can be deleted out from underneath Cinder.
When this happens if cinder is attempting to disconnect a volume from
that host we should treat it as a ‘success’ since if the host is gone,
it is disconnected already (as far as Purity is concerned).
To prevent one cause of this, the disconnect method will now be locked
with the connect ones so that can’t delete a host we intend to re-use.
chenzongliang [Thu, 4 Jun 2015 02:43:07 +0000 (10:43 +0800)]
Refactor Huawei Volume driver
This patch attempts to refactor Huawei volume driver in liberty.
We add a base driver to implement the basic functions.
The sub-class will inherit from the base driver according to different
storages.
The following changes were made in this refactor:
1. Abstract a base class named HuaweiBaseDriver to make Huawei driver more
universal. You can find it in the huawei_driver.py.
2. Put all static variables into the constants.py.
3. Rename rest_common.py to rest_client.py. rest_client.py stores the
relevant methods implemented for Huawei driver.
4. Migrate some public methods from rest_client.py to huawei_utils.py,
such as parse_xml_file(), _get_volume_type() and so on.
5. This refactor only involves structural adjustment and does not involve
functional changes.
Mitsuhiro Tanino [Wed, 24 Jun 2015 03:49:50 +0000 (23:49 -0400)]
Graceful shutdown WSGI/RPC server
Change-ID I80487f559302b0e88953835ffb4a3bfe2a347501 introduces
oslo.service into Cinder. The graceful shutdown of RPC server
was introduced via merging of oslo.service.
Actual fix was introduced by https://review.openstack.org/#/c/190175/
into oslo.service.
The oslo.service fix provides this facility through it's wait()
method, so we need to call it in Cinder Service wait() method
which gets called when graceful shutdown is requested by sending
the process SIGTERM.
Backups: allow name to be specified during restore
This commit adds the ability to specify a `name` attribute during backup
restore. This will create a volume with the specified name during
restore, instead of the default pattern of the form
`restore-backup-<id>`. In case volume id is specified the `name`
attribute is ignored.