Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor firewalld #21124

Merged
merged 1 commit into from
Feb 10, 2025
Merged

Refactor firewalld #21124

merged 1 commit into from
Feb 10, 2025

Conversation

grisu48
Copy link
Contributor

@grisu48 grisu48 commented Feb 6, 2025

Simplify the code flow for firewalld and make test failures better visible by running a 'die' instead of just marking the module as failed.

Verification runs

@grisu48 grisu48 marked this pull request as ready for review February 6, 2025 12:26
record_soft_failure "boo#1144543 - Migration from SFW2 to firewalld: no firewall enabled";
return;
}
if (is_jeos && is_vmware && (is_sle('15-SP4+') || is_leap('15.4+'))) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is_jeos && (is_vmware || $the_cloud_image) as SP4 is EOL

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

or version check for 15.6+

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So cloud image comes without pre-installed firewall, hence it can be only jeos && vmware

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can actually remove this if block after merging #21129 and instead not schedule the test module on vmware.

use Utils::Architectures;

sub run {
my ($self) = @_;
if ($self->firewall eq 'firewalld') {
my $timeout = 30;
$timeout = 60 if is_ppc64le;
my $ret = script_run('firewall-cmd --state', timeout => $timeout);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Has this hide the running output before?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAICS it was not being checked. Only the return code.

@grisu48 grisu48 marked this pull request as draft February 6, 2025 13:50
Simplify the code flow for firewalld and make test failures better
visible by running a 'die' instead of just marking the module as failed.
Copy link

github-actions bot commented Feb 6, 2025

Great PR! Please pay attention to the following items before merging:

Files matching lib/**.pm:

  • Consider adding or extending unit tests in t/

This is an automatically generated QA checklist based on modified files.

@grisu48 grisu48 marked this pull request as ready for review February 6, 2025 15:21
@mloviska mloviska merged commit 00d9099 into os-autoinst:master Feb 10, 2025
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants