Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch cache type on client version #328

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

benburry
Copy link

With the change introduced in #312 this
module switches the fact cache type if the puppetserver it's running
against is v7 or greater; in that situation it will use the puppetserver
v7 default of json for the fact cache format.

Unfortunately this opens up the possibility that while the server a
puppet-agent is running against might be v7, the agent and the server it's
running to configure might not be. Specifically, we hit a situation
where a server hosting puppetserver 5 was running puppet-agent against
another puppetserver on version 7 (this was for the purposes of a
version rollout), with the result that this module configured the
puppetserver v5 with a fact cache format of json, signalling the
puppetserver v5 to restart and meaning it failed during startup.

I think the intention of the original change was to switch its behaviour
based on the version of puppetserver it's configuring, and not
necessarily the version of puppetserver it's running against. Given the
puppetserver compatibility requirements I believe it's safe to use the
puppet-agent version as an analogue for the local puppetserver version,
so here I'm using the clientversion fact to replace serverversion.

With the change introduced in puppetlabs#312 this
module switches the fact cache type if the puppetserver it's running
against is v7 or greater; in that situation it will use the puppetserver
v7 default of `json` for the fact cache format.

Unfortunately this opens up the possibility that while the server a
puppet-agent is running against might be v7, the agent and the server it's
running to configure might not be. Specifically, we hit a situation
where a server hosting puppetserver 5 was running puppet-agent against
another puppetserver on version 7 (this was for the purposes of a
version rollout), with the result that this module configured the
puppetserver v5 with a fact cache format of `json`, signalling the
puppetserver v5 to restart and meaning it failed during startup.

I think the intention of the original change was to switch its behaviour
based on the version of puppetserver it's configuring, and not
necessarily the version of puppetserver it's running against. Given the
puppetserver compatibility requirements I believe it's safe to use the
puppet-agent version as an analogue for the local puppetserver version,
so here I'm using the `clientversion` fact to replace `serverversion`.
@benburry benburry requested a review from a team as a code owner May 17, 2021 19:44
@CLAassistant
Copy link

CLAassistant commented May 17, 2021

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Ben Burry seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@puppet-community-rangefinder
Copy link

puppetdb::master::routes is a class

that may have no external impact to Forge modules.

This module is declared in 33 of 576 indexed public Puppetfiles.


These results were generated with Rangefinder, a tool that helps predict the downstream impact of breaking changes to elements used in Puppet modules. You can run this on the command line to get a full report.

Exact matches are those that we can positively identify via namespace and the declaring modules' metadata. Non-namespaced items, such as Puppet 3.x functions, will always be reported as near matches only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants