Revision effc1b86 lib/server/masterd.py

b/lib/server/masterd.py
61 61
from ganeti import pathutils
62 62
from ganeti import ht
63 63

  
64
from ganeti.utils import version
65

  
64 66

  
65 67
CLIENT_REQUEST_WORKERS = 16
66 68

  
......
90 92
    client_ops = ClientOps(server)
91 93

  
92 94
    try:
93
      (method, args, version) = luxi.ParseRequest(message)
95
      (method, args, ver) = luxi.ParseRequest(message)
94 96
    except luxi.ProtocolError, err:
95 97
      logging.error("Protocol Error: %s", err)
96 98
      client.close_log()
......
99 101
    success = False
100 102
    try:
101 103
      # Verify client's version if there was one in the request
102
      if version is not None and version != constants.LUXI_VERSION:
104
      if ver is not None and ver != constants.LUXI_VERSION:
103 105
        raise errors.LuxiError("LUXI version mismatch, server %s, request %s" %
104
                               (constants.LUXI_VERSION, version))
106
                               (constants.LUXI_VERSION, ver))
105 107

  
106 108
      result = client_ops.handle_request(method, args)
107 109
      success = True
......
685 687
  try:
686 688
    config.ConfigWriter()
687 689
  except errors.ConfigVersionMismatch, err:
688
    v1 = "%s.%s.%s" % constants.SplitVersion(err.args[0])
689
    v2 = "%s.%s.%s" % constants.SplitVersion(err.args[1])
690
    v1 = "%s.%s.%s" % version.SplitVersion(err.args[0])
691
    v2 = "%s.%s.%s" % version.SplitVersion(err.args[1])
690 692
    print >> sys.stderr,  \
691 693
        ("Configuration version mismatch. The current Ganeti software"
692 694
         " expects version %s, but the on-disk configuration file has"

Also available in: Unified diff