Jira (PUP-2729) reevaluate config_version whenever an agent checks in.

2 views
Skip to first unread message

Owen Rodabaugh (JIRA)

unread,
May 11, 2015, 7:25:24 PM5/11/15
to puppe...@googlegroups.com
Owen Rodabaugh updated an issue
 
Puppet / Bug PUP-2729
reevaluate config_version whenever an agent checks in.
Change By: Owen Rodabaugh
CS Priority: Minor
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v6.3.15#6346-sha1:dbc023d)
Atlassian logo

Zack Smith (JIRA)

unread,
Jun 1, 2015, 4:06:06 AM6/1/15
to puppe...@googlegroups.com

Henrik Lindberg (JIRA)

unread,
Jun 1, 2015, 10:39:09 AM6/1/15
to puppe...@googlegroups.com

it is the TypeCollection that makes use of the config_version. If no script is configured it uses the current time (at the point when someone asks the TypeCollection for its version). Thus, when something decides to evict the type collection (before directory environments when a watched file being updated, and after directory environments, only when the environment times out) the type collection gets a new version. With directory environments there is no watching of files.

Environment caching does not take config_version into account afaict - it is only based on the "time to live" and the creation time of the environment. Maybe it should also run the config_version script.

I could be wrong, and that there are other code paths that make use of the script/version. There is no good specification, and spec tests does not make it clear what the expected behavior is.

The business feature "auditability" is quite complex as it implies that there is a guarantee (as in 100% certain) that the produced content has a particular version. Due to the asynchronous nature and that any file can change at any time makes it is impossible to guarantee. Thus, if we simply reevaluate the config_version script for each environment cache expiry check (happens for each compilation), we would create a new version every time if there is no script (since it is time base by default), and it would be as good as the script checking if there is a new version otherwise. Since there is no locking, as soon as the script has been evaluated a file may change and that would go unnoticed until the next request. In order to work correctly with a guarantee worth anything, we would need more drastic changes as in having a "walled garden" into which changes are "pushed" (i.e. the server knows exactly when changes occur without having to run extremely slow (lots of file stats) and using a myriad of locks). A simple "a file changed"-strategy is not good enough as it can cause problems with using an (undetected) mix of versions.

Russell Mull (JIRA)

unread,
May 16, 2017, 1:07:06 PM5/16/17
to puppe...@googlegroups.com
Russell Mull updated an issue
 
Change By: Russell Mull
Labels: redmine  triaged
This message was sent by Atlassian JIRA (v6.4.14#64029-sha1:ae256fe)
Atlassian logo

Branan Riley (JIRA)

unread,
May 16, 2017, 1:08:11 PM5/16/17
to puppe...@googlegroups.com
Branan Riley commented on Bug PUP-2729
 
Re: reevaluate config_version whenever an agent checks in.

With r10k/code manager, and the ability to call out to set config_version to the current git SHA using environment.conf, is this ticket still relevant?

Moses Mendoza (JIRA)

unread,
May 18, 2017, 1:49:09 PM5/18/17
to puppe...@googlegroups.com
Moses Mendoza updated an issue
 
Change By: Moses Mendoza
Labels: redmine  triaged

Jacob Helwig (JIRA)

unread,
Dec 7, 2017, 5:14:03 PM12/7/17
to puppe...@googlegroups.com
Jacob Helwig updated an issue
Change By: Jacob Helwig
Sub-team: Coremunity
This message was sent by Atlassian JIRA (v7.0.2#70111-sha1:88534db)
Atlassian logo

Josh Cooper (Jira)

unread,
Feb 16, 2021, 3:32:03 PM2/16/21
to puppe...@googlegroups.com
Josh Cooper commented on Bug PUP-2729
 
Re: reevaluate config_version whenever an agent checks in.

As Branan Riley mentioned, r10k has functionality to do this exact thing, see https://github.com/voxpupuli/puppet-r10k/blob/master/files/config_version.sh so that the git sha for the environment is added to the catalog, and that will work for any file served from a module. As a result I'm going to close this.

This message was sent by Atlassian Jira (v8.5.2#805002-sha1:a66f935)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages