Switch cache type on client version#328
Open
benburry wants to merge 1 commit into
Open
Conversation
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`.
|
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. |
puppetdb::master::routes is a classthat may have no external impact to Forge modules. This module is declared in 33 of 576 indexed public
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
jsonfor 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 thepuppetserver 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
clientversionfact to replaceserverversion.