Revision 0cf5e7f5

b/lib/backend.py
480 480
  if constants.NV_HYPERVISOR in what:
481 481
    result[constants.NV_HYPERVISOR] = tmp = {}
482 482
    for hv_name in what[constants.NV_HYPERVISOR]:
483
      tmp[hv_name] = hypervisor.GetHypervisor(hv_name).Verify()
483
      try:
484
        val = hypervisor.GetHypervisor(hv_name).Verify()
485
      except errors.HypervisorError, err:
486
        val = "Error while checking hypervisor: %s" % str(err)
487
      tmp[hv_name] = val
484 488

  
485 489
  if constants.NV_FILELIST in what:
486 490
    result[constants.NV_FILELIST] = utils.FingerprintFiles(
......
523 527
    result[constants.NV_LVLIST] = GetVolumeList(what[constants.NV_LVLIST])
524 528

  
525 529
  if constants.NV_INSTANCELIST in what:
526
    result[constants.NV_INSTANCELIST] = GetInstanceList(
527
      what[constants.NV_INSTANCELIST])
530
    # GetInstanceList can fail
531
    try:
532
      val = GetInstanceList(what[constants.NV_INSTANCELIST])
533
    except RPCFail, err:
534
      val = str(err)
535
    result[constants.NV_INSTANCELIST] = val
528 536

  
529 537
  if constants.NV_VGLIST in what:
530 538
    result[constants.NV_VGLIST] = utils.ListVolumeGroups()
b/lib/cmdlib.py
1439 1439
      idata = nresult.get(constants.NV_INSTANCELIST, None)
1440 1440
      test = not isinstance(idata, list)
1441 1441
      _ErrorIf(test, self.ENODEHV, node,
1442
               "rpc call to node failed (instancelist)")
1442
               "rpc call to node failed (instancelist): %s",
1443
               utils.SafeEncode(str(idata)))
1443 1444
      if test:
1444 1445
        continue
1445 1446

  
......
1544 1545
        _ErrorIf(snode not in node_info and snode not in n_offline,
1545 1546
                 self.ENODERPC, snode,
1546 1547
                 "instance %s, connection to secondary node"
1547
                 "failed", instance)
1548
                 " failed", instance)
1548 1549

  
1549 1550
        if snode in node_info:
1550 1551
          node_info[snode]['sinst'].append(instance)

Also available in: Unified diff