Revision 39c0686c src/lcm/LifeCycleStates.cc

View differences:

src/lcm/LifeCycleStates.cc
308 308
              vm->get_lcm_state() == VirtualMachine::BOOT_UNKNOWN  ||
309 309
              vm->get_lcm_state() == VirtualMachine::BOOT_SUSPENDED||
310 310
              vm->get_lcm_state() == VirtualMachine::BOOT_STOPPED ||
311
              vm->get_lcm_state() == VirtualMachine::BOOT_UNDEPLOY )
311
              vm->get_lcm_state() == VirtualMachine::BOOT_UNDEPLOY ||
312
              vm->get_lcm_state() == VirtualMachine::BOOT_MIGRATE ||
313
              vm->get_lcm_state() == VirtualMachine::BOOT_MIGRATE_FAILURE ||
314
              vm->get_lcm_state() == VirtualMachine::BOOT_FAILURE )
312 315
    {
313 316
        vm->set_state(VirtualMachine::RUNNING);
314 317

  
......
400 403

  
401 404
        vmm->trigger(VirtualMachineManager::POLL,vid);
402 405
    }
403
    else if (vm->get_lcm_state() == VirtualMachine::BOOT)
406
    else if (vm->get_lcm_state() == VirtualMachine::BOOT ||
407
             vm->get_lcm_state() == VirtualMachine::BOOT_FAILURE)
404 408
    {
405
        vm->set_running_etime(the_time);
409
        vm->set_state(VirtualMachine::BOOT_FAILURE);
406 410

  
407
        failure_action(vm);
411
        vmpool->update(vm);
412

  
413
        vm->log("LCM", Log::INFO, "Fail to boot VM. New VM state is BOOT_FAILURE");
414
    }
415
    else if (vm->get_lcm_state() == VirtualMachine::BOOT_MIGRATE ||
416
             vm->get_lcm_state() == VirtualMachine::BOOT_MIGRATE_FAILURE )
417
    {
418
        vm->set_state(VirtualMachine::BOOT_MIGRATE_FAILURE);
419

  
420
        vmpool->update(vm);
421

  
422
        vm->log("LCM", Log::INFO, "Fail to boot VM. New VM state is BOOT_MIGRATE_FAILURE");
408 423
    }
409 424
    else if (vm->get_lcm_state() == VirtualMachine::BOOT_UNKNOWN)
410 425
    {
......
716 731
    {
717 732
        vm->set_state(VirtualMachine::BOOT_UNDEPLOY);
718 733
    }
719
    else // PROLOG || PROLOG_MIGRATE
734
    else if ( lcm_state == VirtualMachine::PROLOG_MIGRATE )
735
    {
736
        vm->set_state(VirtualMachine::BOOT_MIGRATE);
737
    }
738
    else // PROLOG
720 739
    {
721 740
        vm->set_state(VirtualMachine::BOOT);
722 741
    }

Also available in: Unified diff