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

Fix subnet checking #15394

Merged
merged 2 commits into from
Dec 1, 2022
Merged

Conversation

spowelljr
Copy link
Member

Problem:
While checking for a free subnet, if an IPv6 network is found n.IP is set to 0.0.0.0, which is then set to startSubnet. This will cause an error on the next loop of the check as it add 9 to 0.0.0.0 instead of the starting IP, resulting in the second IP to check for being 0.9.0.0.

Expected:

Checking 192.168.49.0
Checking 192.177.49.0
Checking 192.186.49.0
...

Actual:

Checking 192.168.49.0
Checking 0.9.0.0
Checking 0.18.0.0
...

Solution:
Assign the value returned from n.IP to its own variable to not interrupt the checking loop.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Nov 23, 2022
@k8s-ci-robot k8s-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 23, 2022
pkg/network/network.go Show resolved Hide resolved
@medyagh
Copy link
Member

medyagh commented Nov 23, 2022

adding @josedonizetti as reviewer

@medyagh
Copy link
Member

medyagh commented Nov 29, 2022

/ok-to-test

@k8s-ci-robot k8s-ci-robot added the ok-to-test Indicates a non-member PR verified by an org member that is safe to test. label Nov 29, 2022
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 15394) |
+----------------+----------+---------------------+
| minikube start | 54.0s    | 53.9s               |
| enable ingress | 26.5s    | 26.6s               |
+----------------+----------+---------------------+

Times for minikube (PR 15394) start: 56.1s 52.8s 53.1s 53.4s 53.8s
Times for minikube start: 54.8s 53.8s 51.7s 54.0s 55.5s

Times for minikube ingress: 28.7s 27.6s 24.1s 24.1s 28.1s
Times for minikube (PR 15394) ingress: 28.2s 24.7s 27.6s 23.6s 29.1s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 15394) |
+----------------+----------+---------------------+
| minikube start | 26.0s    | 26.1s               |
| enable ingress | 22.3s    | 20.5s               |
+----------------+----------+---------------------+

Times for minikube start: 25.0s 26.9s 25.3s 24.8s 28.2s
Times for minikube (PR 15394) start: 25.6s 25.0s 25.9s 24.8s 29.1s

Times for minikube ingress: 26.0s 22.0s 21.5s 21.0s 20.9s
Times for minikube (PR 15394) ingress: 20.5s 20.0s 19.9s 21.5s 20.4s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 15394) |
+----------------+----------+---------------------+
| minikube start | 22.9s    | 24.6s               |
| enable ingress | 29.1s    | 26.3s               |
+----------------+----------+---------------------+

Times for minikube ingress: 30.5s 26.4s 36.4s 25.9s 26.4s
Times for minikube (PR 15394) ingress: 26.4s 25.9s 26.4s 26.5s 26.4s

