Bump version to 2012.2.4

Set version to 2012.2.4, but with final=False

Change-Id: I9dab1dc62e41cdb4143a3c8083e65c4b13a22eb4
Check for non-default volume name template.

The iscsi delete methods in iscsi.py had hard-coded volume names
'volume-%s'.

If a user configured volume_name_template to
something other than default the result is failure to remove
the iscsi_target.

volume create worked appropriately and created the correct name
in the DB, so the persistence files were the only thing affected
or named incorrectly.

Fixes bug: 1101071

Change-Id: Id5575874b2cebd9b3509d739cb92abf06c503c4e
(cherry picked from commit f02c575b4b28b69cade6c1c06dd772c62754fc9c)
Fix typo in cinder/db/api.py

The api method quota_destroy_all_by_project() calls the implementation
quota_get_all_by_project()

Change-Id: I11927e1fd29c6248ce755dfd236bf0f9adf39d94
Fixes: bug #1108766
(cherry picked from commit b79e1f485c85cbb16280adc8d590886e25694c87)
Fix error for extra specs update with empty body.

Fixes: bug #1090320
Change-Id: Ia2792d477f7670ecb2eb0c9c10dcbf1cf5b2389e
(cherry picked from commit fee9b2ad61bb69d356e1280f0556afd808c5f128)
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.

Fixes LP Bug #1100282 for Folsom.

Change-Id: Ie8ae7a6e12fbf51de406d10ca21072140374abf5
Merge "Add a safe_minidom_parse_string function." into stable/folsom
Only use iscsi_helper config option if using ISCSIDriver

_get_iscsi_properties checks for iscsi_helper == 'tgtadm', but
this is run for drivers other than ISCSIDriver.  This means that
when using the Nexenta driver, the target_lun is changed when it
shouldn't be.

Only change target_lun based on iscsi_helper if using ISCSIDriver.

Change-Id: I104c1b45f37917ea9f41855c17405f63c4ebcc39
Merge "Check for non-default volume name template." into stable/folsom
Merge "Fix error for extra specs update with empty body." into stable/folsom
Raise NotImplementedError for NFS snapshot operations

Since NfsDriver inherits snapshot related methods from VolumeDriver,
it will try to run LVM commands for snapshot calls, when it should
just report that these are not supported for NFS.

Fixes LP: #1097266

Change-Id: Ia438c88d3c8c0a43b512bba9b273e1305f6d0dd0
Merge "Only use iscsi_helper config option if using ISCSIDriver" into stable/folsom
Fix inability to delete volumes in error state for NetApp driver

While using NetApp 7-mode storage box to create volumes, if the volume
is not created on the storage box (possibly due to wrong/missing
options in cinder.conf file), the volume goes in error state, and when
one tries to delete the volume, an exception was raised which made
the volume go in error_deleting state, which is unrecoverable. This
commit quiesces that exception, resulting in successful removal of the
volume entry from the volume table.

Fixes bug 1090167

Change-Id: I0a25b71ad03e7f7acf58df3952e074ff164b82ff
Backport paramiko 1.8.0 requirement to Folsom.

Require paramiko >= 1.8.0

There is a well-known bug in the Paramiko SSH library that causes
these Exceptions:
SSHException: Error connecting via ssh: PID check failed. RNG must be
re-initialized after fork(). Hint: Try Random.atfork()

This bug has been fixed in Paramiko, and therefore we should require
the newer version for Cinder drivers that use Paramiko to function
properly.

Change-Id: Ia14b7b72393e2a2482ebde418b5477934779bf13
Fixes: bug 1150720
Enable direct testing with nosetests

This is the minimal backport of
https://review.openstack.org/#/c/21685/
which makes it possible to run the functional
tests without also invoking run_tests.sh. The
extra call to monkey_patch is not causing any
harm when used via run_tests.sh

Change-Id: If0d2cb94f956380a2c35414b6e8df6db76a669c6
Force deletes using tgt to workaround bug 1159948

Tgt has a bug where it can have multiple copies of an initiator
if there has been a reconnect.

See https://bugs.launchpad.net/cinder/+bug/1159948

Change-Id: I9a1b6757eb780efbaa1403016e50de7c0e45d720
(cherry picked from commit b84218633ab5417adf94c568eb54243f4074ab11)
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.

Fixes bug: 1084273

Change-Id: I0ef8bf4356047c385bef703b8dce7d5edf537bf6
(cherry picked from commit a2830e5417539980249e3ab12d8bf9538d8956c4)
Merge "Fix inability to delete volumes in error state for NetApp driver" into stable/folsom
NetApp[Backport]: Clean up QTree when deleting volume

Previously, deleting a Cinder volume would leave a QTree on NetApp
storage box. This commit fixes the issue.

Fixes bug 1099414

Change-Id: I95f1d6b802f4abfad421d34f1c000b75fb72c41e
NetApp[backport]: Fix for snapshot not deleted in error state.

This fix enables cleaning of volumes/snapshots
in error state by allowing them to delete.
It will allow the delete call to be
successful if snapshot/volume are in
error state. This also fixes the bug
raised recently with  number 1145409 which seems
to be duplicate of 1143661.

bug 1143661
bug 1145409

Change-Id: I38bc13e676404f96db54b12edfa56680489e893e
Sync rpc changes from oslo stable/folsom

Contains code from the following oslo commits:

9f938720 Update common code to support pep 1.3.
7e36792c kombu's fanout_cast_to_server was calling wrong method
 - Fixes bug 1074113
c3ec615c LOG.exception() should only be used in exception handler
17c5188c Use pep8 v1.3.3
d147d9f2 Fix QPID reconnect issues
 - Fixes bug 1073999

Change-Id: Ia4504cb4d8f2108b743efc4639450254d6e3fb8e