{"id":230,"date":"2012-03-13T08:23:06","date_gmt":"2012-03-13T12:23:06","guid":{"rendered":"http:\/\/blog.domb.net\/?p=230"},"modified":"2012-03-13T08:26:27","modified_gmt":"2012-03-13T12:26:27","slug":"cleaning-host-entry-from-mysql-db-in-2-7-11-2","status":"publish","type":"post","link":"https:\/\/blog.domb.net\/?p=230","title":{"rendered":"Cleaning a host entry from MySQL DB with puppet 2.7.11-2"},"content":{"rendered":"<p>Yesterday I&#8217;ve had to clean up a host from the storeconfig mysql database. I ran the puppetstoredconfigclean.rb script and bumped into the following documented Bug http:\/\/projects.puppetlabs.com\/issues\/12405 which will be fixed in version <strong>2.7.12<\/strong>:<\/p>\n<p><em><strong># .\/puppetstoredconfigclean.rb\u00a0 kvm0.domb.net<\/strong><\/em><\/p>\n<p>###################################################################<\/p>\n<p>\/usr\/lib\/ruby\/site_ruby\/1.8\/rubygems\/custom_require.rb:31:in `gem_original_require&#8217;: no such file to load &#8212; sqlite3 (MissingSourceFile)<br \/>\nfrom \/usr\/lib\/ruby\/site_ruby\/1.8\/rubygems\/custom_require.rb:31:in `require&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activesupport-2.1.1\/lib\/active_support\/dependencies.rb:510:in `require&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activesupport-2.1.1\/lib\/active_support\/dependencies.rb:355:in `new_constants_in&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activesupport-2.1.1\/lib\/active_support\/dependencies.rb:510:in `require&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activesupport-2.1.1\/lib\/active_support\/core_ext\/kernel\/requires.rb:7:in `require_library_or_gem&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activesupport-2.1.1\/lib\/active_support\/core_ext\/kernel\/reporting.rb:11:in `silence_warnings&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activesupport-2.1.1\/lib\/active_support\/core_ext\/kernel\/requires.rb:5:in `require_library_or_gem&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activerecord-2.1.1\/lib\/active_record\/connection_adapters\/sqlite3_adapter.rb:10:in `sqlite3_connection&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activerecord-2.1.1\/lib\/active_record\/connection_adapters\/abstract\/connection_specification.rb:292:in `send&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activerecord-2.1.1\/lib\/active_record\/connection_adapters\/abstract\/connection_specification.rb:292:in `connection=&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activerecord-2.1.1\/lib\/active_record\/connection_adapters\/abstract\/connection_specification.rb:260:in `retrieve_connection&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activerecord-2.1.1\/lib\/active_record\/connection_adapters\/abstract\/connection_specification.rb:78:in `connection&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activerecord-2.1.1\/lib\/active_record\/base.rb:1149:in `columns&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activerecord-2.1.1\/lib\/active_record\/base.rb:1162:in `column_names&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activerecord-2.1.1\/lib\/active_record\/base.rb:1175:in `column_methods_hash&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activerecord-2.1.1\/lib\/active_record\/base.rb:1719:in `all_attributes_exists?&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/site_ruby\/1.8\/rubygems\/custom_require.rb:31:in `all?&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activerecord-2.1.1\/lib\/active_record\/base.rb:1719:in `each&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activerecord-2.1.1\/lib\/active_record\/base.rb:1719:in `all?&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activerecord-2.1.1\/lib\/active_record\/base.rb:1719:in `all_attributes_exists?&#8217;<br \/>\nfrom \/usr\/lib\/ruby\/gems\/1.8\/gems\/activerecord-2.1.1\/lib\/active_record\/base.rb:1618:in `method_missing&#8217;<br \/>\nfrom .\/puppetstoredconfigclean.rb:93<br \/>\nfrom .\/puppetstoredconfigclean.rb:92:in `each&#8217;<br \/>\nfrom .\/puppetstoredconfigclean.rb:92<\/p>\n<p>###################################################################<\/p>\n<p>If you want to fix the puppetstoredconfigclean.rb script in <strong>2.7.11-2<\/strong> apply &#8220;Frederik Wagner&#8221; patch.<\/p>\n<p>http:\/\/projects.puppetlabs.com\/attachments\/1781\/0001-puppet-settings-have-to-be-parsed.patch<\/p>\n<p>Thanks to &#8220;Frederik Wagner&#8221; for saving me a lot of time \ud83d\ude42<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Yesterday I&#8217;ve had to clean up a host from the storeconfig mysql database. I ran the puppetstoredconfigclean.rb script and bumped into the following documented Bug http:\/\/projects.puppetlabs.com\/issues\/12405 which will be fixed in version 2.7.12: # .\/puppetstoredconfigclean.rb\u00a0 kvm0.domb.net ################################################################### \/usr\/lib\/ruby\/site_ruby\/1.8\/rubygems\/custom_require.rb:31:in `gem_original_require&#8217;: no such file to load &#8212; sqlite3 (MissingSourceFile) from \/usr\/lib\/ruby\/site_ruby\/1.8\/rubygems\/custom_require.rb:31:in `require&#8217; from \/usr\/lib\/ruby\/gems\/1.8\/gems\/activesupport-2.1.1\/lib\/active_support\/dependencies.rb:510:in `require&#8217; from \/usr\/lib\/ruby\/gems\/1.8\/gems\/activesupport-2.1.1\/lib\/active_support\/dependencies.rb:355:in&#8230;<\/p>\n","protected":false},"author":2,"featured_media":166,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_themeisle_gutenberg_block_has_review":false,"footnotes":""},"categories":[6],"tags":[],"class_list":["post-230","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-puppet"],"_links":{"self":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/230","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=230"}],"version-history":[{"count":4,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/230\/revisions"}],"predecessor-version":[{"id":233,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/posts\/230\/revisions\/233"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=\/wp\/v2\/media\/166"}],"wp:attachment":[{"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=230"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=230"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.domb.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=230"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}