##// END OF EJS Templates
parallel.Client: ignore 'ssh' field of JSON connector if controller appears to be local...
MinRK -
Show More
@@ -318,14 +318,20 b' class Client(HasTraits):'
318 if exec_key:
318 if exec_key:
319 cfg['exec_key'] = exec_key
319 cfg['exec_key'] = exec_key
320 exec_key = cfg['exec_key']
320 exec_key = cfg['exec_key']
321 sshserver=cfg['ssh']
322 url = cfg['url']
323 location = cfg.setdefault('location', None)
321 location = cfg.setdefault('location', None)
324 cfg['url'] = util.disambiguate_url(cfg['url'], location)
322 cfg['url'] = util.disambiguate_url(cfg['url'], location)
325 url = cfg['url']
323 url = cfg['url']
326 if location is not None:
324 proto,addr,port = util.split_url(url)
327 proto,addr,port = util.split_url(url)
325 if location is not None and addr == '127.0.0.1':
328 if addr == '127.0.0.1' and location not in LOCAL_IPS and not sshserver:
326 # location specified, and connection is expected to be local
327 if location not in LOCAL_IPS and not sshserver:
328 # load ssh from JSON *only* if the controller is not on
329 # this machine
330 sshserver=cfg['ssh']
331 if location not in LOCAL_IPS and not sshserver:
332 # warn if no ssh specified, but SSH is probably needed
333 # This is only a warning, because the most likely cause
334 # is a local Controller on a laptop whose IP is dynamic
329 warnings.warn("""
335 warnings.warn("""
330 Controller appears to be listening on localhost, but not on this machine.
336 Controller appears to be listening on localhost, but not on this machine.
331 If this is true, you should specify Client(...,sshserver='you@%s')
337 If this is true, you should specify Client(...,sshserver='you@%s')
General Comments 0
You need to be logged in to leave comments. Login now