You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltacloud.apache.org by ma...@redhat.com on 2010/12/07 17:15:23 UTC

[PATCH] very minor fix to ec2 driver for reporting when instance is terminated - removes the ability to 'start' a terminated instance

From: marios <ma...@redhat.com>

---
 server/lib/deltacloud/drivers/ec2/ec2_driver.rb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
index fff3663..fb5a0f4 100644
--- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
+++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
@@ -574,7 +574,7 @@ class EC2Driver < Deltacloud::BaseDriver
   def convert_state(ec2_state)
     case ec2_state
     when "terminated"
-      "STOPPED"
+      "TERMINATED"
     when "stopped"
       "STOPPED"
     when "running"
-- 
1.7.2.3


Re: [PATCH] very minor fix to ec2 driver for reporting when instance is terminated - removes the ability to 'start' a terminated instance

Posted by Chris Lalancette <cl...@redhat.com>.
On 12/07/10 - 06:15:23PM, marios@redhat.com wrote:
> From: marios <ma...@redhat.com>
> 
> ---
>  server/lib/deltacloud/drivers/ec2/ec2_driver.rb |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
> index fff3663..fb5a0f4 100644
> --- a/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
> +++ b/server/lib/deltacloud/drivers/ec2/ec2_driver.rb
> @@ -574,7 +574,7 @@ class EC2Driver < Deltacloud::BaseDriver
>    def convert_state(ec2_state)
>      case ec2_state
>      when "terminated"
> -      "STOPPED"
> +      "TERMINATED"
>      when "stopped"
>        "STOPPED"
>      when "running"

As we discussed on IRC, we do want to introduce a TERMINATED state back, but
I think we need to do it in a slightly less ad-hoc fashion.  These states
are visible to the clients, and as such, they need to be consistently defined
across all of the drivers.  If we are going to add this back, what I would
like to see is:

1)  This applied consistently to all of the drivers where it makes sense
2)  The meaning of the various client-visible states documented for future
driver writers
3)  Some sort of ruby construct to try to enforce a consistent set of
externally visible states (this may not be possible).

NACK for now.

-- 
Chris Lalancette