Closed da125 closed 5 years ago
I don't understand where the 'not a valid sysctl key' error comes from. That is not from this module's code. Are you maybe using another sysctl
module in addition?
Seeing this issue here as well. The change suggested by @da125 fixed the problem.
Further info: Checked out this repository and looked for "is not a valid sysctl key":
grep -rn "is not a valid sysctl key" .
./lib/puppet/provider/sysctl/augeas.rb:121: raise Puppet::Error, "Error: `#{resource[:name]}` is not a valid sysctl key"
./lib/puppet/provider/sysctl/augeas.rb:150: debug("augeasproviders_sysctl: `#{resource[:name]}` is not a valid sysctl key")
./lib/puppet/provider/sysctl/augeas.rb:153: raise Puppet::Error, "Error: `#{resource[:name]}` is not a valid sysctl key"
Either way, as @da125 mentioned, FreeBSD use ": " to separate key name from value when running the "sysctl" command. (It still uses name=value when changing values, and in sysctl.conf)
sysctl net.inet6.ip6
net.inet6.ip6.forwarding: 0
net.inet6.ip6.redirect: 1
net.inet6.ip6.hlim: 64
(...)
@da125 @Savagedlight Could you confirm #30 fixes it?
@da125 @Savagedlight Could you confirm #30 fixes it?
I made comments in the PR. Once that's addressed, it seems to work as expected.
I am no longer using puppet and cannot test.
@raphink Same issue. #30 fixes it Tested on: FreeBSD 12,13 Сan you commit it ?
I'm seeing this issue too on FreeBSD 11.3, and can confirm that the fix now allows me to set a sysctl
value.
Please put out a release containing the patch! 🙏
@raybellis I just released 2.4.0
Hello team,
While using augeasproviders_sysctl for a FreeBSD 11.1 amd64 node with zleslie/bsd module, I came across this issue:
This is caused by the fact that the FreeBSD sysctl delimiter is a colon (':') and not an equal sign ('=') as specified in augeasproviders_sysctl/lib/puppet/provider/sysctl/augeas.rb on line 82.
As a quick workaround and possible patch, I've done the following:
My puppetserver is at version 5.3.1-1.el7.noarch runnig on a CentOS Linux release 7.4.1708 (Core).
Please let me know if there's a better way to fix this issue.