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

Invalid parameter value on Sysctl #16

Open
rmacian opened this issue Sep 24, 2014 · 15 comments
Open

Invalid parameter value on Sysctl #16

rmacian opened this issue Sep 24, 2014 · 15 comments

Comments

@rmacian
Copy link

rmacian commented Sep 24, 2014

Hi,

I'm running into problems with hiera, From the documentation i guessed I have to set on my node a definition like this:

class { 'sysctl::base': hiera_merge_values => true,}

and then in hiera I set (sorry , tabulation is not showing fine)

sysctl::base::values:
net.core.netdev_max_backlog:
value: '30000'
net.core.somaxconn:
value: '1024'
net.ipv4.tcp_max_syn_backlog:
value: '4096'

The catalog does not compile with pupppet agent but it still works with puppet apply.

Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter value on Sysctl[net.core.netdev_max_backlog] on node myserver
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

@pavelsmolka
Copy link

Hi, I have recently encountered a similar problem: Invalid parameter value on Sysctl

I tried to debug it and I have found out that the name of the defined resource sysctl might be an issue, while being used as a "namespace" for the sysctl::* classes at the same time. Since I am no expert in Puppet modules, I would like to ask you whether this might be an issue, and whether it's worth creating a pull request.

We use Puppet 3.6.2

@thias
Copy link
Owner

thias commented Nov 11, 2014

Strange issue... if it's indeed a scoping issue, could you please try the following change and see if it makes any difference?

--- a/manifests/base.pp
+++ b/manifests/base.pp
@@ -21,7 +21,7 @@ class sysctl::base (
     $values_real = $values
   }
   if $values_real != undef {
-    create_resources(sysctl,$values_real)
+    create_resources(::sysctl,$values_real)
   }

   if $sysctl_dir {

pavelsmolka pushed a commit to pavelsmolka/puppet-sysctl that referenced this issue Nov 11, 2014
Sysctl class is now used only for loading values from Hiera.
Indiviaual sysctl variables (values) are set via sysctl::variable
defined type.

This should also fix the problem with create_resources(sysctl),
described in thias#16
@pavelsmolka
Copy link

I re-worked the structure a bit, you can see it in my fork (I have created a pull request to upstream as well). Using sysctl::variable fixes this problem. Also, in my view, it rather nicely separates the sysctl class itself (usage include sysctl in order to have the per-node variables from Hiera processed) from the defined type (usage sysctl::variable { 'vm.swappiness': ensure => absent } in order to get an individual variable value set).

@thias
Copy link
Owner

thias commented Nov 11, 2014

I'll have a look, but one major issue about such changes is that they're not backwards compatible at all...

@nfosdick
Copy link

I had this exact same problem. I tried thias suggestion of ::, but when I moved sysctl to a new name space it fixed the issue.

@deviantony
Copy link

Same problem here using Puppet 3.7.3 !

@pavelsmolka
Copy link

It seems more several other people encountered the same problem recently. Is there a chance to either include this for next major release (2.0) or at least to find some middle ground? I have updated my pull request #17 so it's ready to be merged back to upstream/master.

@hopperd
Copy link

hopperd commented Feb 5, 2015

I'm seeing the same issue, any update on when this will be fixed?

@thias
Copy link
Owner

thias commented Feb 2, 2016

I'd be interested in knowing if this is still happening, and finding a fix that does not involved changing the main sysctl definition into a class, as that would cause major breakage.

@rndmh3ro
Copy link

I'm still having the problem:

Error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter value on Sysctl[vm.swappiness] on node host
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

With variable:

vm.swappiness:
  value: 0

Version: thias-sysctl (v1.0.6)

@thaylin
Copy link

thaylin commented Apr 20, 2016

I am having the same issue, it is intermittent and happens with different variables.

@agomerz
Copy link

agomerz commented Jun 3, 2016

Same issue here not using Heira,

Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter value on Sysctl[net.core.rmem_max] at
sysctl {'net.core.rmem_max':        value => '16777216' }

Does not occur with puppet agent -t but with regular agent runs intermittently.
Puppet 3.7.4

@rekcah78
Copy link

if i rename the module with an other name,
it works fine, i think now puppet have native sysctl function

@kilianw
Copy link

kilianw commented Sep 2, 2016

Same issue here:

error: Could not retrieve catalog from remote server: Error 400 on SERVER: Invalid parameter prefix on Sysctl[kernel.shmmax]

sysctl { 'kernel.shmmax': prefix => '60', value => '2147483648' }

@nshobe
Copy link

nshobe commented Dec 29, 2016

I'm seeing this issue as well, and it's being brought up by a dependency from elastic/elasticsearch. Will likely end up needing to fork that module just to run it because of this bug.

I should also note I'm on the latest version of PE.

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