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

test: Disable firewalld StrictForwardPorts on RHEL 10 #1955

Merged
merged 1 commit into from
Jan 8, 2025

Conversation

martinpitt
Copy link
Member

RHEL 10 started to break podman -p port forwarding to localhost by default [1]. This was a deliberate change [2][3]. We really don't care about firewalling localhost ports from containers (does anybody really?), so revert back to the previous behaviour (which is still the default on Fedora) of having StrictForwardPorts=no.

This obsoletes our naughty cockpit-project/bots#7291

[1] https://issues.redhat.com/browse/RHEL-72937
[2] https://firewalld.org/2024/11/strict-forward-ports
[3] firewalld/firewalld#1380


This should make the four skipped tests green again. After this lands, I'll send a bots PR to drop the naughty.

@martinpitt
Copy link
Member Author

works!

@martinpitt martinpitt requested a review from mvollmer January 7, 2025 16:38
@martinpitt
Copy link
Member Author

Ah, no firewalld on c10s TF

RHEL 10 started to break `podman -p` port forwarding to localhost by
default [1]. This was a deliberate change [2][3]. We really don't care
about firewalling localhost ports from containers (does anybody
really?), so revert back to the previous behaviour (which is still the
default on Fedora) of having StrictForwardPorts=no.

This obsoletes our naughty cockpit-project/bots#7291

[1] https://issues.redhat.com/browse/RHEL-72937
[2] https://firewalld.org/2024/11/strict-forward-ports
[3] firewalld/firewalld#1380
Copy link
Member

@mvollmer mvollmer left a comment

Choose a reason for hiding this comment

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

Thanks! How annoying!

@@ -23,6 +23,13 @@ Delegate=cpu cpuset io memory pids
EOF
fi

if grep -q platform:el10 /usr/lib/os-release && [ -e /etc/firewalld/firewalld.conf ]; then
Copy link
Member

Choose a reason for hiding this comment

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

Do we need to restrict this to rhel-10? We could just erase StrictForwardPort settings everywhere.

Copy link
Member

Choose a reason for hiding this comment

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

Also, could we install a config snippet that overrides StrictPortForward, instead of having to know which file has the changed OS default?

Copy link
Member Author

Choose a reason for hiding this comment

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

Do we need to restrict this to rhel-10

We don't strictly have to, but as the default is explicitly "no" on Fedora and everywhere else, and this is currently a RHEL 10-ism, I'd rather restrict the hack to that, and learn if it creeps in anywhere else. TBH this is so ridiculously broken that I don't expect this to stay around for long -- this needs to go back to the drawing board.

could we install a config snippet

I'd love to, and that's usually the first thing I look for. Changing big distro-provided conffiles is baaad. But firewalld.conf doesn't seem to have anything that resembles an "include conf.d", nor is there any directory like that. But again, I expect this to be a temporary hack.

@martinpitt martinpitt merged commit f1469ec into cockpit-project:main Jan 8, 2025
33 checks passed
@martinpitt martinpitt deleted the forward-ports branch January 8, 2025 08:36
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.

2 participants