action #61073
closedcoordination #60071: [functional][y][epic] SLE 15 SP2 feature testing
[functional][y][SLE-9088][SLE-9077] Better sysct.conf handling of YaST (settings conflicts)
0%
Description
See https://jira.suse.com/browse/SLE-9077 and https://jira.suse.com/browse/SLE-9088
Feature was tested with initial implementation, whereas there is a big patch planned: https://trello.com/c/uf4RFeC1/3671-sysctld-handling-display-current-settings-and-warn-about-conflicts
If that gets implemented, we should consider covering that part with automated test too.
Acceptance criteria¶
- Scope of changes is learned
- Exploratory testing is conducted for the parts which are not covered by the automated tests
- Follow-up tickets for automated tests are created with detailed description in case are considered to be useful (efforts vs profit)
- jira ticket is updated accordingly
Updated by riafarov about 5 years ago
- Copied from action #60620: [functional][y][SLE-9088][SLE-9077] Better sysct.conf handling of YaST added
Updated by riafarov about 5 years ago
- Subject changed from [functional][y][SLE-9088][SLE-9077] Better sysct.conf handling of YaST to [functional][y][SLE-9088][SLE-9077] Better sysct.conf handling of YaST (settings conflicts)
- Status changed from New to Blocked
Updated by riafarov about 5 years ago
- Copied from deleted (action #60620: [functional][y][SLE-9088][SLE-9077] Better sysct.conf handling of YaST)
Updated by mgriessmeier about 5 years ago
- Target version changed from Milestone 30+ to Milestone 30
bulk moved to M30 for revisiting
Updated by riafarov about 5 years ago
- Due date changed from 2020-02-11 to 2020-02-25
Updated by riafarov almost 5 years ago
- Due date changed from 2020-02-25 to 2020-03-10
Updated by JERiveraMoya almost 5 years ago
- Due date changed from 2020-03-10 to 2020-03-24
Updated by riafarov almost 5 years ago
- Due date changed from 2020-03-24 to 2020-04-07
- Status changed from Blocked to Workable
- Assignee deleted (
riafarov) - Target version changed from Milestone 30 to Milestone 32
Updated by ybonatakis almost 5 years ago
- Status changed from Workable to In Progress
- Assignee set to ybonatakis
Updated by ybonatakis almost 5 years ago
learning¶
- Specific modules write configuration in /etc/sysctl.d/70-yast.conf
- /etc/sysctl.conf remains empty by default for the needs of the user. User can override configs (find items to override with sysctl -a) using this file. This one has higher precedence by /etc/sysctl.d/70-yast.conf. In additional there is a softlink of it in /usr/lib/sysctl.d/99-sysctl.conf
- modules use the SysctlConfig[0] class which is supposed is handling Sysctl entries in the following directories
- loading looks like having this order
- the /etc/sysctl.d/70-yast.conf can be edited during installation, first_boot or later
- No conflict will be reported if the same attribute is defined in one conf file with lower priority, or the attribute is commented out
- When ANY conflict found, the writing is not happening at all for all among the changes. For me the message could be more clear saying that the "changes are not going to be placed until the conflicts be solved"
obversations from explorating testing¶
- the conflict occurs for any file which the attribute appears under the mentioned directories(exluding hidden ones). for example if
net.ipv4.tcp_syncookies = 1
is set in both /etc/sysctl.d/70-yast.conf and /usr/lib/sysctl.d/my_tmp_file. That s ok as the precedence in those files are based on the alphanumeric order - the conflicts for /etc/sysctl.conf show up twice because of the symlink.
- The same conflict error appears twice in the writing on the networking module. it appears first for "Write routing configuration" and then "Setup network services". I dont know if this is a problem or not(?!?)
- There a conflict error even if you have set as a user the attr in /etc/sysctl.conf and this doesnt appear in the /etc/sysctl.d/70-yast.conf. for example add
net.ipv4.tcp_syncookies = 1
into /etc/sysctl.conf and then remove it from /etc/sysctl.d/70-yast.conf. Run Yast and change this particular attribute from the security center of the yast interface
automated tests¶
If we want to automate this we could avoid the usage of needles and grep inside the /var/log/YaST2/y2log for the corresponding conflict. The entry in the logs looks like this:
<date> <2> <hostname> [Ruby] cfa/conflict_report.rb:47 Changed values have conflicts with:<br><br>File: <path><br>Conflicting entries: <attributes list in conflict found><br><br>You will have to adapt these entries manually in order to set your changes.
recommendations:
We could use yast2_cmd to add a yast2_sysctl module which could modify net.ipv4.ip_forward and perform some smoke tests. Unfortunatelly i cant see a way to change ip_forward through yast with terminl. So some extra work with needling will be required.
Important thing to verify is to see that precendence is being followed raising the conflict warning if we try to modify attr which is in a file with higher priority and that the configuration is actually happens (see: https://bugzilla.suse.com/show_bug.cgi?id=1167234)
[0] https://github.com/yast/yast-yast2/blob/master/library/general/src/lib/cfa/sysctl_config.rb
Updated by ybonatakis almost 5 years ago
Updated by ybonatakis almost 5 years ago
- Status changed from In Progress to Feedback
I am putting this in feedback as it would be nice to get some before open following tickets
Updated by ybonatakis almost 5 years ago
- Copied to action #65088: [functional][y] Verify writing conflict from YaST in 70-yast.conf added
Updated by ybonatakis almost 5 years ago
- Status changed from Feedback to Resolved
follow up been created https://progress.opensuse.org/issues/65088. Closing this