Issue #8157 has been updated by Jeff McCune.

Status changed from Accepted to In Topic Branch Pending Merge
Keywords set to cloudpack

# Topic Branch #

Patch mailed to tech, pending review.

Topic branch is: 
`ticket/7511_add_region_option/8157_better_feedback_for_terminate` in my 
repository on github.

<pre>
commit 9c797733c32b3dcb3658e2d38ad79e73c13c3d63
Author: Jeff McCune <[email protected]>
Date:   Sun Jul 10 15:00:57 2011 -0700

    (#8157) Add better feedback to terminate action
    
    This change adds better feedback to the terminate action.  Without the
    change, the end user did not receive any feedback that the server has or
    has not been terminated.
    
    With this change, the following output gives an indication to the end
    user about what's happening:
    
        Destroying ec2-50-18-139-155.us-west-1.compute.amazonaws.com ... Done

diff --git a/lib/puppet/cloudpack.rb b/lib/puppet/cloudpack.rb
index 177baeb..9d98135 100644
--- a/lib/puppet/cloudpack.rb
+++ b/lib/puppet/cloudpack.rb
@@ -435,7 +435,13 @@ module Puppet::CloudPack
 
       servers = connection.servers.all('dns-name' => server)
       if servers.length == 1 || options[:force]
-        servers.each { |server| server.destroy() }
+        # We're using myserver rather than server to prevent ruby 1.8 from
+        # overwriting the server method argument
+        servers.each do |myserver|
+          print "Destroying #{myserver.id} (#{myserver.dns_name}) ..."
+          myserver.destroy()
+          puts ' Done'
+        end
       elsif servers.empty?
         Puppet.warning "Could not find server with DNS name '#{server}'"
       else
</pre>
----------------------------------------
Bug #8157: puppet node terminate action should give feedback that the node is 
terminated
https://projects.puppetlabs.com/issues/8157

Author: Jeff McCune
Status: In Topic Branch Pending Merge
Priority: Normal
Assignee: Jeff McCune
Category: 
Target version: 
Keywords: cloudpack
Branch: 


The puppet node terminate action currently doesn't give any indication that the 
instance was terminated or not.

    $ puppet node terminate --platform AWS 
ec2-50-19-128-218.compute-1.amazonaws.com
    Connecting to AWS ... Done

Ideally, the action would give me an indication the terminate action was 
successful or not.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to