Revision 7189e790

b/lib/confd/querylib.py
25 25

  
26 26
from ganeti import constants
27 27

  
28
# constants for some common errors to return from a query
29
QUERY_UNKNOWN_ENTRY_ERROR = (constants.CONFD_REPL_STATUS_ERROR,
30
                             constants.CONFD_ERROR_UNKNOWN_ENTRY)
31
QUERY_INTERNAL_ERROR = (constants.CONFD_REPL_STATUS_ERROR,
32
                        constants.CONFD_ERROR_INTERNAL)
28 33

  
29 34
class ConfdQuery(object):
30 35
  """Confd Query base class.
......
93 98
      return status, answer
94 99
    flags = self.reader.GetNodeStatusFlags(node)
95 100
    if flags is None:
96
      status = constants.CONFD_REPL_STATUS_ERROR
97
      answer = constants.CONFD_ERROR_UNKNOWN_ENTRY
98
      return status, answer
101
      return QUERY_UNKNOWN_ENTRY_ERROR
99 102

  
100 103
    master_candidate, drained, offline = flags
101 104
    if master_candidate:
b/lib/constants.py
654 654

  
655 655
# A few common errors for confd
656 656
CONFD_ERROR_UNKNOWN_ENTRY = 1
657
CONFD_ERROR_INTERNAL = 2
657 658

  
658 659
# Each request is "salted" by the current timestamp.
659 660
# This constants decides how many seconds of skew to accept.

Also available in: Unified diff