Revision 90b54c26

b/daemons/ganeti-noded
574 574
    """Query version information.
575 575

  
576 576
    """
577
    return constants.PROTOCOL_VERSION
577
    return True, constants.PROTOCOL_VERSION
578 578

  
579 579
  @staticmethod
580 580
  def perspective_upload_file(params):
b/lib/cmdlib.py
2287 2287

  
2288 2288
    # check connectivity
2289 2289
    result = self.rpc.call_version([node])[node]
2290
    result.Raise()
2291
    if result.data:
2292
      if constants.PROTOCOL_VERSION == result.data:
2293
        logging.info("Communication to node %s fine, sw version %s match",
2294
                     node, result.data)
2295
      else:
2296
        raise errors.OpExecError("Version mismatch master version %s,"
2297
                                 " node version %s" %
2298
                                 (constants.PROTOCOL_VERSION, result.data))
2290
    msg = result.RemoteFailMsg()
2291
    if msg:
2292
      raise errors.OpExecError("Can't get version information from"
2293
                               " node %s: %s" % (node, msg))
2294
    if constants.PROTOCOL_VERSION == result.payload:
2295
      logging.info("Communication to node %s fine, sw version %s match",
2296
                   node, result.payload)
2299 2297
    else:
2300
      raise errors.OpExecError("Cannot get version from the new node")
2298
      raise errors.OpExecError("Version mismatch master version %s,"
2299
                               " node version %s" %
2300
                               (constants.PROTOCOL_VERSION, result.payload))
2301 2301

  
2302 2302
    # setup ssh on node
2303 2303
    logging.info("Copy ssh key to node %s", node)

Also available in: Unified diff