]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Update _resize_volume_file() to support appropriate permissions
authorSasikanth <sasikanth.eda@in.ibm.com>
Mon, 23 Jun 2014 14:10:12 +0000 (19:40 +0530)
committerSasikanth <sasikanth.eda@in.ibm.com>
Mon, 23 Jun 2014 14:14:06 +0000 (19:44 +0530)
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

cinder/volume/drivers/ibm/ibmnas.py

index 56f71c96954b21bf32096a99e309c853c94f90c4..652d5bd2ac16cb0bcc469e08d5e94e3ccef923ef 100644 (file)
@@ -182,7 +182,7 @@ class IBMNAS_NFSDriver(nfs.NfsDriver, san.SanDriver):
         """Resize the image file on share to new size."""
         LOG.info(_('Resizing file to %sG'), new_size)
         try:
-            image_utils.resize_image(path, new_size)
+            image_utils.resize_image(path, new_size, run_as_root=True)
         except processutils.ProcessExecutionError as e:
             msg = (_("Failed to resize volume "
                      "%(volume_id)s, error: %(error)s") %