puppet-sysctl icon indicating copy to clipboard operation
puppet-sysctl copied to clipboard

Invalid parameter value on Sysctl

Open rmacian opened this issue 11 years ago • 15 comments

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

rmacian avatar Sep 24 '14 09:09 rmacian

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

pavelsmolka avatar Oct 22 '14 14:10 pavelsmolka

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 {

thias avatar Nov 11 '14 13:11 thias

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

pavelsmolka avatar Nov 11 '14 13:11 pavelsmolka

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

thias avatar Nov 11 '14 14:11 thias

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.

nfosdick avatar Dec 16 '14 21:12 nfosdick

Same problem here using Puppet 3.7.3 !

deviantony avatar Jan 08 '15 18:01 deviantony

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.

pavelsmolka avatar Jan 11 '15 15:01 pavelsmolka

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

hopperd avatar Feb 05 '15 21:02 hopperd

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.

thias avatar Feb 02 '16 09:02 thias

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)

rndmh3ro avatar Feb 29 '16 07:02 rndmh3ro

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

thaylin avatar Apr 20 '16 14:04 thaylin

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

agomerz avatar Jun 03 '16 19:06 agomerz

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

rekcah78 avatar Jun 14 '16 14:06 rekcah78

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' }

kilianw avatar Sep 02 '16 14:09 kilianw

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.

nshobe avatar Dec 29 '16 17:12 nshobe