Ronen Kat [Thu, 23 Jan 2014 09:58:58 +0000 (11:58 +0200)]
Export and import backup service metadata
Add new admin API for backup-export and backup-import.
The new commands export the backup details (not actual backup) to
a string that can be imported again in another OpenStack cloud or
if the backup database was corrupted.
The code includes a default backup driver implementation.
Backup test code converted to use mock.
blueprint cinder-backup-recover-api
DocImpact new admin API calls backup-import and backup-export
Zhiteng Huang [Thu, 27 Feb 2014 01:58:17 +0000 (09:58 +0800)]
Don't clear host_state_map when scheduling
host_state_map was added to scheduler for the purpose of caching latest
host_state in memory for scheduler. With this cache, scheduler has the
latest host_state (e.g. free_capacity, allocated_capacity, etc) of hosts
even hosts haven't reported their updated status to scheduler.
Unfortunately, this cache is flushed when scheduling pulling all available
volume services from DB in current implementation, which is a bug.
This change remove the host_state_map.clear() so that scheduler is able to
maintain an up-to-date (well, mostly) view of all volume services in memory.
Also, added code to remove non-active host from the cache every time when
scheduler handles a new request. Multi-line docstrings in cinder/scheduler/
host_manager.py are also fixed.
Duncan Thomas [Wed, 19 Feb 2014 19:03:24 +0000 (19:03 +0000)]
Add optional ionice to volume clearing process
Allow the volume clearing process to have an ionice priority set to
reduce the performance impact of volume zeroing. Note that this may
cause volume clearing processes to get backed up on a busy system, use
with care.
Eric Harney [Wed, 26 Feb 2014 16:38:29 +0000 (11:38 -0500)]
GlusterFS: Increase snapshot delete job timeout to two hours
Increase the timeout for Nova snapshot delete operations from ten
minutes to two hours. This helps prevent Cinder from terminating
operations prematurely that are still being processed by Nova.
It is not uncommon for snapshot delete jobs to run for longer than
ten minutes depending on the size of the snapshot and speed of the
storage backend.
This will be followed up with a more robust mechanism to keep track
of snapshot job progress as a later effort.
This patch changes the way the config options are
layed out in the cinder.conf to follow the
standards for grouping settings together.
Instead of using dynamic config names to group
settings together by fabric name, we look for
fabric groups based upon the fc_fabric_names.
We also create a new fc-zone-manager group
for all of the global fczm settings.
Ben Swartzlander [Tue, 25 Feb 2014 19:44:14 +0000 (11:44 -0800)]
Change warning message in NetApp driver for vsadmin creds
The new warning messages explicitly lists the extra_specs that
can't be supported depending on the access level fo the creds
that were provided. Also corrects a spelling error for the
netapp_nodedup extra_spec.
Ramy Asselin [Mon, 24 Feb 2014 22:54:08 +0000 (14:54 -0800)]
3PAR: Create volume from snapshot with larger size
Refactored the migrate_volume code to be usable by both migrate volume
and create volume from snapshot with a larger size. The common functionality
is to clone a volume as a base volume. Migrate volume specifies a different
CPG, whereas create volume from snapshot uses the same CPG.
john-griffith [Tue, 25 Feb 2014 06:02:11 +0000 (23:02 -0700)]
Fix free_capacity reporting in SolidFire driver
The SolidFire driver reports capacity info in bytes, the
capabilities update reports available_GB. Sadly we neglected
to convert the bytes to gigibytes here which made for a VERY
large backend and caused things like capacity filtering to not
work correctly.
This patch just adds conversion to GiB when reporting capabilities.
Bill Owen [Thu, 13 Feb 2014 14:54:33 +0000 (07:54 -0700)]
Implement retype in IBM GPFS Driver and refactor
1. Add retype method to GPFS driver. Currently only storge_pool
attribute is handled. Future patches will extend this.
2. Refactor migrate method to handle migration locally if source
and target are in the same gpfs cluster.
3. Move driver into 'ibm' directory.
4. Refactor based on pylint feedback.
5. Replace mox with mock in unit test.
6. Improve exception handling and logging.
This patch adds the required initiator target map
for the Fibre Channel Zone Manager. The
FCZM looks for the initiator_target_map to try and
automatically zone up the endpoints.
Avishay Traeger [Mon, 24 Feb 2014 17:55:15 +0000 (19:55 +0200)]
Fix race in test_delete_backup
Unit test sporadically failed due to timing issue - the deletion
timestamp on the backup was exactly the same as timeutils.utcnow(),
causing the AssertGreater check to fail. Change to AssertGreaterEqual.
Nilesh Bhosale [Fri, 27 Dec 2013 03:32:56 +0000 (09:02 +0530)]
Driver for IBM SONAS and Storwize V7000 Unified
The IBM NAS Driver currently implemented to work over NFS protocol,
and implements required set of features for OpenStack Icehouse release,
using the features of these storage products. It allows IBM® SONAS®
and Storwize® V7000 Unified filers to host storage for OpenStack
environment by integrating with Openstack Cinder service.
LarryLiu [Fri, 14 Feb 2014 07:46:07 +0000 (15:46 +0800)]
Storwize/SVC: Change volume copy task to async
If Cinder crashes during a migration or retype (where data is moved and
the operation can take a long time), the storage ends up with multiple
copies of the same volume which requires storage admin intervention.
This patch maintain a list of pending operations which is backed up in
admin metadata, and a periodic task reviews the list and removes volume
copies whose copy operation completed. When Cinder comes up, check the
admin metadata and rebuild the list.
Creating FC connections was not working due to several issues:
1. The lsfabric command in the Storwize/SVC omitted the delimeter and so
the output was not correctly parsed by the driver.
2. In some cases comparisons of WWPNs were not case insensitive - ensure
we compare lower-case WWPNs.
3. If the host supplied extra information in the connector (e.g. iSCSI
initiator name in case of an FC setup, or FC WWNNs/WWPNs in an iSCSI
setup), the driver would try to make those host mappings on the storage
too. This could lead into unwanted behaviour and confusing error
messages (for example, in an FC setup reaching the maximum number of
iSCSI mappings).
In addition, unit tests weren't properly testing FC - instead they were
always testing iSCSI due to an error in parsing extra_specs. This patch
fixes that error and the unit tests as well.
These changes must all be made together for unit tests to pass.
Allows automated zone lifecycle management in the attach/detach
entry points of the volume manager for FC volumes (when fabric
zoning is enabled). Zones are configured automatically as part
of the active zone set in the FC SAN to provide a more flexible
and secure way of controlling access. FC zone manager enables
SAN vendors to add support for pluggable implementations.
Ramy Asselin [Thu, 13 Feb 2014 00:23:15 +0000 (16:23 -0800)]
3PAR: Backend assisted volume migrate
This patch implements volume migrate using native 3PAR APIs.
Prerequisites:
1. Same 3PAR backend
2. Volume cannot be attached
3. Source and Dest CPGS are in the same domain
Steps:
1. Create a temporary volume in the destination with a copy of the source
2. Wait for the copy to complete
3. Delete the source
4. Rename the temporary to the same name as the original
Avishay Traeger [Thu, 20 Feb 2014 11:22:37 +0000 (13:22 +0200)]
Ensure return for db api functions
Functions in db/api.py should return whatever the implementation of
those functions return. This is important for qos_specs_update which
returns something for the sqlalchemy implementation, but for others as
well for future implementations.
Added 'return' for functions that were missing it.
Jim Branen [Sat, 15 Feb 2014 00:02:55 +0000 (16:02 -0800)]
HP LeftHand Backend assisted volume migrate
This patch implements volume migrate using native LeftHand APIs.
Limitations:
1. Same LeftHand backend
2. Volume cannot be attached
3. Volumes with snapshots cannot be migrated
4. Source and Destination clusters must be in the same management group
5. Volume re-type not supported
Kurt Martin [Wed, 12 Feb 2014 01:38:13 +0000 (17:38 -0800)]
Add support for qos_specs feature to 3PAR drivers
This patch includes the ability to set the qos-specs for the
existing 3PAR qos settings (maxIOP and maxBWS) in addition to
the new settingis listed below. We would prefer that the
new qos-specs associated to a volume type be used, but this
patch also supports setting these values the old way in extra-specs
for backwards compatibility.
This patch also adds two additional personas to the list of
valid personas that are now support by the 3PAR backends.
DocImpact: Implements new qos settings
minIOPS - The minimum IOPs per second
minBWS - The minimum bandwidth per second
latency - The QOS I/O target latency
priority - The QOS scheduling priority (high, normal, low)
The priority defaults to normal
Two new personas added include HPUX and WindowsServer
Chris Buccella [Fri, 14 Feb 2014 23:29:28 +0000 (23:29 +0000)]
Add x-openstack-request-id to cinder responses
x-openstack-request-id is the common header name for request ID going forward.
Currently, only glance and neutron return this header. Using the request_id
middleware is a convenient way to ensure this header is in the response. We will
also be using the middleware to generate the request ID.
The ID will be generated by the middleware and is inserted into the request
environment. The current code generates the request ID in the constructor of
RequestConext; with this change, the ID is generated beforehand and passed in to
the RequestContext constructor. Not much different here: a request ID is
generated and is available for use in the handling of the request.
On the response end, the middleware is again used, this time to attach the
x-openstack-request-id header, using the value of the generated request ID. The
current code attaches the x-compute-request-id header.
This change is a necessary step toward logging the mapping of request IDs across
OpenStack services.
This patch updates both the HP 3PAR Fibre Channel
and HP 3PAR iSCSI block storage drivers so that they
can pass the driver certification tests. We also updated
the unit tests to use mock instead of mox.
These versions of the drivers require the new 3.0.0 hp3parclient,
which can be downloaded from the pypi repository:
https://pypi.python.org/pypi/hp3parclient
The new hp3parclient requires the 3.1.3 firmware on the HP 3PAR.
The driver certification results:
Related-Bug: #1278575
Related-Bug: #1278577
Andrew Kerr [Tue, 18 Feb 2014 22:38:12 +0000 (17:38 -0500)]
Ensures NetApp iSCSI driver correctly compares int values for size
The NetApp iSCSI driver needs to verify that the new size requested
during an extend operation does not exceed the max_resize of the
lun. However, the driver was doing a >= compare against str values
of the sizes rather than the int values. This caused the incorrect
code path to be used in certain situations.
Chris Buccella [Sat, 15 Feb 2014 02:29:43 +0000 (02:29 +0000)]
Sync request_id, request_utils for cinder
This is in preparation for work being done on request ID tracing across
OpenStack services.
Per discussion in blueprint cross-service-request-id , the standard header
name for the request ID across OpenStack projects should be
x-openstack-request-id. The request_id middleware was created for just this
purpose, as oslo change Ic7967cd62e7b743343d70f751b9238339171e013 . Using the
same middleware allows for consistency across projects.
There is an additional oslo module, request_utils, introduced as
change Id085c4444fee2bb68b80738bfe77ccb0ba1908ec to allow uniform logging of
request IDs. Bring that in as well so we have it when necessary.
Zhongyue Luo [Mon, 13 Jan 2014 01:44:56 +0000 (09:44 +0800)]
Sync oslo imageutils, strutils to cinder
Changes in imageutils:
=============================== bec3a5e Implements SI/IEC unit system conversion to bytes 8b2b0b7 Use hacking import_exceptions for gettextutils._ aad179d Fixing misspelled encryption key in QemuImgInfo 12bcdb7 Remove vim header 2bd46eb Refactors byte size extraction logic
Changes in strutils:
==================== bec3a5e Implements SI/IEC unit system conversion to bytes e53fe85 strutils bool_from_string, allow specified default 8b2b0b7 Use hacking import_exceptions for gettextutils._ 84d461e Fix a bug in safe_encode where it returns a bytes object in py3 12bcdb7 Remove vim header 3970d46 Fix typos in oslo 1a2df89 Enable H302 hacking check 67bd769 python3: Fix traceback while running python3. b0c51ec Refactors to_bytes
shihanzhang [Mon, 17 Feb 2014 07:51:49 +0000 (15:51 +0800)]
Fix invalid facilities documented in rootwrap.conf
The values user0 and user1 do not map to valid facility values.
local1, etc. Using user0 results in a pri value that does not map
back to a facility of the same name in syslog.
RFC5424 suggest values values of local0 through local7. Setting
syslog_log_facility to one of those values results in a message with a
priority that can be mapped back to the original string value.
This fix adjusts the comment in rootwrap.conf to suggest the local
prefix instead of the user prefix.
This commit adds a new versioned api to the backup driver base
class which all backup driver implementations should use in order
to support backing up volume metadata as well as data. The general
rule here is that we backup all metadata from a set of db tables
and can then be selective about what we restore.
As part of this commit, Ceph backup driver implements the new api
to backup volume metadata (including glance metadata) thus
supporting restoring volumes as bootable.
It is expected that the other backup driver implementations will
follow suit and adopt this approach.