Revision 6b5e3f70 lib/backend.py

b/lib/backend.py
2013 2013
  @return: True if all renames succeeded, False otherwise
2014 2014

  
2015 2015
  """
2016
  msgs = []
2016 2017
  result = True
2017 2018
  for disk, unique_id in devlist:
2018 2019
    dev = _RecursiveFindBD(disk)
2019 2020
    if dev is None:
2021
      msgs.append("Can't find device %s in rename" % str(disk))
2020 2022
      result = False
2021 2023
      continue
2022 2024
    try:
......
2031 2033
        # cache? for now, we only lose lvm data when we rename, which
2032 2034
        # is less critical than DRBD or MD
2033 2035
    except errors.BlockDeviceError, err:
2036
      msgs.append("Can't rename device '%s' to '%s': %s" %
2037
                  (dev, unique_id, err))
2034 2038
      logging.exception("Can't rename device '%s' to '%s'", dev, unique_id)
2035 2039
      result = False
2036
  return result
2040
  return (result, "; ".join(msgs))
2037 2041

  
2038 2042

  
2039 2043
def _TransformFileStorageDir(file_storage_dir):

Also available in: Unified diff