submariner-io / submariner

Networking component for interconnecting Pods and Services across Kubernetes clusters.
https://submariner.io
Apache License 2.0
2.41k stars 190 forks source link

Iptables List avoid unnecessary row processing #3023

Closed yboaron closed 3 months ago

yboaron commented 4 months ago

I noticed [1] warning in route-agent pod logs, the cause of this warning seems to be the processing of an unnecessary line ('-N ') returned by iptables.List.

This PR updates iptables List to ignore '-N <chain_name' line.

[1] 2024-05-29T14:54:28.041Z WRN ..etfilter/adapter.go:120 Packetfilter Unable to delete rule "packetfilter.Rule{Action: Jump}" from table "Route", chain "SUBMARINER-POSTROUTING": error deleting rule "-j " from table "mangle", chain "SUBMARINER-POSTROUTING": running [/usr/sbin/iptables -t mangle -D SUBMARINER-POSTROUTING -j --wait 5]: exit status 2: iptables v1.8.9 (nf_tables): Invalid target name (too short) Try `iptables -h' or 'iptables --help' for more information.

submariner-bot commented 4 months ago

🤖 Created branch: z_pr3023/yboaron/iptables_list 🚀 Full E2E won't run until the "ready-to-test" label is applied. I will add it automatically once the PR has 2 approvals, or you can add it manually.

submariner-bot commented 3 months ago

🤖 Closed branches: [z_pr3023/yboaron/iptables_list]