5

When I run

sudo puppet agent -t

after a long phase of catalog loading, I get a message:

info: Applying configuration version '1403590182'

What is that number 1403590182 referring to?

In fact I have noticed that if I run twice in a row sudo puppet agent -t, I get different configuration version numbers even if the modules have not changed!

How can I determine which version of each module is being applied to the node?

Henrik Andersson
  • 45,354
  • 16
  • 98
  • 92
Pierluigi Vernetto
  • 1,954
  • 1
  • 25
  • 27
  • 3
    Note that [this bug report](https://tickets.puppetlabs.com/browse/PUP-2729) indicates that the version normally is stable. However, if your manifests or templates use facts such as `$uptime`, `$memoryfree`, the catalog is prone differ upon each agent checkin. – Felix Frank Jun 24 '14 at 08:06
  • 1
    thanks Felix, so I guess this information is as well as useless, and can be safely ignored, and leaves us clueless if we want to identify exactly which configuration is being applied. In the era of git hashes, one would expect the Puppet Founding fathers to come up with something a bit more deterministic... – Pierluigi Vernetto Jul 13 '14 at 18:39
  • 1
    The bug is actually quite long standing (see link to earlier Redmine Tickets) and, well...there's issues :-) – Felix Frank Jul 14 '14 at 06:38

2 Answers2

1

from the documentation config_version

How to determine the configuration version. By default, it will be the time that the configuration is parsed, but you can provide a shell script to override how the version is determined. The output of this script will be added to every log message in the reports, allowing you to correlate changes on your hosts to the source version on the server.

Setting a global value for config_version in puppet.conf is not allowed (but it can be overridden from the commandline). Please set a per-environment value in environment.conf instead. For more info, see https://puppet.com/docs/puppet/latest/environments_about.html

The time is represented as a unix time stamp as such yours indicates "06/24/2014 @ 6:09am" (and i just realised how old this Q was)

balder
  • 734
  • 5
  • 12
0

If the manifests are git controlled the administrator can let the Puppet master know how to describe the version with the statement below in /etc/puppet/puppet.conf (on the Puppet master). One such statement goes in each environment section with the path adjusted to where the environment looks for manifests.

  config_version = git --git-dir $confdir/modules/production/.git describe --all --long

If you use some other version control system i'm sure there's some equivalent command to get an indication of the revision.

Gwenc37
  • 2,064
  • 7
  • 18
  • 22