Times for minikube start: 25.8s 23.4s 20.9s 21.9s 22.6s
Times for minikube (PR 15394) start: 33.4s 22.8s 22.4s 22.3s 22.1s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
Hyperkit_macOS TestNetworkPlugins/group/false/Start (gopogh) 0.00 (chart)
KVM_Linux_containerd TestFunctional/parallel/ConfigCmd (gopogh) 0.64 (chart)
KVM_Linux_containerd TestFunctional/serial/LogsFileCmd (gopogh) 1.92 (chart)
Docker_Linux_containerd TestPause/serial/Start (gopogh) 19.87 (chart)
Docker_Linux_containerd TestOffline (gopogh) 21.79 (chart)
Docker_Linux_containerd TestAddons/Setup (gopogh) 25.00 (chart)
Docker_Linux_containerd TestFunctional/parallel/DashboardCmd (gopogh) 25.00 (chart)
Docker_Linux_containerd TestFunctional/parallel/MountCmd/any-port (gopogh) 25.00 (chart)
Docker_Linux_containerd TestFunctional/parallel/MySQL (gopogh) 25.00 (chart)
Docker_Linux_containerd TestFunctional/parallel/PersistentVolumeClaim (gopogh) 25.00 (chart)
Docker_Linux_containerd TestFunctional/parallel/ServiceCmd (gopogh) 25.00 (chart)
Docker_Linux_containerd TestFunctional/parallel/ServiceCmdConnect (gopogh) 25.00 (chart)
Docker_Linux_containerd TestFunctional/parallel/TunnelCmd/serial/AccessDirect (gopogh) 25.00 (chart)
Docker_Linux_containerd TestFunctional/parallel/TunnelCmd/serial/WaitService/Setup (gopogh) 25.00 (chart)
Docker_Linux_containerd TestFunctional/serial/ExtraConfig (gopogh) 25.00 (chart)
Docker_Linux_containerd TestFunctional/serial/SoftStart (gopogh) 25.00 (chart)
Docker_Linux_containerd TestFunctional/serial/StartWithProxy (gopogh) 25.00 (chart)
Docker_Linux_containerd TestIngressAddonLegacy/serial/ValidateIngressAddonActivation (gopogh) 25.00 (chart)
Docker_Linux_containerd TestIngressAddonLegacy/StartLegacyK8sCluster (gopogh) 25.00 (chart)
Docker_Linux_containerd TestJSONOutput/start/Command (gopogh) 25.00 (chart)
Docker_Linux_containerd TestMultiNode/serial/AddNode (gopogh) 25.00 (chart)
Docker_Linux_containerd TestMultiNode/serial/DeleteNode (gopogh) 25.00 (chart)
Docker_Linux_containerd TestMultiNode/serial/DeployApp2Nodes (gopogh) 25.00 (chart)
Docker_Linux_containerd TestMultiNode/serial/FreshStart2Nodes (gopogh) 25.00 (chart)
Docker_Linux_containerd TestMultiNode/serial/PingHostFrom2Pods (gopogh) 25.00 (chart)
Docker_Linux_containerd TestMultiNode/serial/ProfileList (gopogh) 25.00 (chart)
Docker_Linux_containerd TestMultiNode/serial/StartAfterStop (gopogh) 25.00 (chart)
Docker_Linux_containerd TestMultiNode/serial/StopNode (gopogh) 25.00 (chart)
Docker_macOS TestStartStop/group/newest-cni/serial/Pause (gopogh) 27.61 (chart)
Docker_Linux_containerd TestMultiNode/serial/RestartKeepsNodes (gopogh) 28.21 (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.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Nov 30, 2022
Copy link
Member

@medyagh medyagh left a comment

Choose a reason for hiding this comment

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

lgtm

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: medyagh, 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

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 15394) |
+----------------+----------+---------------------+
| minikube start | 55.7s    | 55.3s               |
| enable ingress | 26.0s    | 27.5s               |
+----------------+----------+---------------------+

Times for minikube ingress: 27.7s 28.6s 25.1s 23.2s 25.2s
Times for minikube (PR 15394) ingress: 29.2s 28.1s 24.7s 28.7s 26.7s

Times for minikube start: 54.0s 54.6s 55.3s 58.6s 55.8s
Times for minikube (PR 15394) start: 54.7s 55.7s 55.7s 55.4s 54.8s

docker driver with docker runtime

+-------------------+----------+---------------------+
|      COMMAND      | MINIKUBE | MINIKUBE (PR 15394) |
+-------------------+----------+---------------------+
| minikube start    | 25.8s    | 25.6s               |
| ⚠️  enable ingress | 21.4s    | 38.6s ⚠️             |
+-------------------+----------+---------------------+

Times for minikube start: 25.7s 25.5s 26.4s 25.6s 25.9s
Times for minikube (PR 15394) start: 25.2s 25.7s 26.3s 24.5s 26.2s

Times for minikube ingress: 24.5s 20.0s 19.9s 20.9s 21.5s
Times for minikube (PR 15394) ingress: 21.0s 22.0s 48.9s 20.0s 81.0s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 15394) |
+----------------+----------+---------------------+
| minikube start | 22.4s    | 22.6s               |
| enable ingress | 26.4s    | 26.2s               |
+----------------+----------+---------------------+

