FAQ
I'm at a loss. I can't figure out how to get these wrong SSH keys out of PuppetDB. I might be able to replace the node's catalog using the PuppetDB Query API, but the syntax on how to create the command object to pass I can't figure out. I tried to connect directly to the HSQL DB, but I don't see any tables when I try that. Is my only recourse to blow away the whole PuppetDB to get this one stored config out?
On May 8, 2013, at 8:51 AM, Ti Leggett wrote:

What's the interface in to the PuppetDB? Can I manually go drop those rows?
On May 7, 2013, at 2:07 PM, Ti Leggett wrote:

I just tried this and ran the agent in noop and it still showed that the old, incorrect keys were going to be installed.
On May 7, 2013, at 2:02 PM, Deepak Giridharagopal wrote:

On Tue, May 7, 2013 at 12:59 PM, Ti Leggett wrote:
Man, how did this ticket not show up in any of the various google attempts I made at trying to find this very thing? However this doesn't seem to help my original problem which is to remove the stored configs. 'puppet node deactivate' just deactivates the node but the resources remain in the database such that when I re-run puppet on the node it tries to get those stored configs back because the node is then reactivated

Just remove the export "@@" declarations from the manifests that node is using...then the next catalog that is sent (the next time you re-run puppet on that node) won't have those resource in it, and thus won't be collected by any other nodes. We always overwrite a node's previous catalog with the new one.

deepak

.

On May 7, 2013, at 1:43 PM, Deepak Giridharagopal wrote:

On Tue, May 7, 2013 at 12:39 PM, Ti Leggett wrote:
I have a node that has some bad stored configs (namely the wrong ssh host keys) that I'm trying to clear out. Looking around it seems I'm supposed to do:

puppet node clean foo.example.com

However, that keeps bailing out because it's trying to open a SQLite3 db where stored configs are normally kept, but my stored configs are kept in puppetdb (http://pastie.org/7814483 for my master puppet.conf):

Debug: Using settings: adding file resource 'masterhttplog': 'File[/var/log/puppet/masterhttp.log]{:group=>"puppet", :loglevel=>:debug, :links=>:follow, :owner=>"puppet", :mode=>"660", :ensure=>:file, :backup=>false, :path=>"/var/log/puppet/masterhttp.log"}'
Debug: Using settings: adding file resource 'bucketdir': 'File[/var/lib/puppet/bucket]{:group=>"puppet", :loglevel=>:debug, :links=>:follow, :owner=>"puppet", :mode=>"750", :ensure=>:directory, :backup=>false, :path=>"/var/lib/puppet/bucket"}'
Debug: Using settings: adding file resource 'fileserverconfig': 'File[/etc/puppet/fileserver.conf]{:loglevel=>:debug, :links=>:follow, :ensure=>:file, :backup=>false, :path=>"/etc/puppet/fileserver.conf"}'
Debug: Using settings: adding file resource 'manifest': 'File[/etc/puppet/environments/production/manifests/site.pp]{:loglevel=>:debug, :links=>:follow, :ensure=>:file, :backup=>false, :path=>"/etc/puppet/environments/production/manifests/site.pp"}'
Debug: Using settings: adding file resource 'rest_authconfig': 'File[/etc/puppet/auth.conf]{:loglevel=>:debug, :links=>:follow, :ensure=>:file, :backup=>false, :path=>"/etc/puppet/auth.conf"}'
Debug: Using settings: adding file resource 'railslog': 'File[/var/log/puppet/rails.log]{:group=>"puppet", :loglevel=>:debug, :links=>:follow, :owner=>"puppet", :mode=>"600", :ensure=>:file, :backup=>false, :path=>"/var/log/puppet/rails.log"}'
Debug: Using settings: adding file resource 'yamldir': 'File[/var/lib/puppet/yaml]{:group=>"puppet", :loglevel=>:debug, :links=>:follow, :owner=>"puppet", :mode=>"750", :ensure=>:directory, :backup=>false, :path=>"/var/lib/puppet/yaml"}'
Debug: Using settings: adding file resource 'reportdir': 'File[/var/lib/puppet/reports]{:group=>"puppet", :loglevel=>:debug, :links=>:follow, :owner=>"puppet", :mode=>"750", :ensure=>:directory, :backup=>false, :path=>"/var/lib/puppet/reports"}'
Debug: Using settings: adding file resource 'server_datadir': 'File[/var/lib/puppet/server_data]{:group=>"puppet", :loglevel=>:debug, :links=>:follow, :owner=>"puppet", :mode=>"750", :ensure=>:directory, :backup=>false, :path=>"/var/lib/puppet/server_data"}'
Debug: Using settings: adding file resource 'dblocation': 'File[/var/lib/puppet/state/clientconfigs.sqlite3]{:group=>"puppet", :loglevel=>:debug, :links=>:follow, :owner=>"puppet", :mode=>"660", :ensure=>:file, :backup=>false, :path=>"/var/lib/puppet/state/clientconfigs.sqlite3"}'
Debug: Using settings: adding file resource 'manifestdir': 'File[/etc/puppet/manifests]{:loglevel=>:debug, :links=>:follow, :ensure=>:directory, :backup=>false, :path=>"/etc/puppet/manifests"}'
Debug: Finishing transaction 69920208130760
Info: Connecting to sqlite3 database: /var/lib/puppet/state/clientconfigs.sqlite3
Error: Could not find table 'hosts'
Error: Try 'puppet help node clean' for usage


'puppet config print all' lists the dbadapter as sqlite3 as well, even though it's not. I can't seem to figure out the new way to print the config in master mode though. Any ideas on how to clean this node up properly?

I believe this is captured in the following ticket:

http://projects.puppetlabs.com/issues/14721

Cheers,
deepak


--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to puppet-users+unsubscribe@googlegroups.com.
To post to this group, send email to puppet-users@googlegroups.com.
Visit this group at http://groups.google.com/group/puppet-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

Discussion Posts

Previous

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 7 of 8 | next ›
Discussion Overview
grouppuppet-users @
categoriespuppet
postedMay 7, '13 at 6:39p
activeMay 10, '13 at 6:41p
posts8
users2
websitepuppetlabs.com

People

Translate

site design / logo © 2022 Grokbase