From: Dirk Mueller Date: Mon, 16 Sep 2013 11:39:20 +0000 (+0200) Subject: Pass down root_helper in more cases X-Git-Url: https://review.fuel-infra.org/gitweb?a=commitdiff_plain;h=8e73247d7ecfbd6bdb924712ba7fe97b85eb6b47;p=openstack-build%2Fcinder-build.git Pass down root_helper in more cases Change-Id: I3e49764256bb001ccc071c846cd70e4345df017d Fixes: Bug LP #1226010 --- diff --git a/cinder/brick/iscsi/iscsi.py b/cinder/brick/iscsi/iscsi.py index d1d7fa401..18a5a3907 100644 --- a/cinder/brick/iscsi/iscsi.py +++ b/cinder/brick/iscsi/iscsi.py @@ -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):