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

CNI/bridge: Ensure pod communications are allowed #16143

Merged
merged 1 commit into from
Apr 5, 2024

Conversation

maxbrunet
Copy link
Contributor

@maxbrunet maxbrunet commented Mar 23, 2023

Using none driver with docker runtime, the bridge CNI is selected since Minikube v1.29.0, but pods cannot communicate, this PR adds the firewall plugin to the CNI config to set up the correct iptables rules.

I found the solution here: containernetworking/plugins#430 (comment)

The config for reference:

Tested and working for my use case, but I am not entirely sure about all the implications of this change.

Fixes medyagh/setup-minikube#110

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Mar 23, 2023
@k8s-ci-robot
Copy link
Contributor

Welcome @maxbrunet!

It looks like this is your first PR to kubernetes/minikube 🎉. Please refer to our pull request process documentation to help your PR have a smooth ride to approval.

You will be prompted by a bot to use commands during the review process. Do not be afraid to follow the prompts! It is okay to experiment. Here is the bot commands documentation.

You can also check if kubernetes/minikube has its own contribution guidelines.

You may want to refer to our testing guide if you run into trouble with your tests not passing.

If you are having difficulty getting your pull request seen, please follow the recommended escalation practices. Also, for tips and tricks in the contribution process you may want to read the Kubernetes contributor cheat sheet. We want to make sure your contribution gets all the attention it needs!

Thank you, and welcome to Kubernetes. 😃

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 23, 2023
@k8s-ci-robot
Copy link
Contributor

Hi @maxbrunet. Thanks for your PR.

I'm waiting for a kubernetes 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.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Mar 23, 2023
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@spowelljr
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot 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 23, 2023
@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@maxbrunet
Copy link
Contributor Author

@spowelljr what is the best way to get the logs from the container runtime for these failing tests (e.g. journalctl -u cri-docker)?

I opened #16149, but I do not think it will help here as I do not see any system logs.

@spowelljr
Copy link
Member

That PR makes sense to me to get the cri-dockerd logs, if you don't see system logs at the end of the failed test it likely doesn't have the following at the start of the test func.

defer PostMortemLogs(t, profile)

This will produce the following: https://storage.googleapis.com/minikube-builds/logs/16143/28462/Docker_Linux.html#fail_TestPause%2fserial%2fSecondStartNoReconfiguration

If you look at the bottom of the logs you should see ==> Docker <== and that's where the logs would be in your other PR

@maxbrunet maxbrunet force-pushed the fix/cni/bridge/pod-comms branch from a0e5cd1 to faff3e8 Compare March 27, 2023 17:32
@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@maxbrunet maxbrunet force-pushed the fix/cni/bridge/pod-comms branch from faff3e8 to 4d6b5c5 Compare March 27, 2023 20:12
@minikube-pr-bot

This comment has been minimized.

@minikube-pr-bot

This comment has been minimized.

@maxbrunet
Copy link
Contributor Author

maxbrunet commented Mar 28, 2023

So, my first attempt was using the most restrictive ingress policy, same-bridge, but it appears to break many tests. I have removed it to use the default open instead, it looks much better: https://www.cni.dev/plugins/current/meta/firewall/#ingress-policy

The config seems to load properly everywhere as I have not seen any error in the cri-dockerd logs.

@spowelljr what do you think about the solution? I cannot say for sure if the remaining failing tests are related or not, but in this state, firewall only adds a FORWARD chain and no isolation/DROP rule, it should be safe: https://www.cni.dev/plugins/current/meta/firewall/#forward

@maxbrunet
Copy link
Contributor Author

@medyagh @spowelljr friendly nudge 🙂

@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle stale
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

@k8s-ci-robot k8s-ci-robot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jul 5, 2023
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Mark this PR as fresh with /remove-lifecycle rotten
  • Close this PR with /close
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

@k8s-ci-robot k8s-ci-robot added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Jan 19, 2024
@k8s-triage-robot
Copy link

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

@k8s-ci-robot
Copy link
Contributor

@k8s-triage-robot: Closed this PR.

In response to this:

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages PRs according to the following rules:

  • After 90d of inactivity, lifecycle/stale is applied
  • After 30d of inactivity since lifecycle/stale was applied, lifecycle/rotten is applied
  • After 30d of inactivity since lifecycle/rotten was applied, the PR is closed

