You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In states/selinux.py, it appears that something is changing the state value to "None" instead of "True" or "On" as specified in the .sls file.
From salt-call debug I see
[DEBUG ] Rendered data from file: /var/cache/salt/minion/files/base/webserver/selinux.sls:
httpd_can_network_connect:
selinux.boolean:
- value: true
- persist: true
.
.
.
[INFO ] Executing command 'setsebool -P httpd_can_network_connect None' in directory '/root'
.
.
.
local:
----------
State: - selinux
Name: httpd_can_network_connect
Function: boolean
Result: True
Comment: Failed to set the boolean httpd_can_network_connect to None
Changes:
I'm not really familiar with Python but I'm seeing this in the states\selinux.py file around line 125:
if__opts__['test']:
ret['result'] =Noneret['comment'] ='Boolean {0} is set to be changed to {1}'.format(
name, value)
returnret
So it appears that the value coming from selinux.sls in the state tree is being replaced by "None" in the state module. It's also possible that I'm reading that completely wrong and have an incorrect syntax in my state file, but I've tested various configurations with no change.
The text was updated successfully, but these errors were encountered:
No, that is not what is happening. That code is only executed when you use test=True on your state.highstate or state.sls. The problem here is that neither of the comparisons in the function _refine_value() within salt/states/selinux.py are evaluating to True, causing the function to return None.
Should be a pretty easy fix. Thanks for the report.
This function was not properly handling True/False values, causing the
state not to work when one of these values is used. This makes the
example in the docstring fail.
Also cleaned up/simplified _refine_mode.
Fixessaltstack#5912.
I tried with on/off both before and after I posted this report and that didn't work either. The selinux.py from #5917 does work with both on and true values.
This function was not properly handling True/False values, causing the
state not to work when one of these values is used. This makes the
example in the docstring fail.
Also cleaned up/simplified _refine_mode.
Fixes#5912.
In states/selinux.py, it appears that something is changing the state value to "None" instead of "True" or "On" as specified in the .sls file.
From salt-call debug I see
I'm not really familiar with Python but I'm seeing this in the states\selinux.py file around line 125:
So it appears that the value coming from selinux.sls in the state tree is being replaced by "None" in the state module. It's also possible that I'm reading that completely wrong and have an incorrect syntax in my state file, but I've tested various configurations with no change.
The text was updated successfully, but these errors were encountered: