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

feat(images/kuma-init): use iptables-wrapper to use correct iptables version #9701

Merged

Conversation

bartsmykla
Copy link
Contributor

@bartsmykla bartsmykla commented Mar 25, 2024

As of iptables 1.8, the iptables command line clients come in two different versions/modes: "legacy", which uses the kernel iptables API just like iptables 1.6 and earlier did, and "nft", which translates the iptables command-line API into the kernel nftables API.

Because they connect to two different subsystems in the kernel, you cannot mix and match between them; in particular, if you are adding a new rule that needs to run either before or after some existing rules (such as the system firewall rules), then you need to create your rule with the same iptables mode as the other rules were created with, since otherwise the ordering may not be what you expect. (eg, if you prepend a rule using the nft-based client, it will still run after all rules that were added with the legacy iptables client.)

Checklist prior to review

  • Link to relevant issue as well as docs and UI issues
    • No relevant issues
  • This will not break child repos: it doesn't hardcode values (.e.g "kumahq" as a image registry) and it will work on Windows, system specific functions like syscall.Mkfifo have equivalent implementation on the other OS
    • It shouldn't
  • Tests (Unit test, E2E tests, manual test on universal and k8s)
    • Tested manually
    • Don't forget ci/ labels to run additional/fewer tests
  • Do you need to update UPGRADE.md?
    • There is no need
  • Does it need to be backported according to the backporting policy? (this GH action will add "backport" label based on these file globs, if you want to prevent it from adding the "backport" label use no-backport-autolabel label) --

Changelog: skip

…version

As of iptables 1.8, the iptables command line clients come in two different
versions/modes: "legacy", which uses the kernel iptables API just like
iptables 1.6 and earlier did, and "nft", which translates the iptables
command-line API into the kernel nftables API.

Because they connect to two different subsystems in the kernel, you cannot mix
and match between them; in particular, if you are adding a new rule that needs
to run either before or after some existing rules (such as the system firewall
rules), then you need to create your rule with the same iptables mode as
the other rules were created with, since otherwise the ordering may not be what
you expect. (eg, if you prepend a rule using the nft-based client, it will
still run after all rules that were added with the legacy iptables client.)

Signed-off-by: Bart Smykla <bartek@smykla.com>
@bartsmykla bartsmykla added ci/run-full-matrix PR: Runs all possible e2e test combination (expensive use carefully) backport labels Mar 25, 2024
@bartsmykla bartsmykla requested a review from a team as a code owner March 25, 2024 11:29
@bartsmykla bartsmykla requested review from slonka and lobkovilya and removed request for a team March 25, 2024 11:29
mk/build.mk Outdated Show resolved Hide resolved
Signed-off-by: Bart Smykla <bartek@smykla.com>
Signed-off-by: Bart Smykla <bartek@smykla.com>
@bartsmykla bartsmykla enabled auto-merge (squash) March 26, 2024 11:48
@bartsmykla bartsmykla merged commit a33eec8 into kumahq:master Mar 26, 2024
35 checks passed
Copy link
Contributor

github-actions bot commented Mar 26, 2024

backporting to release-2.6 with action

backporting to release-2.4 with action
backporting to release-2.5 with action
backporting to release-2.2 with action

Copy link
Contributor

backporting to release-2.3 with action

