Hi,
I was trying to connect to all my remote nodes using the zerodeploy
(SshMachine from plumbum internally)
So this is my code below
def establish_connection(self, node, user):
self.logger.debug("Connecting to node: %s" % node)
try:
rem = SshMachine(node, user)
dep = DeployedServer(rem)
conn = dep.classic_connect()
self.connection_handles[node][user] = (rem, dep, conn)
self.subp_conn[node][user] = conn.modules.subprocess
except:
self.logger.debug("Unable to connect to node: %s" % node)
return False
self.logger.debug("Connected to node: %s" % node)
return True
And I am calling this function via threads in following manner.
self.connection_handles = {}
self.subp_conn = {}
processes = []
for node in self.all_nodes:
self.connection_handles[node] = {}
self.subp_conn[node] = {}
p = Thread(target=self.establish_connection, args=(node,
self.user))
p.start()
processes.append(p)
for p in processes:
p.join()
This code works properly, when run inside the interactive python shell. But
gets stuck while executing following line when run from outside interactive
python shell
rem = SshMachine(node, user)
When I run strace on the python process, I can see that it is hung on some
futex thing
Process 27115 attached - interrupt to quit
futex(0xf928b0, FUTEX_WAIT_PRIVATE, 0, NULL
Does anybody faces similar issue. What's weird is, it works when called
from ipython shell but gets hung when run from bash.
Any help is appreciated. Thanks
Best Regards,
Vishwanath
--
---
You received this message because you are subscribed to the Google Groups
"rpyc" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.