]> review.fuel-infra Code Review - openstack-build/cinder-build.git/commitdiff
Pass down root_helper in more cases
authorDirk Mueller <dirk@dmllr.de>
Mon, 16 Sep 2013 11:39:20 +0000 (13:39 +0200)
committerDirk Mueller <dirk@dmllr.de>
Mon, 16 Sep 2013 19:20:33 +0000 (21:20 +0200)
Change-Id: I3e49764256bb001ccc071c846cd70e4345df017d
Fixes: Bug LP #1226010
cinder/brick/iscsi/iscsi.py

index d1d7fa4010931a3d32d88b5c079dbb37430fdcb5..18a5a39071f6e285710ca0e5cad684bc8ffd3c19 100644 (file)
@@ -256,12 +256,14 @@ class IetAdm(TargetAdmin):
         orig_uid = os.stat(path).st_uid
 
         if orig_uid != owner_uid:
-            putils.execute('chown', owner_uid, path, run_as_root=True)
+            putils.execute('chown', owner_uid, path,
+                           root_helper=self._root_helper, run_as_root=True)
         try:
             yield
         finally:
             if orig_uid != owner_uid:
-                putils.execute('chown', orig_uid, path, run_as_root=True)
+                putils.execute('chown', orig_uid, path,
+                               root_helper=self._root_helper, run_as_root=True)
 
     def create_iscsi_target(self, name, tid, lun, path,
                             chap_auth=None, **kwargs):