From 1212f66b188bbe40ac7219908eb47af26ebf2edc Mon Sep 17 00:00:00 2001 From: chaochin Date: Mon, 21 Oct 2013 05:36:32 -0500 Subject: [PATCH] Let GPFS driver to rename snapshot with root permission Deleting GPFS volume snapshot operation fails, because cinder volume is not running with root permission. Change-Id: Id00357030da171fddbc6abf82603ceabe4db73ff Closes-Bug: #1242549 --- cinder/volume/drivers/gpfs.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cinder/volume/drivers/gpfs.py b/cinder/volume/drivers/gpfs.py index f7f3ddd8e..a2b01c387 100644 --- a/cinder/volume/drivers/gpfs.py +++ b/cinder/volume/drivers/gpfs.py @@ -397,7 +397,7 @@ class GPFSDriver(driver.VolumeDriver): # snapshots will also be deleted. snapshot_path = self.local_path(snapshot) snapshot_ts_path = '%s.ts' % snapshot_path - os.rename(snapshot_path, snapshot_ts_path) + self._execute('mv', snapshot_path, snapshot_ts_path, run_as_root=True) self._execute('rm', '-f', snapshot_ts_path, check_exit_code=False, run_as_root=True) -- 2.45.2