Revision e480923b

b/lib/backend.py
451 451
      what[constants.NV_INSTANCELIST])
452 452

  
453 453
  if constants.NV_VGLIST in what:
454
    result[constants.NV_VGLIST] = ListVolumeGroups()
454
    result[constants.NV_VGLIST] = utils.ListVolumeGroups()
455 455

  
456 456
  if constants.NV_VERSION in what:
457 457
    result[constants.NV_VERSION] = (constants.PROTOCOL_VERSION,
......
519 519
      size of the volume
520 520

  
521 521
  """
522
  return utils.ListVolumeGroups()
522
  return True, utils.ListVolumeGroups()
523 523

  
524 524

  
525 525
def NodeVolumes():
b/lib/cmdlib.py
1510 1510
    if self.op.vg_name:
1511 1511
      vglist = self.rpc.call_vg_list(node_list)
1512 1512
      for node in node_list:
1513
        if vglist[node].failed:
1513
        msg = vglist[node].RemoteFailMsg()
1514
        if msg:
1514 1515
          # ignoring down node
1515
          self.LogWarning("Node %s unreachable/error, ignoring" % node)
1516
          self.LogWarning("Error while gathering data on node %s"
1517
                          " (ignoring node): %s", node, msg)
1516 1518
          continue
1517
        vgstatus = utils.CheckVolumeGroupSize(vglist[node].data,
1519
        vgstatus = utils.CheckVolumeGroupSize(vglist[node].payload,
1518 1520
                                              self.op.vg_name,
1519 1521
                                              constants.MIN_VG_SIZE)
1520 1522
        if vgstatus:
......
5226 5228
      raise errors.OpExecError("Can't list volume groups on the nodes")
5227 5229
    for node in oth_node, tgt_node:
5228 5230
      res = results[node]
5229
      if res.failed or not res.data or my_vg not in res.data:
5231
      msg = res.RemoteFailMsg()
5232
      if msg:
5233
        raise errors.OpExecError("Error checking node %s: %s" % (node, msg))
5234
      if my_vg not in res.payload:
5230 5235
        raise errors.OpExecError("Volume group '%s' not found on %s" %
5231 5236
                                 (my_vg, node))
5232 5237
    for idx, dev in enumerate(instance.disks):
......
5422 5427
    results = self.rpc.call_vg_list([pri_node, new_node])
5423 5428
    for node in pri_node, new_node:
5424 5429
      res = results[node]
5425
      if res.failed or not res.data or my_vg not in res.data:
5430
      msg = res.RemoteFailMsg()
5431
      if msg:
5432
        raise errors.OpExecError("Error checking node %s: %s" % (node, msg))
5433
      if my_vg not in res.payload:
5426 5434
        raise errors.OpExecError("Volume group '%s' not found on %s" %
5427 5435
                                 (my_vg, node))
5428 5436
    for idx, dev in enumerate(instance.disks):

Also available in: Unified diff