Github user paul-guo- commented on a diff in the pull request: https://github.com/apache/incubator-hawq/pull/1211#discussion_r110319372 --- Diff: tools/bin/hawqpylib/hawqlib.py --- @@ -203,6 +203,17 @@ def check_hostname_equal(remote_host, user = ""): cmd = "hostname" result_local, local_hostname, stderr_remote = local_ssh_output(cmd) result_remote, remote_hostname, stderr_remote = remote_ssh_output(cmd, remote_host, user) + # SSH return 255 error code when having connection issues, otherwise return code is in [0, 255). + if result_remote == 255: + print "Create ssh connection to %s failed." % remote_host + print "Please check the ssh connection and make sure passwordless ssh enabled." + sys.exit(result_remote) + elif result_remote > 0: + print "Execute remote command failed." + sys.exit(result_remote) + else: + pass + --- End diff -- Judge via 255 seems to be wrong since the cmd could return 255, e.g. [pguo@host67:/home/pguo]$ ssh 127.0.0.1 'exit 255' [pguo@host67:/home/pguo]$ echo $? 255 I'm wondering whether we could show the error info in hawq utility output or log file, and we still check result_remote>0 and log for this condition like this: ssh command returns with error, either ssh connection fails or cmd exits with error. see more in log or.....
--- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastruct...@apache.org or file a JIRA ticket with INFRA. ---