You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by Chris Lalancette <cl...@redhat.com> on 2011/06/21 22:57:07 UTC

[PATCH] Fix up the RHEV-M pending state.

In particular, RHEV-M does *not* go pending->running automatically;
instead, it requires an explicit action.  Make the state machine
reflect that.

Signed-off-by: Chris Lalancette <cl...@redhat.com>
---
 .../lib/deltacloud/drivers/rhevm/rhevm_driver.rb   |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
index 2970ca4..24a98b8 100644
--- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
+++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
@@ -79,7 +79,7 @@ class RHEVMDriver < Deltacloud::BaseDriver
 
   define_instance_states do
     start.to( :pending )          .automatically
-    pending.to( :running )        .automatically
+    pending.to( :running )        .on( :start )
     pending.to( :stopped )        .automatically
     stopped.to( :running )        .on( :start )
     running.to( :stopping )       .on( :stop )
-- 
1.7.4.4


Re: [PATCH] Fix up the RHEV-M pending state.

Posted by Michal Fojtik <mf...@redhat.com>.
On Jun 21, 2011, at 10:57 PM, Chris Lalancette wrote:

Hi,

Nice catch! You really need to 'start' instance after create, since it doesn't go to RUNNING state automatically. 

ACK && pushing it.

  -- Michal

> In particular, RHEV-M does *not* go pending->running automatically;
> instead, it requires an explicit action.  Make the state machine
> reflect that.
> 
> Signed-off-by: Chris Lalancette <cl...@redhat.com>
> ---
> .../lib/deltacloud/drivers/rhevm/rhevm_driver.rb   |    2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
> index 2970ca4..24a98b8 100644
> --- a/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
> +++ b/server/lib/deltacloud/drivers/rhevm/rhevm_driver.rb
> @@ -79,7 +79,7 @@ class RHEVMDriver < Deltacloud::BaseDriver
> 
>   define_instance_states do
>     start.to( :pending )          .automatically
> -    pending.to( :running )        .automatically
> +    pending.to( :running )        .on( :start )
>     pending.to( :stopped )        .automatically
>     stopped.to( :running )        .on( :start )
>     running.to( :stopping )       .on( :stop )
> -- 
> 1.7.4.4
> 

----------------------------------------------------------------------
Michal Fojtik, Software Engineer, Red Hat Czech
mfojtik@redhat.com
Deltacloud API: http://deltacloud.org