nirmata / kube-static-egress-ip

Kubernetes CRD to manage static egress IP addresses for workloads
Apache License 2.0
213 stars 38 forks source link

segfault from static-egressip-controller #45

Open howels opened 4 years ago

howels commented 4 years ago

Managed to load everything but seeing segfaults from static-egressip-controller. No hints as to what is happening. Any ideas?

Running on k8s 1.14.3 (edited the CRDs to use the older beta API version) with Flannel.

$ kubectl get pods -o wide -n kube-system -l name=static-egressip-gateway-manager
NAME                                               READY   STATUS             RESTARTS   AGE   IP             NODE                    NOMINATED NODE   READINESS GATES
static-egressip-gateway-manager-56b76ccbbf-59cr4   0/1     CrashLoopBackOff   1          8s    10.233.69.36   n2   <none>           <none>
static-egressip-gateway-manager-56b76ccbbf-k6mpc   0/1     CrashLoopBackOff   1          8s    10.233.68.22   n3   <none>           <none>
static-egressip-gateway-manager-56b76ccbbf-rxxpp   0/1     CrashLoopBackOff   1          8s    10.233.67.34   n1   <none>           <none>

$ kubectl -n kube-system logs static-egressip-gateway-manager-56b76ccbbf-59cr4
I0609 23:15:52.898442       1 main.go:45] Running Nirmata static egress ip controller version:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x1a0 pc=0xed62aa]

goroutine 1 [running]:
github.com/nirmata/kube-static-egress-ip/pkg/utils.GetNodeIP(0x0, 0xc420317b00, 0x0, 0x0, 0x0, 0x136c1e0)
        /workspace/golang/src/github.com/nirmata/kube-static-egress-ip/pkg/utils/node.go:47 +0x3a
github.com/nirmata/kube-static-egress-ip/pkg/controller.NewEgressIPController(0x13a7dc0, 0xc420317b00, 0x137bda0, 0xc4204152d0, 0x13759e0, 0xc420444600, 0x136fce0, 0xc420444690, 0x12)
        /workspace/golang/src/github.com/nirmata/kube-static-egress-ip/pkg/controller/controller.go:81 +0x63
main.main()
        /workspace/golang/src/github.com/nirmata/kube-static-egress-ip/cmd/static-egressip-controller/main.go:68 +0x30b
jerem0808 commented 3 years ago

Hi, I had the same issue and found the solution here https://github.com/nirmata/kube-static-egress-ip/issues/33 probably you have missed in the logs where it says that it doesn't find the service endpoints. You have to redeploy the resources in the same namespace where you service is.