Feature #10498

Implement 'node clean' as part of the 'node_aws terminate' process

Added by selena deckelmann over 1 year ago. Updated over 1 year ago.

Status:AcceptedStart date:11/02/2011
Priority:NormalDue date:
Assignee:Jeff McCune% Done:

0%

Category:terminateSpent time:-
Target version:-
Keywords: Roadmapped:No
Branch:

Description

So, I’d like something along the lines of what’s below to happen when I terminate an instance:

diff --git a/lib/puppet/cloudpack.rb b/lib/puppet/cloudpack.rb
index cbfc8eb..c25e48e 100644
--- a/lib/puppet/cloudpack.rb
+++ b/lib/puppet/cloudpack.rb
@@ -829,6 +829,9 @@ module Puppet::CloudPack
Puppet.notice "Destroying #{myserver.id} (#{myserver.dns_name}) ..."
myserver.destroy()
Puppet.notice "Destroying #{myserver.id} (#{myserver.dns_name}) ... Done"
+          Puppet.notice "Destroying all puppet info for #{myserver.id} (#{myserver.dns_name}) ..."
+          Puppet::Face[:node, :current].clean(myserver.private_dns_name)
+          Puppet.notice "Destroying all puppet info for #{myserver.id} (#{myserver.dns_name}) ... Done"
end
elsif servers.empty?
Puppet.warning "Could not find server with DNS name '#{server}'"

It seems very unlikely that I’d want the node information to persist after I blow away a system. And it’s annoying to see the certs/yaml, etc laying around! Tidy FTW!


Related issues

Related to Puppet - Bug #11330: puppet node clean does not remove records from inventory_... Accepted 12/11/2011

History

#1 Updated by James Turnbull over 1 year ago

  • Category set to terminate
  • Status changed from Unreviewed to Needs Decision
  • Assignee set to Nigel Kersten

Selena – could you please sign a CLA too – the link in the top right menu bar – and we can put your code in.

#2 Updated by selena deckelmann over 1 year ago

I signed the CLA :)

#3 Updated by Nigel Kersten over 1 year ago

  • Assignee changed from Nigel Kersten to Jeff McCune

ok, handing over to Jeff who is managing the cloud provisioner codebase right now.

Thanks!

#4 Updated by Jeff McCune over 1 year ago

  • Status changed from Needs Decision to Accepted

#5 Updated by Jeff McCune over 1 year ago

Thanks

Thanks for the feedback Selena. I saw your blog post about Cloud Provisioner and am really happy you’re using it. Please keep letting us know how we can improve it and I’ll do my best to get them in quickly.

Cheers, -Jeff

#6 Updated by Jeff McCune over 1 year ago

Default?

Selena, would you expect the default behavior to tidy up reports and node / fact YAML files when you do a terminate, or would you instead expect this to only be removed if you explicitly tell the system to remove it.

I’m hesitant to add destructive behavior by default, but this is the terminate action after all…

-Jeff

#7 Updated by selena deckelmann over 1 year ago

Hey Jeff,

I expect all the information to go away. The ‘terminate’ renders the instance un-revivable. If you just ‘stopped’ the instance, that’s a different story. But terminate is final as far as AWS is concerned, so I would expect the same from Puppet.

-selena

Also available in: Atom PDF