Times for minikube start: 21.2s 22.4s 21.6s 24.8s 21.9s
Times for minikube (PR 15394) start: 21.7s 25.4s 22.1s 22.1s 21.9s

Times for minikube ingress: 26.4s 26.5s 26.4s 26.4s 26.0s
Times for minikube (PR 15394) ingress: 26.4s 26.0s 26.4s 26.0s 26.4s

@minikube-pr-bot
Copy link

These are the flake rates of all failed tests.

Environment Failed Tests Flake Rate (%)
KVM_Linux TestMultiNode/serial/RestartMultiNode (gopogh) 45.10 (chart)
Docker_macOS TestMultiNode/serial/RestartKeepsNodes (gopogh) 53.85 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/enable-default-cni/DNS (gopogh) 68.55 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/bridge/DNS (gopogh) 72.50 (chart)
Docker_Windows TestNetworkPlugins/group/bridge/DNS (gopogh) 86.71 (chart)
Docker_Windows TestNetworkPlugins/group/enable-default-cni/DNS (gopogh) 86.71 (chart)
Docker_macOS TestIngressAddonLegacy/serial/ValidateIngressDNSAddonActivation (gopogh) 96.50 (chart)
Docker_Linux_containerd TestNetworkPlugins/group/calico/Start (gopogh) 97.39 (chart)
Docker_Linux_containerd TestKubernetesUpgrade (gopogh) 100.00 (chart)
Docker_Linux_containerd TestPreload (gopogh) 100.00 (chart)
Docker_macOS TestIngressAddonLegacy/serial/ValidateIngressAddonActivation (gopogh) 100.00 (chart)
Docker_macOS TestIngressAddonLegacy/serial/ValidateIngressAddons (gopogh) 100.00 (chart)
Docker_macOS TestIngressAddonLegacy/StartLegacyK8sCluster (gopogh) 100.00 (chart)
Docker_macOS TestKubernetesUpgrade (gopogh) 100.00 (chart)
Docker_macOS TestMissingContainerUpgrade (gopogh) 100.00 (chart)
Docker_macOS TestNetworkPlugins/group/kubenet/HairPin (gopogh) 100.00 (chart)
Docker_macOS TestRunningBinaryUpgrade (gopogh) 100.00 (chart)
Docker_macOS TestStartStop/group/old-k8s-version/serial/AddonExistsAfterStop (gopogh) 100.00 (chart)
Docker_macOS TestStartStop/group/old-k8s-version/serial/DeployApp (gopogh) 100.00 (chart)
Docker_macOS TestStartStop/group/old-k8s-version/serial/EnableAddonWhileActive (gopogh) 100.00 (chart)
Docker_macOS TestStartStop/group/old-k8s-version/serial/FirstStart (gopogh) 100.00 (chart)
Docker_macOS TestStartStop/group/old-k8s-version/serial/SecondStart (gopogh) 100.00 (chart)
Docker_macOS TestStartStop/group/old-k8s-version/serial/UserAppExistsAfterStop (gopogh) 100.00 (chart)
Docker_macOS TestStoppedBinaryUpgrade/Upgrade (gopogh) 100.00 (chart)
Docker_Windows TestFunctional/parallel/ServiceCmd (gopogh) 100.00 (chart)
Docker_Windows TestNetworkPlugins/group/calico/Start (gopogh) 100.00 (chart)
Docker_Windows TestNetworkPlugins/group/cilium/Start (gopogh) 100.00 (chart)
Docker_Windows TestNetworkPlugins/group/kubenet/HairPin (gopogh) 100.00 (chart)
Hyperkit_macOS TestNetworkPlugins/group/kubenet/HairPin (gopogh) 100.00 (chart)
KVM_Linux_containerd TestPreload (gopogh) 100.00 (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.

@spowelljr spowelljr merged commit 3738000 into kubernetes:master Dec 1, 2022
@spowelljr spowelljr deleted the fixValueSettingTo0 branch December 1, 2022 18:01
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants