Project

General

Profile

action #61073

coordination #60071: [functional][y][epic] SLE 15 SP2 feature testing

[functional][y][SLE-9088][SLE-9077] Better sysct.conf handling of YaST (settings conflicts)

Added by riafarov almost 2 years ago. Updated over 1 year ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Spike/Research
Target version:
SUSE QA - Milestone 32
Start date:
2019-12-04
Due date:
2020-04-07
% Done:

0%

Estimated time:
3.00 h
Difficulty:

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

  1. Scope of changes is learned
  2. Exploratory testing is conducted for the parts which are not covered by the automated tests
  3. Follow-up tickets for automated tests are created with detailed description in case are considered to be useful (efforts vs profit)
  4. jira ticket is updated accordingly

Related issues

Copied to openQA Tests - action #65088: [functional][y] Verify writing conflict from YaST in 70-yast.conf Resolved2019-12-042020-07-14

History

#1 Updated by riafarov almost 2 years ago

  • Copied from action #60620: [functional][y][SLE-9088][SLE-9077] Better sysct.conf handling of YaST added

#2 Updated by riafarov almost 2 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

#3 Updated by riafarov almost 2 years ago

  • Copied from deleted (action #60620: [functional][y][SLE-9088][SLE-9077] Better sysct.conf handling of YaST)

#4 Updated by riafarov almost 2 years ago

  • Parent task set to #60071

#5 Updated by mgriessmeier almost 2 years ago

  • Target version changed from Milestone 30+ to Milestone 30

bulk moved to M30 for revisiting

#6 Updated by riafarov almost 2 years ago

  • Due date set to 2020-02-11

#7 Updated by riafarov over 1 year ago

  • Due date changed from 2020-02-11 to 2020-02-25

#8 Updated by riafarov over 1 year ago

  • Due date changed from 2020-02-25 to 2020-03-10

#9 Updated by JERiveraMoya over 1 year ago

  • Due date changed from 2020-03-10 to 2020-03-24

#10 Updated by riafarov over 1 year 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

#11 Updated by riafarov over 1 year ago

  • Estimated time set to 3.00 h

#12 Updated by ybonatakis over 1 year ago

  • Status changed from Workable to In Progress
  • Assignee set to ybonatakis

#13 Updated by ybonatakis over 1 year 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
  • 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

#15 Updated by ybonatakis over 1 year 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

#16 Updated by ybonatakis over 1 year ago

  • Copied to action #65088: [functional][y] Verify writing conflict from YaST in 70-yast.conf added

#17 Updated by ybonatakis over 1 year ago

  • Status changed from Feedback to Resolved

follow up been created https://progress.opensuse.org/issues/65088. Closing this

Also available in: Atom PDF