glusterfs: Honor mount options when restarting cinder service

When restarting cinder service (cinder-volume specifically),
ensure that the gluster mounts are unmounted and remounted so
that any new mount options added to the shares config file
is taken effect, post service restart.

Change-Id: I9fe3442cd4899770b4c9ea4a73a7fe62967f2c64
GlusterFS: Various unit test improvements

Fixed bug that "_ensure_share_writable" was not mocked and therefore
"GlusterfsException" was thrown earlier than expected with an unexpected
error message.

To better guard against situations like this, I've added a helper method
"assertRaisesAndMessageMatches" to test for the thrown exception AND its
message.

Added "mox.VerifyAll()" where it was missing and cleaned up unused
mocks.

Fixed test for "create_volume_from_snapshot" (which actually tested
"create_cloned_volume").

Added tests for driver function "copy_volume_to_image".

Overall, code coverage for volume/drivers/glusterfs.py improved from 74%
to 82%.

Change-Id: I872eb477351c5406d07bbf5b748ebde2d878120a
test_storwize_vdisk_copy_ops fails if green thread context switch

There is loopingcall(green thread)will cause _rm_vdisk_copy_op() run
twice.On the second time, the exception KeyError is not caught.

Closes-Bug: #1302670

Change-Id: I788f07c33f76693a13f0d581e687a32c6736a394
Update _resize_volume_file() to support appropriate permissions

ibmnas driver inherits _set_rw_permissions_for_all() from nfs.py
which sets 666 to the volumes. Changes are expected to be made in
nfs.py such that it sets 600 or 660 permissions, by doing so
ibmnas driver fails performing the operation _resize_volume_file()

Adding run_as_root in resize_volume operation.

Change-Id: Iecaf111f96f93b4e24bd81edd6aa82829113b4bb
Closes-Bug: #1333252
Merge "Update _resize_volume_file() to support appropriate permissions"
Merge "GlusterFS: Various unit test improvements"
Merge "glusterfs: Honor mount options when restarting cinder service"
Merge "test_storwize_vdisk_copy_ops fails if green thread context switch"