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

vm.sh: Add iptables DNAT rules for rootless podman #756

Merged
merged 1 commit into from
Mar 8, 2022

Conversation

0xFelix
Copy link
Member

@0xFelix 0xFelix commented Mar 3, 2022

This adds iptables DNAT rules for rootless podman. Because traffic is
originating from the loopback adapter when using rootles podman /
slirp4netns, the existing iptables rules did not apply and
'make cluster-up' was failing on rootless podman. This patch checks
whether a rootless container is used and adds the corresponding
iptables rules.

@kubevirt-bot kubevirt-bot added the dco-signoff: yes Indicates the PR's author has DCO signed all their commits. label Mar 3, 2022
@kubevirt-bot kubevirt-bot requested review from enp0s3 and fgimenez March 3, 2022 13:35
@kubevirt-bot kubevirt-bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 3, 2022
@kubevirt-bot
Copy link
Contributor

Hi @0xFelix. Thanks for your PR.

I'm waiting for a kubevirt member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@0xFelix
Copy link
Member Author

0xFelix commented Mar 3, 2022

/cc @EdDev
/cc @lyarwood

@kubevirt-bot kubevirt-bot requested a review from EdDev March 3, 2022 13:35
@kubevirt-bot
Copy link
Contributor

@0xFelix: GitHub didn't allow me to request PR reviews from the following users: lyarwood.

Note that only kubevirt members and repo collaborators can review this PR, and authors cannot review their own PRs.

In response to this:

/cc @EdDev
/cc lyarwood

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@EdDev
Copy link
Member

EdDev commented Mar 6, 2022

@0xFelix , thank you for this change.

Could we check at this stage if we are in a rootful or rootless container? If we could, then we could adjust each with its own proper focused configuration.

I think this addition will not harm the rootful run, but we better check nevertheless (that we did not increased the run time).

@0xFelix
Copy link
Member Author

0xFelix commented Mar 7, 2022

@EdDev I changed the patch so it checks whether eth0 is present and then adds the corresponding iptables rules.

@0xFelix
Copy link
Member Author

0xFelix commented Mar 7, 2022

/hold

@kubevirt-bot kubevirt-bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 7, 2022
This adds iptables DNAT rules for rootless podman. Because traffic is
originating from the loopback adapter when using rootles podman /
slirp4netns, the existing iptables rules did not apply and
'make cluster-up' was failing on rootless podman. This patch checks
whether a rootless container is used and adds the corresponding
iptables rules.

Signed-off-by: Felix Matouschek <fmatouschek@redhat.com>
@0xFelix
Copy link
Member Author

0xFelix commented Mar 7, 2022

/unhold

@kubevirt-bot kubevirt-bot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 7, 2022
Copy link
Member

@EdDev EdDev left a comment

Choose a reason for hiding this comment

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

Nice! Thank you!!

@kubevirt-bot kubevirt-bot added the lgtm Indicates that a PR is ready to be merged. label Mar 7, 2022
@EdDev
Copy link
Member

EdDev commented Mar 7, 2022

/ok-to-test

@kubevirt-bot kubevirt-bot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Mar 7, 2022
@enp0s3
Copy link
Contributor

enp0s3 commented Mar 8, 2022

/retest

Copy link
Contributor

@enp0s3 enp0s3 left a comment

Choose a reason for hiding this comment

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

/approve

@kubevirt-bot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: enp0s3

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@kubevirt-bot kubevirt-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 8, 2022
@0xFelix
Copy link
Member Author

0xFelix commented Mar 8, 2022

/retest

@kubevirt-commenter-bot
Copy link

/retest
This bot automatically retries jobs that failed/flaked on approved PRs.
Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@kubevirt-bot kubevirt-bot merged commit e6e51c4 into kubevirt:main Mar 8, 2022
kubevirt-bot added a commit to kubevirt-bot/kubevirt that referenced this pull request Mar 9, 2022
[e6e51c4 vm.sh: Add iptables DNAT rules for rootless podman](kubevirt/kubevirtci#756)
[6b66790 kind: Use quay registry image](kubevirt/kubevirtci#755)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
kubevirt-bot added a commit to kubevirt-bot/kubevirt that referenced this pull request Mar 9, 2022
[23ddfc2 cluster-up: Unify usage of rootless or rootful podman](kubevirt/kubevirtci#757)
[e6e51c4 vm.sh: Add iptables DNAT rules for rootless podman](kubevirt/kubevirtci#756)
[6b66790 kind: Use quay registry image](kubevirt/kubevirtci#755)

```release-note
NONE
```

Signed-off-by: kubevirt-bot <kubevirtbot@redhat.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. dco-signoff: yes Indicates the PR's author has DCO signed all their commits. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants