Change in vdsm[master]: net: vdsClient fails to connect to an IPv6 addr

edwardh at redhat.com edwardh at redhat.com
Mon Jan 18 14:57:38 UTC 2016


Edward Haas has uploaded a new change for review.

Change subject: net: vdsClient fails to connect to an IPv6 addr
......................................................................

net: vdsClient fails to connect to an IPv6 addr

When vdsClient is used on a non-ipv6  host, and no destination address
is provided, it will fail to connect to the server.
(it uses the vdsm.conf management_ip parameter which is by default '::')

The vdsClient now prompts when it detects/suspects this is the problem.
(instead of a traceback)

Change-Id: I069dcb3863a720f414d3048299fd54ef74839bdb
Signed-off-by: Edward Haas <edwardh at redhat.com>
---
M client/vdsClient.py
1 file changed, 7 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/67/52367/1

diff --git a/client/vdsClient.py b/client/vdsClient.py
index 9f17344..94c9723 100755
--- a/client/vdsClient.py
+++ b/client/vdsClient.py
@@ -18,6 +18,7 @@
 #
 
 from __future__ import print_function
+import errno
 import sys
 import ast
 import getopt
@@ -3005,6 +3006,12 @@
     except socket.error as e:
         if e[0] == 111:
             print("Connection to %s refused" % hostPort)
+        elif e.errno == errno.EAFNOSUPPORT:
+            print("Connection to host %s is not supported, "
+                  "probably trying to connect to an IPv6 address "
+                  "while IPv6 is disabled.\n"
+                  "Either specify a proper address or "
+                  "update vdsm.conf management_ip parameter" % hostPort)
         else:
             traceback.print_exc()
         sys.exit(-1)


-- 
To view, visit https://gerrit.ovirt.org/52367
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I069dcb3863a720f414d3048299fd54ef74839bdb
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Edward Haas <edwardh at redhat.com>


More information about the vdsm-patches mailing list