Browse Source

HPCC-21249 Correct host.py to exactly match the localhost IP

Signed-off-by: Godson Fortil <FortGo01@risk.regn.net>
Godson Fortil 6 years ago
parent
commit
9c28115fa9
2 changed files with 6 additions and 4 deletions
  1. 4 3
      initfiles/sbin/cluster_script.py
  2. 2 1
      initfiles/sbin/hpcc/cluster/host.py

+ 4 - 3
initfiles/sbin/cluster_script.py

@@ -111,7 +111,7 @@ class ScriptExecution(object):
 
         if len(self.hosts) == 0:
             print("Could not get any host. At least one host is required.")
-            print("Reference following log for more information: ")
+            print("Refer to the following log file for more information: ")
             print(self.log_file)
             exit(0)
 
@@ -216,11 +216,12 @@ class ScriptExecution(object):
         script_name = os.path.basename(self.script_file)
         if not no_error_found:
             print("\n\n\033[91mError found during " + script_name + " execution.\033[0m")
-            print("Reference following log for more information: ")
+            print("Refer to the following log file for more information: ")
             print(self.log_file)
         else:
             print("\n\n" + script_name + " run successfully on all hosts in the cluster")
-
+            print("Refer to the following log file for more information: ")
+            print(self.log_file)
         print("\n")
 
         return no_error_found

+ 2 - 1
initfiles/sbin/hpcc/cluster/host.py

@@ -167,7 +167,8 @@ class Host(object):
                 return out_hosts
 
             for host in out_hosts:
-                m = re.search(host.ip, inet_out)
+                str = r"\s" + re.escape(host.ip) + r"\s"
+                m = re.search(str, inet_out)
                 if not m:
                     out_hosts_2.append(host)