[node-patches] Change in ovirt-node[master]: Fix [Error 2]No such file or directory issue when setting NF...

hadong0720 at gmail.com hadong0720 at gmail.com
Mon Aug 19 08:24:57 UTC 2013


hadong has uploaded a new change for review.

Change subject: Fix [Error 2]No such file or directory issue when setting NFSv4 Domain
......................................................................

Fix [Error 2]No such file or directory issue when setting NFSv4 Domain

Change-Id: I6dded758e8dc6a61c3af1ec4445ff276c61fa5eb
Bug-Url: https://bugzilla.redhat.com/show_bug.cgi?id=998392
Signed-off-by: hadong <hadong0720 at gmail.com>
---
M src/ovirt/node/utils/storage.py
1 file changed, 9 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/78/18278/1

diff --git a/src/ovirt/node/utils/storage.py b/src/ovirt/node/utils/storage.py
index 973ec17..c8b9dcc 100644
--- a/src/ovirt/node/utils/storage.py
+++ b/src/ovirt/node/utils/storage.py
@@ -23,6 +23,7 @@
 from ovirt.node.utils import process
 from ovirt.node.utils.fs import File
 import os
+import shlex
 
 
 class iSCSI(base.Base):
@@ -50,16 +51,18 @@
 
     def __set_domain(self, domain):
         current_domain = self.__get_domain()
+        cmd = None
         if current_domain.startswith("#"):
             current_domain = ("#Domain = %s" %
                               current_domain.replace("# ", ""))
-            process.check_call("sed -i 's/%s/Domain = %s/g' %s" %
-                               (current_domain, domain,
-                                self.configfilename))
+            cmd = shlex.split("sed -i 's/%s/Domain = %s/g' %s" %
+                              (current_domain, domain,
+                               self.configfilename))
         else:
-            process.check_call("sed -i '/^Domain/ s/%s/%s/g' %s" %
-                               (current_domain, domain,
-                                self.configfilename))
+            cmd = shlex.split("sed -i '/^Domain/ s/%s/%s/g' %s" %
+                              (current_domain, domain,
+                               self.configfilename))
+        process.check_call(cmd)
 
     def __get_domain(self):
         domain = None


-- 
To view, visit http://gerrit.ovirt.org/18278
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I6dded758e8dc6a61c3af1ec4445ff276c61fa5eb
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hadong <hadong0720 at gmail.com>



More information about the node-patches mailing list