From ea56cf255ac956d23eba5bb4f6e7312b944eb5fb Mon Sep 17 00:00:00 2001 From: Sasikanth Date: Mon, 23 Jun 2014 19:40:12 +0530 Subject: [PATCH] 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 --- cinder/volume/drivers/ibm/ibmnas.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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") % -- 2.45.2