Revision 7af293d7 qa/qa_instance.py

b/qa/qa_instance.py
48 48
  return "/sys/block/%s/device/state" % disk
49 49

  
50 50

  
51
def _GetInstanceInfo(instance):
51
def GetInstanceInfo(instance):
52 52
  """Return information about the actual state of an instance.
53 53

  
54 54
  @type instance: string
......
129 129
  @param instance: the instance
130 130

  
131 131
  """
132
  info = _GetInstanceInfo(instance.name)
132
  info = GetInstanceInfo(instance.name)
133 133
  # FIXME: destruction/removal should be part of the disk class
134 134
  if info["storage-type"] == constants.ST_LVM_VG:
135 135
    vols = info["volumes"]
......
357 357
  finally:
358 358
    qa_utils.RemoveFromEtcHosts(["meeeeh-not-exists", rename_target])
359 359

  
360
  info = _GetInstanceInfo(rename_source)
360
  info = GetInstanceInfo(rename_source)
361 361

  
362 362
  # Check instance volume tags correctly updated. Note that this check is lvm
363 363
  # specific, so we skip it for non-lvm-based instances.
......
972 972
  @param set_online: function to call to set the node on-line
973 973

  
974 974
  """
975
  info = _GetInstanceInfo(instance.name)
975
  info = GetInstanceInfo(instance.name)
976 976
  set_offline(snode)
977 977
  try:
978 978
    TestInstanceRemove(instance)
......
991 991
        # syntax), we always have to perform both commands and ignore the
992 992
        # output.
993 993
        drbd_shutdown_cmd = \
994
          "(drbdsetup %d down && drbdsetup down resource%d) || /bin/true" % \
994
          "(drbdsetup %d down >/dev/null 2>&1;" \
995
          " drbdsetup down resource%d >/dev/null 2>&1) || /bin/true" % \
995 996
            (minor, minor)
996 997
        AssertCommand(drbd_shutdown_cmd, node=snode)
997 998
      AssertCommand(["lvremove", "-f"] + info["volumes"], node=snode)

Also available in: Unified diff