-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Just thought I''d call the lists attention to a feature that we missed documenting for the 0.25.0 release. A new configuration option, config_version, is now available: config_version = /usr/local/bin/return_version The option allows you to specify a command that returns a version for the configuration that is being applied to your hosts. The command should return a string, such as a version number or name. Puppet then runs this command at compile time. Each resource is marked with the value returned from this command. This value is also added to the log instance, serialised and sent along with any report generated. This allows you to parse your report output and ascertain which configuration version was used to generate the resource. http://reductivelabs.com/trac/puppet/wiki/ReleaseNotes#configuration-versioning Regards James Turnbull - -- Author of: * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin) * Pulling Strings with Puppet (http://tinyurl.com/pupbook) * Pro Nagios 2.0 (http://tinyurl.com/pronagios) * Hardening Linux (http://tinyurl.com/hardeninglinux) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEVAwUBStA3tSFa/lDkFHAyAQK2Rwf/ZZ36y+2A3p3Y+fkMPTGHqSF/OxK8rmfr gQ9KAgSxdLHQt4+VmE4LKM1HMOmRoIJo7jthFDdp0MRveOxDycJEdKkhSNOHyAsF EhlgONMo4T36cBPb1zJSi6yhFkdOSxkn8Q623zRR/P3crUfWMf/xNMzabmCB2zy0 LKRrW6CzqwPtlSr3ye9Ysiqqpf+rZuRjNgUliqVTfSuBD2PETTGKpHXri2DZ39lB /+Qe0fyc+GhN3plobEUpHaadpf9YOtnIpL97RthMDvyHCrQKD3eRHey+C3o0EfZg kAcPJb+Y9qJ/ZLK86nhte+5BLwJEwJcvJea2NXtvBqeaDvHqHMveVQ==vSOU -----END PGP SIGNATURE----- --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
I was looking at this option last nigh and perhaps I''m just dense, but I''m not sure how it will benefit me. In theory, I know which version I have in production/testing/dev by which subversion/git tag I have checked out on the master. Am I missing the point? Can someone provide an example when this would be useful? On Oct 10, 2009, at 2:29 AM, James Turnbull <james@lovedthanlost.net> wrote:> > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Just thought I''d call the lists attention to a feature that we > missed documenting for the 0.25.0 release. > > A new configuration option, config_version, is now available: > > config_version = /usr/local/bin/return_version > > The option allows you to specify a command that returns a version > for the configuration that is being applied to your hosts. The > command should return a string, such as a version number or name. > > Puppet then runs this command at compile time. Each resource is > marked with the value returned from this command. This value is also > added to the log instance, serialised and sent along with any report > generated. This allows you to parse your report output and ascertain > which configuration version was used to generate the resource. > > http://reductivelabs.com/trac/puppet/wiki/ReleaseNotes#configuration-versioning > > Regards > > James Turnbull > > - -- > Author of: > * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin) > * Pulling Strings with Puppet (http://tinyurl.com/pupbook) > * Pro Nagios 2.0 (http://tinyurl.com/pronagios) > * Hardening Linux (http://tinyurl.com/hardeninglinux) > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (Darwin) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ > > iQEVAwUBStA3tSFa/lDkFHAyAQK2Rwf/ZZ36y+2A3p3Y+fkMPTGHqSF/OxK8rmfr > gQ9KAgSxdLHQt4+VmE4LKM1HMOmRoIJo7jthFDdp0MRveOxDycJEdKkhSNOHyAsF > EhlgONMo4T36cBPb1zJSi6yhFkdOSxkn8Q623zRR/P3crUfWMf/xNMzabmCB2zy0 > LKRrW6CzqwPtlSr3ye9Ysiqqpf+rZuRjNgUliqVTfSuBD2PETTGKpHXri2DZ39lB > /+Qe0fyc+GhN3plobEUpHaadpf9YOtnIpL97RthMDvyHCrQKD3eRHey+C3o0EfZg > kAcPJb+Y9qJ/ZLK86nhte+5BLwJEwJcvJea2NXtvBqeaDvHqHMveVQ=> =vSOU > -----END PGP SIGNATURE----- > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
hello,> A new configuration option, config_version, is now available: > > config_version = /usr/local/bin/return_version > > The option allows you to specify a command that returns a version > for the configuration that is being applied to your hosts. The > command should return a string, such as a version number or name. > > Puppet then runs this command at compile time. Each resource is > marked with the value returned from this command. This value is also > added to the log instance, serialised and sent along with any report > generated. This allows you to parse your report output and ascertain > which configuration version was used to generate the resource.I don''t think this is working too hot, if i set it to: config_version = /bin/date it works, i get the message: info: Applying configuration version ''Sat Oct 10 17:53:33 BST 2009'' If i set it to a script - bash script, executable by puppet user etc - that runs /bin/date i get '''' But that aside, I question the usefulness - reports getting tagged with this information, that''s just not happening in a way thats useful at all, the only place where this shows up is in Puppet::Util::Log instance for the line above and its in the middle of the string in a way that hard to get it out. See http://pastie.org/649615 for such a report. Much more useful would have been say a property on the main Puppet::Transaction::Report object for the version applied, or even just in syslog if the logs would get tagged with this on each log entry since the ''Applying configuration version'' message above only show up in for example --test not in normal use. I think it has potential for being useful. For instance if I''ve just pushed out a new revision of my code I might wait 30 minutes and quickly run through the last reports received and check the version property and report any machines that dont have the new code, or my reporting app could checks whats the manifest revision and report on any nodes not yet on that version. The current implimentation force us to do this by running through an array of Puppet::Util::Log objects and doing regex matching on the ''message'' property - that just isn''t useful. -- R.I.Pienaar --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---
This feature (which prob needs some more work) allows the system to keep track of all of the changes that have occurred and how they relate to puppet manifest versions. I am doing the following in a custom report if report is related to a new puppet code release - log it under that code release else if it is related to some unexpected event (prob a user changed a file or its a manifest bug) - send an email determining how puppet reports relate to code versions can be unreliable. You can only know the code version when the custom report runs and not when the puppet agent runs. This means that the version that you can capture is not necessarily correct. This feature takes care of that problem by saving code version at puppet agent runtime. Of coarse there are other hackish ways to correlate puppet agent runtimes with correct versioning, but it would be difficult to argue that they are better than this implementation. On Sat, Oct 10, 2009 at 6:19 PM, Carl.caum <carl.caum@gmail.com> wrote:> I was looking at this option last nigh and perhaps I''m just dense, but > I''m not sure how it will benefit me. In theory, I know which version I > have in production/testing/dev by which subversion/git tag I have > checked out on the master. Am I missing the point? Can someone provide > an example when this would be useful? > > > On Oct 10, 2009, at 2:29 AM, James Turnbull <james@lovedthanlost.net> > wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Just thought I''d call the lists attention to a feature that we > missed documenting for the 0.25.0 release. > > A new configuration option, config_version, is now available: > > config_version = /usr/local/bin/return_version > > The option allows you to specify a command that returns a version > for the configuration that is being applied to your hosts. The > command should return a string, such as a version number or name. > > Puppet then runs this command at compile time. Each resource is > marked with the value returned from this command. This value is also > added to the log instance, serialised and sent along with any report > generated. This allows you to parse your report output and ascertain > which configuration version was used to generate the resource. > > > http://reductivelabs.com/trac/puppet/wiki/ReleaseNotes#configuration-versioning > > Regards > > James Turnbull > > - -- > Author of: > * Pro Linux Systems Administration (http://tinyurl.com/linuxadmin) > * Pulling Strings with Puppet (http://tinyurl.com/pupbook) > * Pro Nagios 2.0 (http://tinyurl.com/pronagios) > * Hardening Linux (http://tinyurl.com/hardeninglinux) > > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v1.4.7 (Darwin) > Comment: Using GnuPG with Mozilla - <http://enigmail.mozdev.org/> > http://enigmail.mozdev.org/ > > iQEVAwUBStA3tSFa/lDkFHAyAQK2Rwf/ZZ36y+2A3p3Y+fkMPTGHqSF/OxK8rmfr > gQ9KAgSxdLHQt4+VmE4LKM1HMOmRoIJo7jthFDdp0MRveOxDycJEdKkhSNOHyAsF > EhlgONMo4T36cBPb1zJSi6yhFkdOSxkn8Q623zRR/P3crUfWMf/xNMzabmCB2zy0 > LKRrW6CzqwPtlSr3ye9Ysiqqpf+rZuRjNgUliqVTfSuBD2PETTGKpHXri2DZ39lB > /+Qe0fyc+GhN3plobEUpHaadpf9YOtnIpL97RthMDvyHCrQKD3eRHey+C3o0EfZg > kAcPJb+Y9qJ/ZLK86nhte+5BLwJEwJcvJea2NXtvBqeaDvHqHMveVQ=> =vSOU > -----END PGP SIGNATURE----- > > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com To unsubscribe from this group, send email to puppet-users+unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en -~----------~----~----~----~------~----~------~--~---