ID: security.jail.sysvipc_allowed
Function: sysctl.present
Result: False
Comment: An exception occurred in this state: Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/salt/state.py", line 2154, in call
*cdata["args"], **cdata["kwargs"]
File "/usr/local/lib/python3.7/site-packages/salt/loader.py", line 2085, in wrapper
return f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/salt/states/sysctl.py", line 117, in present
update = __salt__["sysctl.persist"](name, value, config, ignore)
TypeError: persist() takes from 2 to 3 positional arguments but 4 were given
Looks like it was broken by this https://github.com/saltstack/salt/pull/55719 since the author of that commit didn't do any testing or review on any platform other than linux.
The breakage was introduced in 3001.
@mchugh19 and @dwoz Please review your commits which broke a basic feature in FreeBSD.
@ari thanks for submitting it, we'll officially run tests on FreeBSD very soon. Do you want to provide the patch to fix it?
Well, if it were me I'd revert the whole of the patch that broke it so that author could rewrite it a safe way without assuming that Linux is the only operating system. I don't understand why this feature would be added at all to the generic sysctl.py codebase. What problem did it solve, why does it exist, what does it do?
See also downstream bug report https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247627 .
Hi all,
@ari this was obviously an unintended breakage, and would have been helped by having a test suite running for non linux OSs. I apologize for the breakage and disruption. A long time ago I was a Solaris sysadmin, so I understand wanting to keep things supported everywhere.
I don't understand why this feature would be added at all to the generic sysctl.py codebase. What problem did it solve, why does it exist, what does it do?
The problem it solves is in the linked bug report: #45195 as well as brought up in the community here: https://www.reddit.com/r/saltstack/comments/ebgxjh/saltstatessysctl/
I've just submitted a possible fix in #57841. Can you try it out to verify the solution?
Hi @mchugh19,
Yes, some better CI servers for the salt project would certainly help, although they didn't catch the OSX errors here. And keeping salt OS agnostic is great for the health of the project.
The problems I see with your patch are this:
Overall, I guess I don't see the point of this whole feature since my salt is broken up into states which only apply to servers where they are relevant. What is the use-case of applying sysctls to the wrong machines? But I acknowledge everyone is different...
Hi @ari
You are correct, there are other ways to handle restoration of the sysctl state for non-linux OSs.
Do you have a suggestion for a less brittle or more clear method for handling the sysctl ignore case?
ignore
is a boolean. ignore
as a noop to other OSs sysctl files?It was a mistake and unfortunate that this broke non-linux sysctl states. The patch in #57841 was intended as a quick fix which could be added to 3001.1 to restore functionality quickly. I see possible next steps as:
Do you have any other suggestions?
I like your possible next steps.
de-scoping from Magnesium as the regression test has not yet been written
So, sysctl is going to remain broken on non-Linux for at least another release?
So, sysctl is going to remain broken on non-Linux for at least another release?
FreeBSD port and package contain the fix
That's an untenable situation. Separately maintaining that change will be maintenance-intensive. Why won't you simply revert the change that introduced the breakage?
Most helpful comment
That's an untenable situation. Separately maintaining that change will be maintenance-intensive. Why won't you simply revert the change that introduced the breakage?