You can:

  • Reopen this PR with /reopen
  • Mark this PR as fresh with /remove-lifecycle rotten
  • Offer to help out with Issue Triage

Please send feedback to sig-contributor-experience at kubernetes/community.

/close

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.

@spowelljr spowelljr reopened this Apr 4, 2024
@spowelljr spowelljr force-pushed the fix/cni/bridge/pod-comms branch from 4d6b5c5 to ecdecec Compare April 4, 2024 21:04
@spowelljr spowelljr removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Apr 4, 2024
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 16143) |
+----------------+----------+---------------------+
| minikube start | 52.2s    | 51.7s               |
| enable ingress | 25.9s    | 25.1s               |
+----------------+----------+---------------------+

Times for minikube start: 51.4s 52.0s 54.2s 51.8s 51.8s
Times for minikube (PR 16143) start: 51.0s 50.3s 54.3s 50.8s 52.1s

Times for minikube ingress: 28.5s 27.5s 25.5s 23.0s 25.1s
Times for minikube (PR 16143) ingress: 24.5s 25.5s 25.1s 27.0s 23.6s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 16143) |
+----------------+----------+---------------------+
| minikube start | 21.3s    | 22.4s               |
| enable ingress | 21.0s    | 21.3s               |
+----------------+----------+---------------------+

Times for minikube ingress: 20.2s 22.2s 20.7s 20.8s 21.3s
Times for minikube (PR 16143) ingress: 21.2s 22.2s 21.2s 20.7s 21.2s

Times for minikube start: 23.7s 20.0s 20.8s 20.5s 21.3s
Times for minikube (PR 16143) start: 21.4s 23.4s 23.5s 20.3s 23.6s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 16143) |
+----------------+----------+---------------------+
| minikube start | 21.5s    | 20.9s               |
| enable ingress | 32.3s    | 26.5s               |
+----------------+----------+---------------------+

Times for minikube start: 22.4s 20.0s 22.3s 22.8s 19.7s
Times for minikube (PR 16143) start: 19.7s 19.8s 22.8s 22.9s 19.4s

Times for minikube ingress: 47.7s 31.8s 31.7s 19.7s 30.7s
Times for minikube (PR 16143) ingress: 30.7s 31.7s 31.7s 18.8s 19.7s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
KVM_Linux_crio TestFunctional/parallel/ImageCommands/ImageRemove (gopogh) 2.98 (chart)
Docker_Linux_crio TestFunctional/parallel/ImageCommands/ImageTagAndLoadDaemon (gopogh) 3.55 (chart)
KVM_Linux_containerd TestAddons/parallel/Headlamp (gopogh) 8.93 (chart)
Hyper-V_Windows TestPause/serial/VerifyDeletedResources (gopogh) 33.33 (chart)
Hyperkit_macOS TestErrorSpam/setup (gopogh) 36.07 (chart)
Hyperkit_macOS TestCertOptions (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/CertSync (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/CpCmd (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/DashboardCmd (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/DockerEnv/bash (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/FileSync (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/ImageCommands/ImageBuild (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/ImageCommands/ImageListJson (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/ImageCommands/ImageListShort (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/ImageCommands/ImageListTable (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/ImageCommands/ImageListYaml (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/ImageCommands/ImageLoadDaemon (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/ImageCommands/ImageLoadFromFile (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/ImageCommands/ImageReloadDaemon (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/ImageCommands/ImageSaveToFile (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/ImageCommands/ImageTagAndLoadDaemon (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/MySQL (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/NodeLabels (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/NonActiveRuntimeDisabled (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/PersistentVolumeClaim (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/ServiceCmdConnect (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/ServiceCmd/DeployApp (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/ServiceCmd/Format (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/ServiceCmd/HTTPS (gopogh) 37.70 (chart)
Hyperkit_macOS TestFunctional/parallel/ServiceCmd/JSONOutput (gopogh) 37.70 (chart)
More tests... Continued...

Too many tests failed - See test logs for more details.

To see the flake rates of all tests by environment, click here.

Copy link
Member

@spowelljr spowelljr left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, the tests look good, thank you for the PR!

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: maxbrunet, spowelljr

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Apr 5, 2024
@spowelljr spowelljr merged commit 744196c into kubernetes:master Apr 5, 2024
21 of 38 checks passed
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

none-driver: pod communications not working
6 participants