Issue #1886 has been updated by Peter Meier.
> The merged code caused failures in our CI environment > (https://jenkins.puppetlabs.com/job/Puppet%20Specs%20(2.7.x)/61/) that we had > difficulty reproducing; consequently, cleaning of storeconfigs has been > temporarily backed out, pending better isolated testing. So the one thing that pops up is that it fails on ruby >=1.8.7 and with these rubies it uses activerecord >= 3.0, which seems to not get properly mocked. rails 3.x (and so activerecord 3.x) requires ruby >= 1.8.7. This means that probably on the 1.8.5 installation there is an activerecord 2.3.x installed, which is also what I used to test things on 1.8.7, as I didn't remember that rails 3 got officially supported by puppet for storedconfigs. Sounds like a reasonable thing to look at, not? So using rails >= 3 for puppet stored configs is offically supported? ---------------------------------------- Feature #1886: Add node cleanup capability https://projects.puppetlabs.com/issues/1886 Author: micah - Status: Tests Insufficient Priority: Normal Assignee: Daniel Pittman Category: newfeature Target version: 2.7.3 Affected Puppet version: 0.25.0 Keywords: communitypatch Branch: 2.7.x There really isn't a good mechanism to clean up when a node no longer exits. You can remove it from your node definition, but there is a lot of junk hanging around that should be cleaned up too. It would be really cool if the ability to wipe a node was built into puppetmaster so you could just simply do something like: <pre> puppetmaster --clean node puppetmaster --clean node.domain.name </pre> and this would clean up everything that puppet can find on that node. The things that I can think of that need to get cleaned up are: 1. Signed certificates ($vardir/ssl/ca/signed/node.domain.pem) 2. Cached facts ($vardir/yaml/facts/node.domain.yaml) 3. Cached node stuff ($vardir/yaml/node/node.domain.yaml) 4. Reports ($vardir/reports/node.domain) 5. Stored configs. I found a script on the wiki that takes care of this: <pre> #!/usr/bin/env ruby ## Usage: sudo ./kill_node_in_storeconfigs_db.rb <hostname as stored in hosts table> require 'puppet/rails' Puppet[:config] = "/etc/puppet/puppet.conf" Puppet.parse_config pm_conf = Puppet.settings.instance_variable_get(:@values)[:puppetmasterd] adapter = pm_conf[:dbadapter] args = {:adapter => adapter, :log_level => pm_conf[:rails_loglevel]} case adapter when "sqlite3": args[:dbfile] = pm_conf[:dblocation] when "mysql", "postgresql": args[:host] = pm_conf[:dbserver] unless pm_conf[:dbserver].empty? args[:username] = pm_conf[:dbuser] unless pm_conf[:dbuser].empty? args[:password] = pm_conf[:dbpassword] unless pm_conf[:dbpassword].empty? args[:database] = pm_conf[:dbname] else raise ArgumentError, "Invalid db adapter %s" % adapter end ActiveRecord::Base.establish_connection(args) if @host = Puppet::Rails::Host.find_by_name(ARGV[0].strip) print "Killing #{ARGV[0]}..." $stdout.flush @host.destroy puts "done." else puts "Can't find host #{ARGV[0]}." end </end> Sure, I can do all this manually, but this is a feature request because its a little annoying and you forget all the pieces. -- 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.
