diff --git a/daemons/ganeti-noded b/daemons/ganeti-noded index 67081e84f0f587858cf477d5282f4bd641b46466..d70fe8e7ddbcc199c63bb56893aa28ac9fee522d 100755 --- a/daemons/ganeti-noded +++ b/daemons/ganeti-noded @@ -574,7 +574,7 @@ class NodeHttpServer(http.server.HttpServer): """Query version information. """ - return constants.PROTOCOL_VERSION + return True, constants.PROTOCOL_VERSION @staticmethod def perspective_upload_file(params): diff --git a/lib/cmdlib.py b/lib/cmdlib.py index 916886e001cee821b7b75f9a0fad4b5144a06031..7c540b8d8d323b1c82d133cbc689f5f14b471e16 100644 --- a/lib/cmdlib.py +++ b/lib/cmdlib.py @@ -2287,17 +2287,17 @@ class LUAddNode(LogicalUnit): # check connectivity result = self.rpc.call_version([node])[node] - result.Raise() - if result.data: - if constants.PROTOCOL_VERSION == result.data: - logging.info("Communication to node %s fine, sw version %s match", - node, result.data) - else: - raise errors.OpExecError("Version mismatch master version %s," - " node version %s" % - (constants.PROTOCOL_VERSION, result.data)) + msg = result.RemoteFailMsg() + if msg: + raise errors.OpExecError("Can't get version information from" + " node %s: %s" % (node, msg)) + if constants.PROTOCOL_VERSION == result.payload: + logging.info("Communication to node %s fine, sw version %s match", + node, result.payload) else: - raise errors.OpExecError("Cannot get version from the new node") + raise errors.OpExecError("Version mismatch master version %s," + " node version %s" % + (constants.PROTOCOL_VERSION, result.payload)) # setup ssh on node logging.info("Copy ssh key to node %s", node)