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

[v2.0.0 Issue]: panic: runtime error: invalid memory address or nil pointer dereference #1558

Closed
CoreTechnologyAG opened this issue Oct 16, 2023 · 3 comments
Assignees

Comments

@CoreTechnologyAG
Copy link

What happened?
Kube-Router does not start after starting with v2.0.0 and afterthat the whole kubernetes cluster aren't working.

If we start the kube-router with the latest v1.6 version, it works fine.

What did you expect to happen?
Starting Kube-Router V2.0 as it did in V1.6

How can we reproduce the behavior you experienced?
Steps to reproduce the behavior:

  1. Start Kube-router based on https://raw.githubusercontent.com/cloudnativelabs/kube-router/master/daemonset/kubeadm-kuberouter-all-features.yaml

Screenshots / Architecture Diagrams / Network Topologies

  • kubernetes cluster with
    • 3 Base-Server with etcd and coredns
    • 2 Kubernetes Master-Server kubeadm, kubelet, kubectl: GitVersion:"v1.26.6",
    • 3 Kubernetes Node-Server

System Information (please complete the following information):

  • Kube-Router Version: v2.0.0 (Latest)
  • Kube-Router Parameters:
    - --run-router=true
    - --run-firewall=true
    - --run-service-proxy=true
    - --bgp-graceful-restart=true
    - --kubeconfig=/var/lib/kube-router/kubeconfig
  • Kubernetes Version: 1.26.6-00 on Ubuntu 20.04.6 LTS
  • Cloud Type: on premise
  • Kubernetes Deployment Type: Kubeadm
  • Kube-Router Deployment Type: DaemonSet
  • Cluster Size: 3 Nodes

Logs, other output, metrics
I1012 08:14:55.591795 1 network_policy_controller.go:163] Starting network policy controller
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x98 pc=0x188395e]
goroutine 154 [running]:
github.com/cloudnativelabs/kube-router/v2/pkg/controllers/proxy.(*NetworkServicesController).deleteHairpinIptablesRules(0xc00070b878?, {0x22d179c?, 0x3d?})
/build/pkg/controllers/proxy/network_services_controller.go:1361 +0x5e
github.com/cloudnativelabs/kube-router/v2/pkg/controllers/proxy.(*NetworkServicesController).syncHairpinIptablesRules(0xc000512c40)
/build/pkg/controllers/proxy/network_services_controller.go:1279 +0x33e
github.com/cloudnativelabs/kube-router/v2/pkg/controllers/proxy.(*NetworkServicesController).doSync(0xc000512c40)
/build/pkg/controllers/proxy/network_services_controller.go:374 +0x210
github.com/cloudnativelabs/kube-router/v2/pkg/controllers/proxy.(*NetworkServicesController).Run(0xc000512c40, 0x0?, 0xc0000a0360, 0xc00005ef40)
/build/pkg/controllers/proxy/network_services_controller.go:287 +0x57a
created by github.com/cloudnativelabs/kube-router/v2/pkg/cmd.(*KubeRouter).Run
/build/pkg/cmd/kube-router.go:196 +0x10aa

Thanks for your work at all for the amazing job.
Ritzo

@aauren
Copy link
Collaborator

aauren commented Oct 16, 2023

Have you read and followed the release instructions for v2.0.0? https://github.com/cloudnativelabs/kube-router/releases/tag/v2.0.0

@flababah
Copy link

flababah commented Oct 16, 2023

FYI, I ran into the same problem today trying to create a new cluster from scratch following
https://github.com/cloudnativelabs/kube-router/blob/master/docs/kubeadm.md

The yaml file seems to contain the new ClusterRole RBAC updates for endpointslices (da73dea) that were mentioned in the release instructions.

The setup is as basic as it can get. Single node, kubeadm init --pod-network-cidr='192.168.0.0/16' and kubeadm-kuberouter-all-features.yaml applied. Same nil pointer dereference. Any ideas?

kubeadm-kuberouter.yaml (--run-service-proxy=false) works.

@aauren
Copy link
Collaborator

aauren commented Oct 16, 2023

I think that I've found the issue. Working on a fix now.

aauren added a commit that referenced this issue Oct 16, 2023
Don't run iptables or ipset logic for disabled families

Fixes #1558
@aauren aauren closed this as completed in 4cd6d94 Oct 19, 2023
aauren added a commit that referenced this issue Oct 19, 2023
Don't run iptables or ipset logic for disabled families

Fixes #1558
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants