Page MenuHomePhabricator

Use git commit id as "configuration version" for puppet
Closed, ResolvedPublic

Description

While researching how to reduce puppet alerts noise in T228379: Improve our alerting capabilities (Q1 goal FY19-20) I realized instructing puppet master to use git hash as configuration version (i.e. via config_version if I'm not mistaken). Exporting this value as a metric on hosts will let us e.g. catch hosts not running latest version of puppet.git and track rollouts/deployments in dashboards.

TODO:

  • verify the version is fine not to be incremental
  • verify potential source of cardinality explosion, if we're putting the version/tag in a metric

Event Timeline

herron triaged this task as Medium priority.Jul 26 2019, 4:29 PM

I think this is a really good idea. further after a bit of investigation i think any arbitrary string can be used. Later versions of the puppet documentation even use git rev-parse as an example command. also r10k has a script in there repo which has the sha1, git server and last git log message as the version

https://github.com/voxpupuli/puppet-r10k/blob/master/files/config_version.sh

Change 547505 had a related patch set uploaded (by Jbond; owner: John Bond):
[operations/puppet@production] puppet git: add a descriptive config version

https://gerrit.wikimedia.org/r/547505

Change 547506 had a related patch set uploaded (by Jbond; owner: John Bond):
[operations/puppet@production] motd: add the config version to the MOTD

https://gerrit.wikimedia.org/r/547506

Change 547505 merged by Jbond:
[operations/puppet@production] puppet git: add a descriptive config version

https://gerrit.wikimedia.org/r/547505

Change 547506 merged by Jbond:
[operations/puppet@production] motd: add the config version to the MOTD

https://gerrit.wikimedia.org/r/547506

Change 548720 had a related patch set uploaded (by Jbond; owner: John Bond):
[operations/puppet@production] motd: correct awk format

https://gerrit.wikimedia.org/r/548720

Change 548720 merged by Jbond:
[operations/puppet@production] motd: correct awk format

https://gerrit.wikimedia.org/r/548720

jbond claimed this task.

Think this is complete now

Change 548743 had a related patch set uploaded (by Ema; owner: Ema):
[operations/puppet@production] motd: avoid printing double quotes and fix typo

https://gerrit.wikimedia.org/r/548743

Change 548743 merged by Ema:
[operations/puppet@production] motd: avoid printing double quotes and fix typo

https://gerrit.wikimedia.org/r/548743