Puppet: System Administration Automated

Support

Ticket #786 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

exported resources not refreshed

Reported by: vvidic Assigned to: luke
Priority: normal Milestone: misspiggy
Component: server Version: 0.23.2
Severity: normal Keywords: puppetmaster, rails, stored configs
Cc: Triage Stage: Needs design decision
Attached Patches: None Complexity: Unknown

Description

It seems that not all exported resources are always collected. Consider the following scenario with two nodes:

  • clear the storeconfig database
  • node1 exports node1 key, configures node1 key
  • node2 exports node2 key, configures node1 and node2 keys
  • node1 exports node1 key, configures node1 key

It seems that puppetmaster uses a cached configuration for node1 and doesn't notice there is a new exported resource to be configured. If I touch some of the manifest files or restart puppetmaster than a new configuration is generated for node1 and both keys get configured.

Attachments

freshness.diff (0.8 kB) - added by vvidic on 08/23/07 19:36:10.
Add check for recently exported virtual resources to Master.freshness

Change History

08/23/07 17:57:25 changed by vvidic

  • keywords set to puppetmaster, rails, stored configs.
  • version set to 0.23.1.

08/23/07 18:50:21 changed by vvidic

  • version changed from 0.23.1 to 0.23.2.
  • component changed from library to server.

08/23/07 19:36:10 changed by vvidic

  • attachment freshness.diff added.

Add check for recently exported virtual resources to Master.freshness

09/06/07 19:17:38 changed by michael

  • stage changed from Unreviewed to Needs design decision.
  • milestone set to elmo.

11/24/07 03:02:14 changed by luke

  • status changed from new to assigned.
  • milestone changed from elmo to misspiggy.

11/24/07 03:09:39 changed by luke

Note that womble has provided a modification to this patch:

Tue Oct 30 14:43:05 EST 2007  Matt Palmer <mpalmer@hezmatt.org>
  * ActiveRecord is capable of quoting things as it needs to, TYVM
diff -rN -u old-puppet-0.23.2/debian/changelog new-puppet-0.23.2/debian/changelog
--- old-puppet-0.23.2/debian/changelog  2007-11-21 12:22:01.802805207 +1100
+++ new-puppet-0.23.2/debian/changelog  2007-11-21 12:22:01.874809853 +1100
@@ -1,3 +1,9 @@
+puppet (0.23.2-13) unstable; urgency=low
+
+  * Drop quotes from an already-quoted value in a query.  Closes: #448179.
+
+ -- Matthew Palmer <mpalmer@debian.org>  Tue, 30 Oct 2007 14:40:09 +1100
+
 puppet (0.23.2-12) unstable; urgency=low

   * Create /var/run/puppet and set the perms in the various initscripts, as
diff -rN -u old-puppet-0.23.2/lib/puppet/network/handler/master.rb new-puppet-0.23.2/lib/puppet/network/handler/master.rb
--- old-puppet-0.23.2/lib/puppet/network/handler/master.rb  2007-11-21 12:22:01.802805207 +1100
+++ new-puppet-0.23.2/lib/puppet/network/handler/master.rb  2007-11-21 12:22:01.822806498 +1100
@@ -78,7 +78,7 @@

                 # check for recently exported virtual resources
                 resource = Puppet::Rails::Resource.find_by_exported(
-                    ActiveRecord::Base.connection.quote(true),
+                    true,
                     :order      => "updated_at DESC",
                     :limit      => 1
                 )

11/26/07 01:25:14 changed by luke

  • status changed from assigned to closed.
  • resolution set to fixed.

I've applied womble's patch as part of the collection of his patches.