Revision 53c776b5 lib/backend.py

b/lib/backend.py
975 975
      - msg is a string with details in case of failure
976 976

  
977 977
  """
978
  hyper = hypervisor.GetHypervisor(instance.hypervisor_name)
978
  hyper = hypervisor.GetHypervisor(instance.hypervisor)
979 979

  
980 980
  try:
981 981
    hyper.MigrateInstance(instance.name, target, live)
982 982
  except errors.HypervisorError, err:
983
    msg = "Failed to migrate instance: %s" % str(err)
984
    logging.error(msg)
985
    return (False, msg)
983
    msg = "Failed to migrate instance"
984
    logging.exception(msg)
985
    return (False, "%s: %s" % (msg, err))
986 986
  return (True, "Migration successfull")
987 987

  
988 988

  
......
2223 2223
    return status, bdevs
2224 2224

  
2225 2225
  if multimaster:
2226
    for cf, rd in zip(disks, bdevs):
2226
    for idx, rd in enumerate(bdevs):
2227 2227
      try:
2228
        _SymlinkBlockDev(instance_name, rd.dev_path, cf.iv_name)
2228
        _SymlinkBlockDev(instance_name, rd.dev_path, idx)
2229 2229
      except EnvironmentError, err:
2230 2230
        return (False, "Can't create symlink: %s" % str(err))
2231 2231
  # reconnect disks, switch to new master configuration and if

Also available in: Unified diff