示例#1
0
 @Override
 protected void processVmOnDown() {
   // In case the migration failed and the VM turned back to Up in the
   // source, we don't need to handle it as a VM that failed to run
   if (getVm().getStatus() != VMStatus.Up) {
     super.processVmOnDown();
   }
 }
 @Override
 public void runningSucceded() {
   try {
     getVmDynamicDao().clearMigratingToVds(getVmId());
   } finally {
     super.runningSucceded();
   }
 }
示例#3
0
 @Override
 public void runningSucceded() {
   try {
     getDowntime();
     getVmDynamicDao().clearMigratingToVds(getVmId());
     updateVmAfterMigrationToDifferentCluster();
   } finally {
     super.runningSucceded();
   }
 }
 @Override
 protected void rerunInternal() {
   /** make Vm property to null in order to refresh it from db. */
   setVm(null);
   determineMigrationFailueForAuditLog();
   /** if vm is up and rerun is called then it got up on the source, try to rerun */
   if (getVm() != null && getVm().getstatus() == VMStatus.Up) {
     setVdsDestinationId(null);
     super.rerunInternal();
   } else {
     /** vm went down on the destination and source, migration failed. */
     DecreasePendingVms(getDestinationVds().getvds_id());
     _isRerun = true;
     setSucceeded(false);
     log();
   }
 }
示例#5
0
  @Override
  public void rerun() {
    // make Vm property to null in order to refresh it from db
    setVm(null);

    determineMigrationFailureForAuditLog();

    // if vm is up and rerun is called then it got up on the source, try to rerun
    if (getVm() != null && getVm().getStatus() == VMStatus.Up) {
      super.rerun();
    } else {
      // vm went down on the destination and source, migration failed.
      runningFailed();
      // signal the caller that a rerun was made so that it won't log
      // the failure message again
      _isRerun = true;
    }
  }
示例#6
0
 @Override
 protected void reexecuteCommand() {
   setDestinationVdsId(null);
   super.reexecuteCommand();
 }
 protected void FailedToRunVm() {
   if (getVm().getstatus() != VMStatus.Up) {
     super.FailedToRunVm();
   }
 }
 public MigrateVmCommand(T parameters) {
   super(parameters);
   super.setVmId(parameters.getVmId());
   setVdsSelector(new VdsSelector(getVm(), getVdsDestinationId(), true));
   forcedMigrationForNonMigratableVM = parameters.isForceMigrationForNonMigratableVM();
 }