Bug #4640
config_version being cached
| Status: | Duplicate | Start date: | 08/27/2010 | |
|---|---|---|---|---|
| Priority: | Normal | Due date: | ||
| Assignee: | - | % Done: | 0% |
|
| Category: | - | |||
| Target version: | - | |||
| Affected Puppet version: | 2.6.1rc3 | Branch: | ||
| Keywords: | ||||
| Votes: | 0 |
Description
Given the config:
[master]
config_version = /usr/local/bin/getrevision.sh
with getrevision.sh:
#!/bin/bash /bin/date
If I restart the master and run a client:
# /etc/init.d/puppetmaster restart Stopping puppetmaster: [ OK ] Starting puppetmaster: [ OK ] # date && puppetd --test Fri Aug 27 17:18:22 EDT 2010 info: Caching catalog for li190-90.members.linode.com info: Applying configuration version 'Fri Aug 27 17:18:24 EDT 2010'
That’s all fine, now wait a while and run the agent again:
# date && puppetd --test Fri Aug 27 17:19:09 EDT 2010 info: Caching catalog for li190-90.members.linode.com info: Applying configuration version 'Fri Aug 27 17:18:24 EDT 2010'
the version doesn’t change, seems to be cached.
I tried to get someone to verify this but couldnt track someone down.
Related issues
History
Updated by Alan Barrett over 1 year ago
I think this is deliberate. If you change one of the manifests, then the master will notice and the config_version will change. Unfortunately, changing a file that is referenced by “file { … source => …}” does not update the version (see bug #3692). I am not sure whether changing one of the extlookup csv files will update the config_version
Updated by R.I. Pienaar over 1 year ago
Alan Barrett wrote:
I think this is deliberate. If you change one of the manifests, then the master will notice and the config_version will change. Unfortunately, changing a file that is referenced by “file { … source => …}” does not update the version (see bug #3692). I am not sure whether changing one of the extlookup csv files will update the config_version
Yeah, this seems to be the case. It would be more useful if it got ran on every run I’d say.
Happy for this to be marked a dupe of #3692
Updated by Markus Roberts over 1 year ago
- Status changed from Unreviewed to Duplicate
The reason for not having it update every run is we want, as near as possible, to have distinct config versions correspond to distinct catalogs; if the config versions are the same you know that the catalogs are the same. The utility of this is diminished if the versions update without an underlying change.
Updated by R.I. Pienaar over 1 year ago
I understand the reason behind it, but it doesn’t work – as per the associated bug. The limitation was also pointed out in #2441 its not clear if testing was completed, the existence of the bug suggests it wasnt.
Additionally I think putting arbitrary restrictions on what users can do just doesn’t make sense – puppet is a framework there to enable us to build what we want with it, arbitrary restrictions doesn’t achieve that goal.
As for the utility of this feature, I think the most used case would be to retrieve something like SVN revision of the checked out code on the master. This seems to be what I see most on IRC etc, so I don’t think the utility of the option would be diminished. I think the utility of the option is diminished by the mere fact that it has this restriction on it because it limits what people can do.