kumahq bot pushed a commit that referenced this pull request Mar 26, 2024
…version (#9701)

As of iptables 1.8, the iptables command line clients come in two different
versions/modes: "legacy", which uses the kernel iptables API just like
iptables 1.6 and earlier did, and "nft", which translates the iptables
command-line API into the kernel nftables API.

Because they connect to two different subsystems in the kernel, you cannot mix
and match between them; in particular, if you are adding a new rule that needs
to run either before or after some existing rules (such as the system firewall
rules), then you need to create your rule with the same iptables mode as
the other rules were created with, since otherwise the ordering may not be what
you expect. (eg, if you prepend a rule using the nft-based client, it will
still run after all rules that were added with the legacy iptables client.)

Signed-off-by: Bart Smykla <bartek@smykla.com>
kumahq bot pushed a commit that referenced this pull request Mar 26, 2024
…version (#9701)

As of iptables 1.8, the iptables command line clients come in two different
versions/modes: "legacy", which uses the kernel iptables API just like
iptables 1.6 and earlier did, and "nft", which translates the iptables
command-line API into the kernel nftables API.

Because they connect to two different subsystems in the kernel, you cannot mix
and match between them; in particular, if you are adding a new rule that needs
to run either before or after some existing rules (such as the system firewall
rules), then you need to create your rule with the same iptables mode as
the other rules were created with, since otherwise the ordering may not be what
you expect. (eg, if you prepend a rule using the nft-based client, it will
still run after all rules that were added with the legacy iptables client.)

Signed-off-by: Bart Smykla <bartek@smykla.com>
kumahq bot pushed a commit that referenced this pull request Mar 26, 2024
…version (#9701)

As of iptables 1.8, the iptables command line clients come in two different
versions/modes: "legacy", which uses the kernel iptables API just like
iptables 1.6 and earlier did, and "nft", which translates the iptables
command-line API into the kernel nftables API.

Because they connect to two different subsystems in the kernel, you cannot mix
and match between them; in particular, if you are adding a new rule that needs
to run either before or after some existing rules (such as the system firewall
rules), then you need to create your rule with the same iptables mode as
the other rules were created with, since otherwise the ordering may not be what
you expect. (eg, if you prepend a rule using the nft-based client, it will
still run after all rules that were added with the legacy iptables client.)

Signed-off-by: Bart Smykla <bartek@smykla.com>
kumahq bot pushed a commit that referenced this pull request Mar 26, 2024
…version (#9701)

As of iptables 1.8, the iptables command line clients come in two different
versions/modes: "legacy", which uses the kernel iptables API just like
iptables 1.6 and earlier did, and "nft", which translates the iptables
command-line API into the kernel nftables API.

Because they connect to two different subsystems in the kernel, you cannot mix
and match between them; in particular, if you are adding a new rule that needs
to run either before or after some existing rules (such as the system firewall
rules), then you need to create your rule with the same iptables mode as
the other rules were created with, since otherwise the ordering may not be what
you expect. (eg, if you prepend a rule using the nft-based client, it will
still run after all rules that were added with the legacy iptables client.)

Signed-off-by: Bart Smykla <bartek@smykla.com>
kumahq bot pushed a commit that referenced this pull request Mar 26, 2024
…version (#9701)

As of iptables 1.8, the iptables command line clients come in two different
versions/modes: "legacy", which uses the kernel iptables API just like
iptables 1.6 and earlier did, and "nft", which translates the iptables
command-line API into the kernel nftables API.

Because they connect to two different subsystems in the kernel, you cannot mix
and match between them; in particular, if you are adding a new rule that needs
to run either before or after some existing rules (such as the system firewall
rules), then you need to create your rule with the same iptables mode as
the other rules were created with, since otherwise the ordering may not be what
you expect. (eg, if you prepend a rule using the nft-based client, it will
still run after all rules that were added with the legacy iptables client.)

Signed-off-by: Bart Smykla <bartek@smykla.com>
bartsmykla pushed a commit that referenced this pull request Mar 26, 2024
bartsmykla pushed a commit that referenced this pull request Mar 26, 2024
bartsmykla pushed a commit that referenced this pull request Mar 26, 2024
bartsmykla pushed a commit that referenced this pull request Mar 26, 2024
bartsmykla pushed a commit that referenced this pull request Mar 26, 2024
bartsmykla added a commit to bartsmykla/kuma that referenced this pull request Mar 27, 2024
…ptables version (kumahq#9701)"

This reverts commit a33eec8.

Signed-off-by: Bart Smykla <bartek@smykla.com>
@bartsmykla bartsmykla deleted the feat/use-iptables-wrapper-in-kuma-init branch March 27, 2024 11:51
bartsmykla added a commit to bartsmykla/kuma that referenced this pull request Mar 29, 2024
…ptables version (backport of kumahq#9701) (kumahq#9728)"

This reverts commit 5711de2.

Signed-off-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit to bartsmykla/kuma that referenced this pull request Mar 29, 2024
…ptables version (backport of kumahq#9701) (kumahq#9724)"

This reverts commit 325df19.

Signed-off-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit to bartsmykla/kuma that referenced this pull request Mar 29, 2024
…ptables version (backport of kumahq#9701) (kumahq#9726)"

This reverts commit 59b9e60.

Signed-off-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit to bartsmykla/kuma that referenced this pull request Mar 29, 2024
…ptables version (backport of kumahq#9701) (kumahq#9725)"

This reverts commit 4da2646.

Signed-off-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit to bartsmykla/kuma that referenced this pull request Mar 29, 2024
…ptables version (backport of kumahq#9701) (kumahq#9727)"

This reverts commit 78a0ce0.

Signed-off-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit that referenced this pull request Mar 29, 2024
…ptables version (backport of #9701) (#9728)" (#9755)

This reverts commit 5711de2.

Signed-off-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit that referenced this pull request Mar 29, 2024
…ptables version (backport of #9701) (#9726)" (#9757)

This reverts commit 59b9e60.

Signed-off-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit that referenced this pull request Mar 29, 2024
…ptables version (backport of #9701) (#9725)" (#9758)

This reverts commit 4da2646.

Signed-off-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit that referenced this pull request Mar 29, 2024
…ptables version (backport of #9701) (#9727)" (#9759)

This reverts commit 78a0ce0.

Signed-off-by: Bart Smykla <bartek@smykla.com>
bartsmykla added a commit that referenced this pull request Mar 29, 2024
…ptables version (backport of #9701) (#9724)" (#9756)

This reverts commit 325df19.

Signed-off-by: Bart Smykla <bartek@smykla.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport ci/run-full-matrix PR: Runs all possible e2e test combination (expensive use carefully)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants