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

WIP: kindnet + ipalias #17206

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

justinsb
Copy link
Member

No description provided.

@k8s-ci-robot k8s-ci-robot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. area/provider/gcp Issues or PRs related to gcp provider labels Jan 13, 2025
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from justinsb. For more information see the Code Review Process.

The full list of commands accepted by this bot can be found 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 cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 13, 2025
@justinsb justinsb force-pushed the kindnet_with_ipalias_on_gce branch from 6f42dc0 to 41997ba Compare January 13, 2025 15:39
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 13, 2025
@justinsb
Copy link
Member Author

/test pull-kops-e2e-k8s-gce-ipalias

if c.Spec.Networking.GCP != nil {
return true
}

if c.Spec.Networking.Kindnet != nil {
// TODO: Are we _always_ using ipalias - should we at least check the cloud is GCP?
Copy link
Member

Choose a reason for hiding this comment

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

yeah, I don't want kindnet to use overlays, there are already plenty of options ... besides, we'll focus on IPv6 for development that will not require overlays as there is plenty of space

Copy link
Member Author

Choose a reason for hiding this comment

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

Great - I think for (pure) IPv6 we probably don't want to trigger the configuration of alias IP ranges on the instances here, but ... let's see how it goes.

@aojea
Copy link
Member

aojea commented Jan 13, 2025

kindnet is installed but the nodes are not ready https://storage.googleapis.com/kubernetes-ci-logs/pr-logs/pull/kops/17206/pull-kops-e2e-gce-cni-kindnet/1878892464866070528/artifacts/control-plane-us-west4-c-bwxs/kube-scheduler.log

I0113 20:20:40.001787      11 schedule_one.go:1056] "Unable to schedule pod; no fit; waiting" pod="kube-system/coredns-78f4699fbb-7gvjj" err="0/5 nodes are available: 1 node(s) had untolerated taint {node-role.kubernetes.io/control-plane: }, 4 node(s) had untolerated taint {node.kubernetes.io/network-unavailable: }. preemption: 0/5 nodes are available: 5 Preemption is not helpful for scheduling."

The kube-controller-manager is also running an ipam controller

https://storage.googleapis.com/kubernetes-ci-logs/pr-logs/pull/kops/17206/pull-kops-e2e-gce-cni-kindnet/1878892464866070528/artifacts/control-plane-us-west4-c-bwxs/kube-controller-manager.log

0113 20:13:44.595238      11 flags.go:64] FLAG: --cidr-allocator-type="RangeAllocator"
I0113 20:13:44.595243      11 flags.go:64] FLAG: --client-ca-file=""
I0113 20:13:44.595248      11 flags.go:64] FLAG: --cloud-config="/etc/kubernetes/in-tree-cloud.config"
I0113 20:13:44.595254      11 flags.go:64] FLAG: --cloud-provider="external"

and the cloud-controller-manager is also running

E0113 20:15:35.836061       1 cloud_cidr_allocator.go:300] Error updating CIDR for "control-plane-us-west4-c-bwxs": failed to patch node CIDR: Node "control-plane-us-west4-c-bwxs" is invalid: [spec.podCIDRs: Invalid value: []string{"10.4.4.0/24", "10.4.0.0/24"}: may specify no more than one CIDR for each IP family, spec.podCIDRs: Forbidden: node updates may not change podCIDR except from "" to valid]

E0113 20:30:02.830199       1 cloud_cidr_allocator.go:300] Error updating CIDR for "control-plane-us-west4-c-bwxs": failed to patch node CIDR: Node "control-plane-us-west4-c-bwxs" is invalid: [spec.podCIDRs: Invalid value: []string{"10.4.4.0/24", "10.4.0.0/24"}: may specify no more than one CIDR for each IP family, spec.podCIDRs: Forbidden: node updates may not change podCIDR except from "" to valid]


what version of the cloud controller manager are we running, that seems buggy, since is trying to allocate two cirds of the same family, or maybe is trying to append ... independently, there can be only one ipam controller running at a time and it should be type CloudAllocator

@justinsb justinsb force-pushed the kindnet_with_ipalias_on_gce branch from e7ed9b1 to 670c065 Compare January 13, 2025 22:14
@justinsb
Copy link
Member Author

Tweaked the logic in /kubecontrollermanager.go to turn off some controllers when using kindnet, similar to what we do with "GCE" network (which is really ip alias networking)

@justinsb
Copy link
Member Author

/test pull-kops-e2e-gce-cni-kindnet

@justinsb
Copy link
Member Author

/retest

Looks like a MIG naming collision:

