NetApp fix free space as zero during 1st vol stats update

NetApp clustered ontap drivers report space as zero
till first 60 seconds of driver start. This is causing
discomfort for some performance sensitive deployements.
This was due to async nature of the NetApp stats collection job.
Job is changed to sync at driver start to improve customer
experience.

Change-Id: I7d5cbf590897a0d328ece3a60516c92c0ad0ee7f
Closes-bug: #1253660
(cherry picked from commit 585f34ff7798ad271121d432e0cae8820bc54389)
GlusterFS: Ensure Cinder can write to shares

Ensure the Cinder user can write to the GlusterFS share.  This
is required for snapshot functionality, and means the admin
does not have to set this permission manually.

Conflicts:
	cinder/tests/test_glusterfs.py

Closes-Bug: #1236966
Change-Id: I4a9ea40df9681ca6931ad6b390aa21b09d6cfec9
(cherry picked from commit 371fa540600b20b97eae389e1f976145866cadae)
delete.start/delete.end notification for hostless

Third party GUIs may rely on notifications to track the
progress of volume creation and deletion.  In the case that
a volume is being deleted after a failed attempt to create
(the volume is listed in the database but is not actually
resident in a backing store) the path that is taken in
volume.api.delete() makes no notifications of deletion
occurring.

This patch adds a volume_utils.notify_about_volume_usage
call to the beginning and end of the delete with a
delete.start and delete.end respectively.  The notifications
serve as triggers for GUIs to refresh the state of the
volume.  This change makes the hostless delete path's
functionality more consistent with the other paths through
the delete code.

Change-Id: I091b9d277834b341105569d41a48ef5c1fc105ce
Closes-Bug: 1257053
(cherry picked from commit a347b99c261dc1c761a8bc51c2aee99d20161ca6)
GlusterFS: Complete snapshot_delete when info doesn't exist

The snapshot_delete operation will fail if the snapshot info file
doesn't contain a record for the snapshot, or does not exist.
This happens in cases such as when snapshot_create fails to commit
anything to disk.

The driver should allow the manager to delete the snapshot
in this case, as there is no action required for the driver
to delete anything.

Closes-Bug: #1252864

(cherry picked from commit d8a11168c908fe6c6a07fbb30a5bc88a6df6e939)

Change-Id: I8686a1be09dbb7984072538bff6c026bb84eeb52
GlusterFS: Use correct base argument when deleting attached snaps

When deleting the most recent snapshot, the 'file_to_merge' field
which translates into the base= field for libvirt's blockRebase
call in Nova must be set depending on whether other snapshots exist.

If there are no other snapshots, base = None, which results in
libvirt clearing the qcow2 backing file pointer for the active
disk image.

If there are other snapshots, pass the parent of the file being
deleted as the new base file.  The snapshot info pointer for the
prior base file must also be updated in this case.

Closes-Bug: #1262880

(cherry picked from commit 186221779a92002ff9fa13c254710c0abb3803be)
Conflicts:
	cinder/tests/test_glusterfs.py

Change-Id: If7bc8259b031d0406346caafb8f688e65a38dba6
NFS/GlusterFS: Skip incorrectly formatted shares

Shares should always be of the form address:/volume.  If they are
not (i.e., are missing the '/'), then skip them and issue a warning
message.  This will prevent us from sending incorrect connection_info
dicts to Nova.

Closes-Bug: #1267253

Change-Id: Ic40cd0cdc862b44b0a7d3e5b1d7c4fee8ea1b28d
(cherry picked from commit 21ebf2898e2f5fc8127b7a3bdc9743c49933f952)
Fixed a problem in iSCSI multipath

Multipathing during copy image to volume and copy volume to image
operations doesn't work properly if there are different targets
associated with different portals for a mulitpath device.

Change-Id: I65c93f3788020c944db0d3a55063a6415554ff11
Closes-Bug: #1266048
(cherry picked from commit 3e4f554f614c8cb6d5f014c72f3c635184a4dec2)
Merge "Fixed a problem in iSCSI multipath" into stable/havana
Merge "NetApp fix free space as zero during 1st vol stats update" into stable/havana
Merge changes I8686a1be,I4a9ea40d into stable/havana

* changes:
  GlusterFS: Complete snapshot_delete when info doesn't exist
  GlusterFS: Ensure Cinder can write to shares
Merge "GlusterFS: Use correct base argument when deleting attached snaps" into stable/havana
Move driver initialization check into the method

Volumes and backups managers' methods are decorated with
`require_initialized_driver` which checks whether the driver has been
initialized or not. The decorator fails with a `DriverNotInitialized`
exception if the driver hasn't been initialized.

This early failure leaves volumes and backups in a wrong status which is
not just confusing for the user but it also makes it difficult to do
anything with the resources after they've been left in a 'bogus' status.

For example, when a volume creation is requested, the volume is first
created in the database and its status is set to 'creating'. Then the
scheduler will pick an available volume node and send the task to it. If
the driver has not been initialized, the volume status will be left as
'creating' instead of 'error'.

This patch fixes that issue by moving the driver initialization check
into the various manager's methods. In some cases this check is done at
the very beginning of the method, in some others - either to avoid code
duplication or because the lines above the check made sense to be
executed first - this check is done later in the method.

NOTE: Regardless the conflicts noted below, this patch should be
backported. The issue it fixes is a source of several bug reports, user
frustration and confusion. The conflicts were related to some additions
in the master branch. Resolving the conflicts was pretty
straightforward.

Conflicts:
	cinder/tests/test_volume.py
	cinder/utils.py
	cinder/volume/flows/create_volume/__init__.py
	cinder/volume/manager.py

Closes-bug: #1242942
(cherry picked from commit 5be4620ae5bb50c8436de0e11269c85a095ed40b)
Change-Id: I2610be6ba1aa7df417f1a1f7bb27af30273e4814
Merge "delete.start/delete.end notification for hostless" into stable/havana
Merge "Move driver initialization check into the method" into stable/havana
Bump stable/havana next version to 2013.2.3

Change-Id: Ia5b940faf01df6cae58df1f4b4f5e8fa2f3f078a