Project

General

Profile

Actions

action #120411

closed

coordination #121876: [epic] Handle openQA review failures in Yam squad - SLE 15 SP5

Apply firewall restart after each command that change configuration only in SLE

Added by rainerkoenig over 1 year ago. Updated over 1 year ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
Start date:
2022-11-14
Due date:
% Done:

0%

Estimated time:

Description

Motivation

In the current build 40.1 we have systemic failures in the test modules introduced in #113492 that all fail in validate_script_output:

According to https://bugzilla.suse.com/show_bug.cgi?id=1204893 we need to restart the firewall to validate properly the configuration in SLE due to defaults, reload doesn't work (see why in the bug) and that explains why for openSUSE we don't need a restart.

Acceptance criteria

AC1: Apply firewall restart after each command that change configuration only in SLE

Additional information

https://firewalld.org/documentation/man-pages/firewall-cmd.html (search for FlushAllOnReload)
For UI testing we always avoid conditions, specially those magic ones is_sle, is_tumbleweed, which just have tendency to accumulate and create spaghetti code. For UI we have different patterns to be use.
On the other hand for validation of the system, packages are different between different products and architectures so it is more tricky to avoid conditions. we could use:

  • similar patterns than with UI (too complex, probably it is not worth it)
  • test data or TDD (looks weird in cases like this when only one command is different, some command are set in code other in test data... no-go)
  • conditional logic: Probably the best solution, but only if we know exactly to what is conditional and it is not is_sle and derivatives, in this case that particular setting for firewall, so we can express in the code this difference based on that default that change between products, it is clear code, therefore we could:
    • check the value of FlushAllOnReload (only one at the beginning of the test).
    • restart or not accordingly.
Actions

Also available in: Atom PDF