summaryrefslogtreecommitdiffstats
path: root/install/tools/ipa-replica-conncheck
diff options
context:
space:
mode:
authorMartin Kosek <mkosek@redhat.com>2012-01-03 16:49:06 +0100
committerRob Crittenden <rcritten@redhat.com>2012-01-03 16:41:15 -0500
commitd0648f1fd4ee708cfa4ea6fdc29dc99ae44521e2 (patch)
tree4c127a0c9f11ce8ea66adaef24267c326bc67163 /install/tools/ipa-replica-conncheck
parenta071257ed2dd42e4767a7b220914e0f20b9fd970 (diff)
downloadfreeipa-d0648f1fd4ee708cfa4ea6fdc29dc99ae44521e2.tar.gz
freeipa-d0648f1fd4ee708cfa4ea6fdc29dc99ae44521e2.tar.xz
freeipa-d0648f1fd4ee708cfa4ea6fdc29dc99ae44521e2.zip
Add DNS check to conncheck port probe
It is pointless to report failures for all checked ports when the target hostname is not resolvable - user may get easily confused. This patch changes this behavior so that conncheck fails with a proper error and does not even continue to port probing part. https://fedorahosted.org/freeipa/ticket/1984
Diffstat (limited to 'install/tools/ipa-replica-conncheck')
-rwxr-xr-xinstall/tools/ipa-replica-conncheck5
1 files changed, 5 insertions, 0 deletions
diff --git a/install/tools/ipa-replica-conncheck b/install/tools/ipa-replica-conncheck
index 8f8163619..882d77d30 100755
--- a/install/tools/ipa-replica-conncheck
+++ b/install/tools/ipa-replica-conncheck
@@ -235,6 +235,11 @@ class PortResponder(threading.Thread):
self._stop_request = True
def port_check(host, port_list):
+ ip = installutils.resolve_host(host)
+
+ if ip is None:
+ raise RuntimeError("Port check failed! Unable to resolve host name '%s'" % host)
+
failed_ports = []
for port in port_list:
if ipautil.host_port_open(host, port.port, port.stream, CONNECT_TIMEOUT):