-
-
Notifications
You must be signed in to change notification settings - Fork 176
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
Unknown variable aio-agent breaks multi version puppet env #106
Comments
so the codepath under #86 is never exercised in a test? |
That should only break with strict variables being on. With strict variables on accessing |
what's the version independent, correct fix for this? |
I don't think there's anything wrong with it. I'd like to hear from @eperdeme first and if they have strict variables enabled. If they do, that would explain the error and I'd have an easy fix. If they don't something else is going on which would really need some investigating and help reproducing. |
Howdi, Yes we have 'strict_variables = true' it seems to be on by default in puppet.conf for puppetserver-2.2.1-1.el7.noarch |
Right, that's the problem. I'm really curious if someone can verify that this is the default as shipped by Puppet Labs. They haven't announced an intent to enforce/required strict variables and as far as I know that was postponed until Puppet 5 to not combine the language migration with the strict variables change as that would significantly increase the workload. Though quite a few modules nowadays do test for strict variables. So, here's what's happening. When There's a few ways forward. As of Puppet 4 the Unfortunately, if we need to guarantee Puppet 3 compatibility we can't switch to that because in Puppet 3 the In order to work around this we implemented a serious nasty but functional workaround in apt which created a local Before we move to implement any of these fixes we need to validate that the packages as shipped by Puppet Labs now enable strict variables and if so act accordingly. If this is a distribution package we have a whole different problem to solve. |
Potential ways to address this: http://spuder.github.io/jekyll/update/defensive-puppet-with-strict-variables/ Two ways to approach depending on the specific need. I'm sure there's more. Rob Nelson |
Yeah, the second one is basically a variation on what we did in apt. I dislike Regardless, we need to figure out if this is a packaging trip-up first, though we're always happy to accept PRs that enable things like strict variables compatibility. |
I think it may behoove us to add a strict vars test to Travis CI at the Rob Nelson |
Just downloaded PE 2015.03 and the params code that determines which gem provider to use is not working correctly because $::aio_agent_version does not exist. Maybe this should be a case statement comparing all the versions since PE puppet no longer contains 'puppet enterprise' in the newer versions https://github.com/voxpupuli/puppet-archive/blob/master/manifests/params.pp#L22 |
@logicminds That's a completely different bug. Please raise a separate issue about that. |
Hi, |
Closing due to recently-merged PRs. Please re-open if this is still an issue. |
Master - 2.2.1-1
Agent - 3.8.2
When using a newer master and an older agent the fact 'aio-agent' does not exist causing agent runs to fail, due to the puppetserver expects the agent to have the fact 'aio-agent' which the older clients do not.
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Evaluation Error: Error while evaluating a Resource Statement, Evaluation Error: Unknown variable: '::aio_agent_version'. at /etc/puppetlabs/code/environments/develop/modules/archive/manifests/params.pp:26:11 at /etc/puppetlabs/code/environments/develop/modules/ui_broker/manifests/init.pp:33 on node test.node.com.
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run
The text was updated successfully, but these errors were encountered: