Issue #2441 has been updated by Jeff McCune.

Status changed from Closed to Re-opened
Assigned to changed from James Turnbull to Luke Kanies
Priority changed from Normal to High

I don't believe this is a problem with my setup.  My test case is trivial.

The config_version callout script I'm using is:
<pre>
#!/bin/bash
#
cat /tmp/version.txt
date > /tmp/config_version.lastrun
</pre>

I'm starting the master with:
<pre>
[jmcc...@homer]~/dev/puppet/scripts% sudo bash -x ./puppetmaster-blank 
--masterport 8150 --config_version /tmp/config_version_test
+ export 
PATH=/asp/home/jmccune/dev/reductivelabs.com/puppet/sbin:/asp/home/jmccune/dev/reductivelabs.com/puppet/bin:/asp/home/jmccune/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin
+ 
PATH=/asp/home/jmccune/dev/reductivelabs.com/puppet/sbin:/asp/home/jmccune/dev/reductivelabs.com/puppet/bin:/asp/home/jmccune/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin
+ export RUBYLIB=/asp/home/jmccune/dev/reductivelabs.com/puppet/lib:
+ RUBYLIB=/asp/home/jmccune/dev/reductivelabs.com/puppet/lib:
+ puppetmasterd --verbose --no-daemonize --vardir=/tmp/puppet/var 
--confdir=/tmp/puppet/conf --masterport 8150 --config_version 
/tmp/config_version_test
notice: Starting Puppet server version 0.25.0
</pre>

The code I'm running against is:
<pre>
[jmcc...@homer]~/dev/reductivelabs.com/puppet/lib% git show HEAD
commit 09357a585b043b3e680591647da6e3f6238a7cbb
Author: Luke Kanies <[email protected]>
Date:   Fri Jul 24 00:33:55 2009 -0700

    Logging the configuration version we're applying

    This is just an additional info log in the transaction,
    and is only done if the version is non-nil.

    Signed-off-by: Luke Kanies <[email protected]>
</pre>

I run puppetd (First run) with:
<pre>
[r...@chase]~/dev/reductivelabs.com/puppet/sbin# ./puppetd --confdir 
/tmp/puppet/conf --vardir /tmp/puppet/var --masterport 8150 --server 
puppet.service.asp.ntst.private --test
info: Caching catalog for chase.asp.ntst.private
info: Applying configuration version '1'
notice: Finished catalog run in 0.03 seconds
</pre>

After the first run, I update the version and check the last time the script 
was executed for comparison:
<pre>
[jmcc...@homer]~% echo 2 >/tmp/version.txt
[jmcc...@homer]~% cat /tmp/config_version.lastrun
Sun Aug  2 10:03:50 EDT 2009
</pre>

I then run puppetd on my test station a second time.  Note the configuration 
version of 1.
<pre>
[r...@chase]~/dev/reductivelabs.com/puppet/sbin# ./puppetd --confdir 
/tmp/puppet/conf --vardir /tmp/puppet/var --masterport 8150 --server 
puppet.service.asp.ntst.private --test
info: Caching catalog for chase.asp.ntst.private
info: Applying configuration version '1'
notice: Finished catalog run in 0.03 seconds
</pre>

The timestamp has not changed:
<pre>
[jmcc...@homer]~% cat /tmp/config_version.lastrun
Sun Aug  2 10:03:50 EDT 2009
</pre>

The server did recompile the catalog (All of puppetmasterd's output is shown to 
indicate both connections from the client.)
<pre>
notice: Starting Puppet server version 0.25.0
info: Inserting default '~ ^/catalog/([^/]+)$'(auth) acl because none were 
found in 'no auth.conf file configured'
info: Inserting default '/file'(non-auth) acl because none were found in 'no 
auth.conf file configured'
info: Inserting default '/certificate_revocation_list/ca'(auth) acl because 
none were found in 'no auth.conf file configured'
info: Inserting default '/report'(auth) acl because none were found in 'no 
auth.conf file configured'
info: Inserting default '/certificate/ca'(non-auth) acl because none were found 
in 'no auth.conf file configured'
info: Inserting default '/certificate/'(non-auth) acl because none were found 
in 'no auth.conf file configured'
info: Inserting default '/certificate_request'(non-auth) acl because none were 
found in 'no auth.conf file configured'
info: Expiring the node cache of chase.asp.ntst.private
info: Not using expired node for chase.asp.ntst.private from cache; expired at 
Sun Aug 02 10:02:50 -0400 2009
info: Caching node for chase.asp.ntst.private
notice: Compiled catalog for chase.asp.ntst.private in 0.14 seconds
info: Expiring the node cache of chase.asp.ntst.private
info: Not using expired node for chase.asp.ntst.private from cache; expired at 
Sun Aug 02 10:04:59 -0400 2009
info: Caching node for chase.asp.ntst.private
notice: Compiled catalog for chase.asp.ntst.private in 0.01 seconds
</pre>

If I manually run the script, I get the expected version:
<pre>
[jmcc...@homer]~% /tmp/config_version_test
2
[jmcc...@homer]~% cat /tmp/config_version.lastrun
Sun Aug  2 10:08:28 EDT 2009
</pre>

Run the client a third time, still get '1':
<pre>
[r...@chase]~/dev/reductivelabs.com/puppet/sbin# date;./puppetd --confdir 
/tmp/puppet/conf --vardir /tmp/puppet/var --masterport 8150 --server 
puppet.service.asp.ntst.private --test
Sun Aug  2 10:08:24 EDT 2009
info: Caching catalog for chase.asp.ntst.private
info: Applying configuration version '1'
notice: Finished catalog run in 0.03 seconds
</pre>

Update the version to 3, then restart the server using the exact same options, 
and I get back '3'.
<pre>
[r...@chase]~/dev/reductivelabs.com/puppet/sbin# date;./puppetd --confdir 
/tmp/puppet/conf --vardir /tmp/puppet/var --masterport 8150 --server 
puppet.service.asp.ntst.private --test
Sun Aug  2 10:09:21 EDT 2009
info: Caching catalog for chase.asp.ntst.private
info: Applying configuration version '3'
notice: Finished catalog run in 0.03 seconds
</pre>

I really believe puppetmasterd is not refreshing the version information when 
it should.

Have you tested multiple client runs with a changing version in this manner?
----------------------------------------
Feature #2441: Configuration version information should propagate through to 
the logs
http://projects.reductivelabs.com/issues/2441

Author: Luke Kanies
Status: Re-opened
Priority: High
Assigned to: Luke Kanies
Category: plumbing
Target version: 0.25.0
Complexity: Unknown
Affected version: 0.24.8
Keywords: 


Puppet has internally supported the concept of a configuration version for a 
long time, but it has been completely unused.

We should provide the ability to set that version information from external 
sources, like a version control repository, and it should propagate all the way 
to the log messages, so that people can correlate logs they receive in reports 
to the code that resulted in them.

As with the #2440, this is a relatively small feature and someone has asked for 
it quite nicely, so it'd be nice to have this in 0.25, but only if others think 
so.

This should eventually largely get displaced by better event management, but 
that's likely to wait until 0.26.


-- 
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://reductivelabs.com/redmine/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
-~----------~----~----~----~------~----~------~--~---

Reply via email to