puppet-sysctl
puppet-sysctl copied to clipboard
Strange error on Puppet 4: Could not autoload puppet/type/sysctl
During first run a strange error is thrown:
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: Server Error: Evaluation Error: Error while evaluating a Function Call, Could not autoload puppet/type/sysctl: Attempt to redefine entity 'http://puppet.com/2016.1/runtime/type/sysctl'. Originally set at file:/etc/puppetlabs/code/environments/production/vendor/sysctl/manifests/init.pp?line=17&pos=1. at /etc/puppetlabs/code/environments/production/vendor/sysctl/manifests/base.pp:24:5
Second run then works fine.
You might consider my fork under the puppet4 branch. It is not precisely backwards compatible but I think it's more straightfoward and follows puppet4 style.
e.g.
include sysctl
sysctl::values:
net.ipv4.ip_forward:
value: '0'
@tpdownes Interesting, thanks for the link. So far it seems to be working fine. Any chance to release your fork with updated documentation?
@deric See the following
Puppet 4 release on forge Puppet 4 release on github
I have taken pains to ensure Matthias` authorship is clearly attributed.
This is still a problem.
Error: Could not retrieve catalog from remote server: Error 500 on SERVER: {"message":"Server Error: Evaluation Error: Error while evaluating a Function Call, Could not autoload puppet/type/sysctl: Attempt to redefine entity 'http://puppet.com/2016.1/runtime/type/sysctl'. Originally set at file:/etc/puppetlabs/code/environments/production/modules/sysctl/manifests/init.pp?line=17&pos=1. at /etc/puppetlabs/code/environments/production/modules/sysctl/manifests/base.pp:24:5 on node
We also have the same problem
I had the same problem, but only on some puppet agent and not the others (even taking into account the fact it only happens at the first run of puppet master), that's quite strange. But since I'm using puppet master through passenger, I was getting these errors quite a lot in the logs.
I "fixed" it by circumventing the call to ::sysctl { 'entry': } with this kind of code:
$sysctl_entries = {
"kernel.sched_migration_cost_ns" => {
ensure => present,
enforce => true,
value => "5000000",
}
}
create_resources('::sysctl', $sysctl_entries)
With that code, I get no more errors. This might be a puppet issue, or maybe some reserved wording ?