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

Strange error on Puppet 4: Could not autoload puppet/type/sysctl #49

Open
deric opened this issue Oct 6, 2016 · 6 comments
Open

Strange error on Puppet 4: Could not autoload puppet/type/sysctl #49

deric opened this issue Oct 6, 2016 · 6 comments

Comments

@deric
Copy link

deric commented Oct 6, 2016

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.

@deric deric changed the title Strange error on Puppet 4 Strange error on Puppet 4: Could not autoload puppet/type/sysctl Oct 6, 2016
@tpdownes
Copy link

tpdownes commented Oct 7, 2016

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'

@deric
Copy link
Author

deric commented Oct 11, 2016

@tpdownes Interesting, thanks for the link. So far it seems to be working fine. Any chance to release your fork with updated documentation?

@tpdownes
Copy link

@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.

@brentclark
Copy link

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

@mike-petersen
Copy link

We also have the same problem

@Yyuzu
Copy link

Yyuzu commented Jan 5, 2018

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 ?

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

No branches or pull requests

5 participants