Revision 87f5c298 lib/cmdlib.py

b/lib/cmdlib.py
7123 7123
    data = self.in_text
7124 7124

  
7125 7125
    result = call_fn(self.lu.cfg.GetMasterNode(), name, self.in_text)
7126
    result.Raise()
7127

  
7128
    if not isinstance(result.data, (list, tuple)) or len(result.data) != 4:
7129
      raise errors.OpExecError("Invalid result from master iallocator runner")
7130

  
7131
    rcode, stdout, stderr, fail = result.data
7126
    msg = result.RemoteFailMsg()
7127
    if msg:
7128
      raise errors.OpExecError("Failure while running the iallocator"
7129
                               " script: %s" % msg)
7132 7130

  
7133
    if rcode == constants.IARUN_NOTFOUND:
7134
      raise errors.OpExecError("Can't find allocator '%s'" % name)
7135
    elif rcode == constants.IARUN_FAILURE:
7136
      raise errors.OpExecError("Instance allocator call failed: %s,"
7137
                               " output: %s" % (fail, stdout+stderr))
7138
    self.out_text = stdout
7131
    self.out_text = result.payload
7139 7132
    if validate:
7140 7133
      self._ValidateResult()
7141 7134

  

Also available in: Unified diff