From: Sasikanth Date: Mon, 23 Jun 2014 14:10:12 +0000 (+0530) Subject: Update _resize_volume_file() to support appropriate permissions X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=ea56cf255ac956d23eba5bb4f6e7312b944eb5fb;p=openstack-build%2Fcinder-build.git 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 --- diff --git a/cinder/volume/drivers/ibm/ibmnas.py b/cinder/volume/drivers/ibm/ibmnas.py index 56f71c969..652d5bd2a 100644 --- a/cinder/volume/drivers/ibm/ibmnas.py +++ b/cinder/volume/drivers/ibm/ibmnas.py @@ -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") %