From: Lucia Guevgeozian Odizzio Date: Fri, 19 Sep 2014 12:36:38 +0000 (+0200) Subject: Fix bug strict host checking X-Git-Tag: nepi-3.2.0~78 X-Git-Url: http://git.onelab.eu/?p=nepi.git;a=commitdiff_plain;h=5a00a5d04a1d1ecd4cafd5582f7747f84985cd3f Fix bug strict host checking --- diff --git a/src/nepi/resources/linux/node.py b/src/nepi/resources/linux/node.py index 72af9780..232a9df5 100644 --- a/src/nepi/resources/linux/node.py +++ b/src/nepi/resources/linux/node.py @@ -553,7 +553,8 @@ class LinuxNode(ResourceManager): stdout = 'stdout', stderr = 'stderr', sudo = False, - tty = False): + tty = False, + strict_host_checking = False): self.debug("Running command '%s'" % command) @@ -584,7 +585,8 @@ class LinuxNode(ResourceManager): agent = True, identity = self.get("identity"), server_key = self.get("serverKey"), - tty = tty + tty = tty, + strict_host_checking = strict_host_checking ) return (out, err), proc @@ -603,7 +605,8 @@ class LinuxNode(ResourceManager): gw = self.get("gateway"), agent = True, identity = self.get("identity"), - server_key = self.get("serverKey") + server_key = self.get("serverKey"), + strict_host_checking = False ) return pidtuple @@ -622,7 +625,8 @@ class LinuxNode(ResourceManager): gw = self.get("gateway"), agent = True, identity = self.get("identity"), - server_key = self.get("serverKey") + server_key = self.get("serverKey"), + strict_host_checking = False ) return status @@ -647,7 +651,8 @@ class LinuxNode(ResourceManager): agent = True, sudo = sudo, identity = self.get("identity"), - server_key = self.get("serverKey") + server_key = self.get("serverKey"), + strict_host_checking = False ) return (out, err), proc diff --git a/src/nepi/util/sshfuncs.py b/src/nepi/util/sshfuncs.py index b06abdbd..451a7b4f 100644 --- a/src/nepi/util/sshfuncs.py +++ b/src/nepi/util/sshfuncs.py @@ -404,7 +404,8 @@ def rspawn(command, pidfile, agent = None, identity = None, server_key = None, - tty = False): + tty = False, + strict_host_checking = True): """ Spawn a remote command such that it will continue working asynchronously in background. @@ -479,7 +480,8 @@ def rspawn(command, pidfile, agent = agent, identity = identity, server_key = server_key, - tty = tty , + tty = tty, + strict_host_checking = strict_host_checking , ) if proc.wait(): @@ -496,7 +498,8 @@ def rgetpid(pidfile, gw = None, agent = None, identity = None, - server_key = None): + server_key = None, + strict_host_checking = True): """ Returns the pid and ppid of a process from a remote file where the information was stored. @@ -524,7 +527,8 @@ def rgetpid(pidfile, gw = gw, agent = agent, identity = identity, - server_key = server_key + server_key = server_key, + strict_host_checking = strict_host_checking ) if proc.wait(): @@ -546,7 +550,8 @@ def rstatus(pid, ppid, gw = None, agent = None, identity = None, - server_key = None): + server_key = None, + strict_host_checking = True): """ Returns a code representing the the status of a remote process @@ -572,7 +577,8 @@ def rstatus(pid, ppid, gw = gw, agent = agent, identity = identity, - server_key = server_key + server_key = server_key, + strict_host_checking = strict_host_checking ) if proc.wait(): @@ -599,7 +605,8 @@ def rkill(pid, ppid, sudo = False, identity = None, server_key = None, - nowait = False): + nowait = False, + strict_host_checking = True): """ Sends a kill signal to a remote process. @@ -653,7 +660,8 @@ fi gw = gw, agent = agent, identity = identity, - server_key = server_key + server_key = server_key, + strict_host_checking = strict_host_checking ) # wait, don't leave zombies around