From 8e73247d7ecfbd6bdb924712ba7fe97b85eb6b47 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Mon, 16 Sep 2013 13:39:20 +0200 Subject: [PATCH] Pass down root_helper in more cases Change-Id: I3e49764256bb001ccc071c846cd70e4345df017d Fixes: Bug LP #1226010 --- cinder/brick/iscsi/iscsi.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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): -- 2.45.2