E0113 23:15:21.563523   52471 op.go:137] GCE operation failed: googleapi: Error 400: The instance_group_manager resource 'projects/k8s-infra-e2e-boskos-154/zones/us-east4-b/instanceGroupManagers/b-control-plane-us-east4-b-e2e-pr17206-pull-kops-e2e-gce-45jsju' is already being used by 'projects/k8s-infra-e2e-boskos-154/regions/us-east4/backendServices/api-e2e-pr17206-pull-kops-e2e-gce-cni-kindnet-k8s-local'

@justinsb
Copy link
Member Author

/test pull-kops-e2e-gce-cni-kindnet

Same weird flake


// If the cloud is allocating the node CIDRs, that should be done by CCM
if o.GetCloudProvider() == kops.CloudProviderGCE && gce.UsesIPAliases(o) {
kcm.AllocateNodeCIDRs = fi.PtrTo(false)
Copy link
Member

Choose a reason for hiding this comment

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

this is not working, is sitll allocating ips https://storage.googleapis.com/kubernetes-ci-logs/pr-logs/pull/kops/17206/pull-kops-e2e-gce-cni-kindnet/1878987987832803328/artifacts/control-plane-us-west3-c-qr8f/kube-controller-manager.log

I0114 02:32:44.480427      11 flags.go:64] FLAG: --allocate-node-cidrs="true"
I0114 02:32:44.480848      11 flags.go:64] FLAG: --allow-metric-labels="[]"
I0114 02:32:44.480874      11 flags.go:64] FLAG: --allow-metric-labels-manifest=""
I0114 02:32:44.480882      11 flags.go:64] FLAG: --allow-untagged-cloud="false"
I0114 02:32:44.480888      11 flags.go:64] FLAG: --attach-detach-reconcile-sync-period="1m0s"
I0114 02:32:44.480896      11 flags.go:64] FLAG: --authentication-kubeconfig="/var/lib/kube-controller-manager/kubeconfig"
I0114 02:32:44.481142      11 flags.go:64] FLAG: --authentication-skip-lookup="false"
I0114 02:32:44.481322      11 flags.go:64] FLAG: --authentication-token-webhook-cache-ttl="10s"
I0114 02:32:44.481332      11 flags.go:64] FLAG: --authentication-tolerate-lookup-failure="false"
I0114 02:32:44.481338      11 flags.go:64] FLAG: --authorization-always-allow-paths="[/healthz,/readyz,/livez]"
I0114 02:32:44.481683      11 flags.go:64] FLAG: --authorization-kubeconfig="/var/lib/kube-controller-manager/kubeconfig"
I0114 02:32:44.481694      11 flags.go:64] FLAG: --authorization-webhook-cache-authorized-ttl="10s"
I0114 02:32:44.481702      11 flags.go:64] FLAG: --authorization-webhook-cache-unauthorized-ttl="10s"
I0114 02:32:44.481707      11 flags.go:64] FLAG: --bind-address="0.0.0.0"
I0114 02:32:44.481716      11 flags.go:64] FLAG: --cert-dir=""
I0114 02:32:44.481721      11 flags.go:64] FLAG: --cidr-allocator-type="RangeAllocator"

@justinsb justinsb force-pushed the kindnet_with_ipalias_on_gce branch from 670c065 to a663d8b Compare January 14, 2025 12:39
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jan 14, 2025
@justinsb
Copy link
Member Author

/test pull-kops-e2e-gce-cni-kindnet

1 similar comment
@aojea
Copy link
Member

aojea commented Jan 14, 2025

/test pull-kops-e2e-gce-cni-kindnet

@k8s-ci-robot
Copy link
Contributor

k8s-ci-robot commented Jan 14, 2025

@justinsb: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kops-e2e-gce-cni-calico e7ed9b1 link true /test pull-kops-e2e-gce-cni-calico

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

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-sigs/prow repository. I understand the commands that are listed here.

@aojea
Copy link
Member

aojea commented Jan 14, 2025

it failed twice the same test, I need to debug this

@aojea
Copy link
Member

aojea commented Jan 14, 2025

trying to repro so we avoid the roundtrip, we'll keep you posted

@aojea
Copy link
Member

aojea commented Jan 14, 2025

/test pull-kops-e2e-gce-cni-kindnet

@aojea
Copy link
Member

aojea commented Jan 15, 2025

@justinsb it is green now

@justinsb
Copy link
Member Author

justinsb commented Jan 15, 2025

it is green now

Well that's good, I guess!

Do we think that's because of the MTU change, something you fixed, or maybe just a flake?

If MTU, I think the default is 1460 - should we use a different value (e.g. the more standard 1500?). Or should kindnet (and all CNIs) pick up the current MTU? Or both? :-)

@justinsb justinsb force-pushed the kindnet_with_ipalias_on_gce branch from dccad14 to c9d4e28 Compare January 15, 2025 11:22
@k8s-ci-robot k8s-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/gcp Issues or PRs related to gcp provider cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants