The 3PAR drivers weren't updated when the multi backend
patch landed on G3 day. This patch implements the new config
mechanism to accessing FLAGS, so that it works when an admin
has multiple drivers active.
Xing Yang [Sun, 3 Mar 2013 05:06:29 +0000 (00:06 -0500)]
Fixed copy image to volume and clone volume.
This patch fixed the following issues in EMC driver found during G3 testing:
1. VNX array has two storage processors and it is doing load balancing when
attaching a LUN to a host. The storage processor used to attach a LUN to a
host is different from the one discovered by the driver sometimes, causing
Copy Image to Volume to fail.
2. The clone relationship is removed after a volume is successfully
cloned. However, this happens too soon sometimes before the cloned volume
is fully synced with the source volume. The fix is to wait until it is
fully synced.
Fei Long Wang [Sun, 3 Mar 2013 08:48:22 +0000 (16:48 +0800)]
Fixes issues found in /os-hosts API
There are some issues found in Cinder /os-hosts API:
1) Bracket in the wrong spot in Cinder HostController show method
There is an erroneous bracket on the following line in the show method
that should be at the end of the response:
'total_volume_gb': str(sum)},
2) XML Attributes Missing for List/Index method in Cinder HostController
The HostIndexTemplate class specifies mapping for "host" and "topic"
attributes rather than any of the ones that are actually returned from
the index method.
3) XML Serialization is commented for Cinder HostController show method
Stephen Mulcahy [Mon, 4 Mar 2013 16:10:34 +0000 (16:10 +0000)]
swift backup service checks version during restore
Modified swift backup service to check metadata version during restore
and raise an error if the backup version isn't a version that the
service knows how to handle. The versions which can be handled are
described in a dictionary mapping versions to methods which can handle
them. This will facilitate graceful handling of newer backup formats by
the swift backup service when we introduce changes.
John Griffith [Thu, 28 Feb 2013 18:34:07 +0000 (18:34 +0000)]
Add some useful log to filter scheduler.
When the filter scheduler is unable to find a suitable host to
deploy a volume on it simply logged a warning "not hosts found".
This isn't very helpful, so this patch adds some logging info as
far as why no valid host was available. This just focuses on the
capacity filtering as that's where I've commonly seen this issue
particularly in tempest runs.
Also noticed that the get status was checking for "if Not capacity",
but this is wrong because free capacity==0 would be interpretted as
failing to get capacity. Change this to "if is None".
John Griffith [Thu, 28 Feb 2013 19:01:39 +0000 (19:01 +0000)]
Elevate context for delete volume with no host.
So in the case of a volume that is placed in error state
on create and never actually deployed, the cinder.volume.api delete
call does a short cut call to db.destroy_volume which is fine because
all we have is a DB entry (scheduler never deployed the volume).
Unfortunately, this requires admin context, so just add an elevate
context to the db.destroy_volume call.
Stephen Mulcahy [Thu, 28 Feb 2013 12:11:39 +0000 (12:11 +0000)]
Improved fail_reason for cinder-backup swift connection errors
Modified swift backup service to catch socket errors when talking to
swift and raise a specific SwiftConnectionFailed exception in these
cases. This allows us to provide a more readable error message
detailing the problem connecting to swift to the end user when they
view the backup. Also reduced the default number of swift retries
so devstack environments fail faster - production environments can
tune these in cinder.conf.
john-griffith [Fri, 22 Feb 2013 05:06:26 +0000 (22:06 -0700)]
Convert from using FLAGS directly in SF driver.
In order for the Filter scheduler to be used to it's
full advantage Cinder drivers need to move away from
using FLAGS directly and switch to appending their
specific options to self.configuration.
John Griffith [Wed, 27 Feb 2013 20:49:53 +0000 (20:49 +0000)]
Improve logging for volume operations via manager
A large percentage of the logging information was
being done using debug. This change moves some
of the logging information to be info level and
also tries to add some consistency in terms of
the general create/delete operations.
This includes moving logging for the basic operations
into the manager and omitting the repetive messages from
the drivers.
Stephen Mulcahy [Wed, 27 Feb 2013 09:15:57 +0000 (09:15 +0000)]
Changed to INFO level logging for main cinder-backup operations
Changed create backup, restore backup and delete backup operations to
log key operations at INFO level instead of DEBUG level (so environments
like devstack see main operations by default).
Rushi Agrawal [Tue, 26 Feb 2013 12:15:57 +0000 (17:45 +0530)]
NetApp: Clean up lock file left behind by unit tests
The synchronization decorator added to the NetAppISCSIDriver class
creates a lock file named cinder/openstack/cinder-netapp_dfm
during the unit tests. This commit cleans it up.
Rushi Agrawal [Wed, 27 Feb 2013 11:37:41 +0000 (06:37 -0500)]
NetApp: Fix race condition in 7-mode iSCSI driver with DFM.
A race condition was discovered in the driver while creating
or deleting multiple volumes in a very short interval of time
(can be reproduced by making successive API calls to Cinder).
This fix decorates the methods responsible for race condition
with a synchronized() decorator. The problem was with the
management software: DFM, and in principle, there should not
be two processes trying to modify the DFM dataset object at
the same time. This patch prevents from such a possibility.
copy_volume_to_image was always using the glance plugin to do the
upload, and was ignoring the users request. Thus the image was always
uploaded as vhd/ovf. This patch is using the image utils to fix the
generic case.
Stephen Mulcahy [Thu, 21 Feb 2013 11:10:34 +0000 (11:10 +0000)]
Fixed cinder-backup start errors seen with devstack
Changes:
- Added cinder-backup to scripts in setup.py
- Added service_name to backup manager __init__
- Switched backup manager to using oslo.config
- Modified cinder-backup to use ProcessLauncher
Tom Fifield [Thu, 21 Feb 2013 10:10:16 +0000 (21:10 +1100)]
Cinder devref doc cleanups
Way back when Cinder was inagurated as a separate project, the docs
directory from Nova was used as a seed for the one in the Cinder repo
This patch is simply cleaning out images and files which have no
relation to Cinder at all, and are at best extremely outdated when
applied to Nova.
Aside from the deletions which are mainly images, and files related
to the configuration of CloudPipe, there is one modification to
conf.py which simply removes a reference to a vmware doc that no
longer exists.
Some bugs were introduced in https://review.openstack.org/#/c/20514/
this patch fixes the discovered errors. It also removes volume_id
parameters from error messages.
Rushi Agrawal [Mon, 21 Jan 2013 16:01:48 +0000 (21:31 +0530)]
Fix stale volume list for NetApp 7-mode ISCSI driver
While contacting filer through DFM in order to create volume from
snapshot, the operation may fail with an error "No entry in LUN
table for volume". Although the LUN representing the volume was
created on the filer, the LUN list was not refreshed in time, which
caused an error. This fix handles this situation for creating
volume from snapshots.
Note that this fix adds the requirement that the driver host and
DFM machine should be reasonably time-synchronized.
Xing Yang [Wed, 20 Feb 2013 18:34:48 +0000 (13:34 -0500)]
Moved cinder_emc_config.xml.sample to emc folder
Vendor unique driver files should not be placed in /cinder/etc/cinder, but
should stay with the vendors driver. Moved cinder_emc_config.xml.sample
to cinder/volume/drivers/emc folder.
Xing Yang [Wed, 20 Feb 2013 18:22:59 +0000 (13:22 -0500)]
Uses tempdir module to create/delete xml file
The emc test in cinder is leaving behind its test generated
cinder_emc_config.xml file in /cinder/tests directory. This
fix uses tempdir module to create the xml file and delete it
when tearDown is called.
Eric Harney [Tue, 5 Feb 2013 23:02:46 +0000 (18:02 -0500)]
Add LIO configuration for iSCSI initiators
LIO requires iSCSI initiator IQNs to be specified in an ACL to be
allowed to connect to the target. Currently this is only done for
the IQN of the initiator on the cinder-volume node.
This patch allows setting lio_initiator_iqns in cinder.conf to
provide access to other nodes. (Remote Nova compute nodes.)
Josh Durgin [Wed, 20 Feb 2013 01:11:41 +0000 (17:11 -0800)]
rbd: implement get_volume_stats()
Report raw capacity because replication level may change, and the
cluster may be used by more than one service. If the command fails for
any reason, return unknown capacity.
John Griffith [Wed, 20 Feb 2013 04:34:01 +0000 (21:34 -0700)]
Handle maxclonepervolume/node limits in SF driver.
The SolidFire cluster has a max simultaneous clones per volume and node
limt that we weren't accounting for. Add some logic to detect this situation
and loop until enough simultaneous clones are completed to allow processing
of the next one in line.
Mark McLoughlin [Sun, 10 Feb 2013 23:55:24 +0000 (18:55 -0500)]
Use oslo-config-2013.1b3
The cfg API is now available via the oslo-config library, so switch to
it and remove the copied-and-pasted version.
Add the 2013.1b3 tarball to tools/pip-requires - this will be changed
to 'oslo-config>=2013.1' when oslo-config is published to pypi. This
will happen in time for grizzly final.
Add dependency_links to setup.py so that oslo-config can be installed
from the tarball URL specified in pip-requires.
Remove the 'deps = pep8==1.3.3' from tox.ini as it means all the other
deps get installed with easy_install which can't install oslo-config
from the URL.
Retain dummy cfg.py file until keystoneclient middleware has been
updated (I18c450174277c8e2d15ed93879da6cd92074c27a).
Kurt Martin [Wed, 13 Feb 2013 21:55:43 +0000 (13:55 -0800)]
HP 3PAR Fibre Channel Driver and iSCSI Updates
This is the initial FC driver for the HP 3PAR array, along with some
3PAR iSCSI driver cleanup and changes in the HP 3PAR common class.
Summary of changes:
* Initial FC Driver for the Grizzly release (depends on the FC base class
and nova FC changes https://review.openstack.org/#/c/19992/ &
https://review.openstack.org/#/c/20003/)
* Updates to iSCSI Driver include volume type and create clone volume support
as well as general cleanup(comments, copyright, minor bug fixes).
* The tests have been updated to add FC test and the file was renamed
to reflect both FC and iSCSI 3PAR tests.
* Volume types added for the Grizzly release include cpg, snap_cpg, persona
and provisioning(thin vs. full)
Kurt Martin [Wed, 13 Feb 2013 19:30:17 +0000 (11:30 -0800)]
Fibre Channel base class for Cinder drivers
This is the base class, FibreChannelDriver, for all fibre channel
drivers to extend. Currently, it has only initialize_connection
with comments, but this will be a place to put common functions
similar to the iSCSI base class.
This patch depends on the following nova and devstack changes
to be functional(both still in the review process but approved
for Grizzly):
https://review.openstack.org/#/c/19992/
https://review.openstack.org/#/c/20003/
This patch does not support copy_image_to_volume and
copy_volume_to_image in the Grizzly release. We'll revisit
this in Havana and add that support.
Dan Prince [Mon, 4 Feb 2013 02:54:33 +0000 (21:54 -0500)]
Add a safe_minidom_parse_string function.
Adds a new utils.safe_minidom_parse_string function and
updates external API facing Cinder modules to use it.
This ensures we have safe defaults on our incoming API XML parsing.
Internally safe_minidom_parse_string uses a ProtectedExpatParser
class to disable DTDs and entities from being parsed when using
minidom.
Scality SOFS is a network filesystem mounted with FUSE, with most
options given in a configuration file. Given a mount point and a SOFS
configuration file as driver options, the Scality volume driver mounts
SOFS, and then creates, accesses and deletes volumes as regular
(sparse) files on SOFS.
During creating a volume from an image, the volume status changed
from creating to active, skipping the download phase. This bug was most
likely introduced during:
https://review.openstack.org/20514
This patch fixes the issue by change image_location back to image_id at
the correct place.
This patch also fixes an error in the exception handling, and the update
of the volume status after creation.
XenAPINFS did not implement the get_volume_stats method, thus
CapacityFilter fitered out the host, thus no volume was scheduled. This
fix is working around this problem quickly, by reporting an 'unknown'
capacity.