Bug #2090

Wrong TM action called when UNDEPLOYED VM is being resumed

Added by Simon Boulet about 8 years ago. Updated over 7 years ago.

Status:ClosedStart date:05/29/2013
Priority:NormalDue date:
Assignee:Ruben S. Montero% Done:

0%

Category:Core & System
Target version:Release 4.6
Resolution:fixed Pull request:
Affected Versions:OpenNebula 4.0

Description

I'm trying to understand how to use the new UNDEPLOYED VM state.

In my experiment, I noticed the TM MV action is being called (before VMM DEPLOY) when the VM is resubmitted from UNDEPLOYED state.

My VMs are deployed with persistent disks. Usually in the initial deployment, the TM LN action is called (not TM MV).

Also I noticed some weird behaviour. If the initial resubmit fails (say my driver doesn't have the TM MV action implemented and fails), then OpenNebula will retry to redeploy the VM but this time it will call the TM LN action instead of TM MV.

Finally, if the second attempt (using TM MV) also fails, the VM is reverted to UNDEPLOYED state. Here I noticed a bug, the VM_HOOK seems to be called a second time but again using the UNDEPLOYED/ACTIVE previous states. Perhaps the VM should be turned into ERROR state and/or the VM_HOOK be called with PROLOG_UNDEPLOY/ACTIVE (or what ever previous state the VM was when the deployment failed).

Sorry if I'm vague or unclear, I really don't know what's going on, and have found very little documentation on the new UNDEPLOYED state. I'm trying to understand the various driver actions implicated in the UNDEPLOYED resubmit process.

Simon

Associated revisions

Revision 121f73b9
Added by Ruben S. Montero over 7 years ago

bug #2090: Always force a none empty history action for VMs in STOP and UNDEPLOY states

History

#1 Updated by Carlos Martín about 8 years ago

  • Status changed from Pending to New

Hi,

Simon Boulet wrote:

I'm trying to understand how to use the new UNDEPLOYED VM state.

Simply put, it is the STOPPED state, but without a checkpoint file.

In my experiment, I noticed the TM MV action is being called (before VMM DEPLOY) when the VM is resubmitted from UNDEPLOYED state.

My VMs are deployed with persistent disks. Usually in the initial deployment, the TM LN action is called (not TM MV).

This is because the files are not taken from the image DS, but from the system DS. For a persistent disk, disk.0 may be just a link to the actual file in the image DS.

This is how a stop + resume operation works also.

Also I noticed some weird behaviour. If the initial resubmit fails (say my driver doesn't have the TM MV action implemented and fails), then OpenNebula will retry to redeploy the VM but this time it will call the TM LN action instead of TM MV.

I can confirm this, the second try calls LN instead of MV... we'll have to take a look at it.

Finally, if the second attempt (using TM MV) also fails, the VM is reverted to UNDEPLOYED state. Here I noticed a bug, the VM_HOOK seems to be called a second time but again using the UNDEPLOYED/ACTIVE previous states. Perhaps the VM should be turned into ERROR state and/or the VM_HOOK be called with PROLOG_UNDEPLOY/ACTIVE (or what ever previous state the VM was when the deployment failed).

We move the VM to undeploy to give it another change of being transfered/deployed in another host. If we set the VM to FAILED, you wouldn't be able to recover the current disks, since the only operations would be delete or delete --recreate.

Sorry if I'm vague or unclear, I really don't know what's going on, and have found very little documentation on the new UNDEPLOYED state. I'm trying to understand the various driver actions implicated in the UNDEPLOYED resubmit process.

Simon

Thanks!

#2 Updated by Carlos Martín almost 8 years ago

  • Category set to Core & System

#3 Updated by Ruben S. Montero over 7 years ago

  • Target version set to Release 4.6

#4 Updated by Jaime Melis over 7 years ago

  • Assignee set to Ruben S. Montero

#5 Updated by Ruben S. Montero over 7 years ago

  • Status changed from New to Closed
  • Resolution set to fixed

Also available in: Atom PDF