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

CALICO_NETWORKING_BACKEND none creates noisy log output #7819

Closed
tobiasgiese opened this issue Jun 27, 2023 · 10 comments
Closed

CALICO_NETWORKING_BACKEND none creates noisy log output #7819

tobiasgiese opened this issue Jun 27, 2023 · 10 comments

Comments

@tobiasgiese
Copy link
Contributor

tobiasgiese commented Jun 27, 2023

With calico v3.26.1 there is an issue with CALICO_NETWORKING_BACKEND: none.
Using no network backend creates alot of log output. Every second the following lines will be printed:

W0627 10:59:35.128237     457 feature_gate.go:241] Setting GA feature gate ServiceInternalTrafficPolicy=true. It will be removed in a future release.
2023-06-27 10:59:35.132 [INFO][457] monitor-addresses/startup.go 432: Early log level set to info
2023-06-27 10:59:35.132 [INFO][457] monitor-addresses/startup.go 315: Skipped monitoring node IP changes when CALICO_NETWORKING_BACKEND=none

With the latest master (i.e., v3.27.0-dev) this issue does not occur.

Reproducable with kind:

  1. Create a v1.26 kind cluster
❯ kind create cluster --image kindest/node:v1.26.4@sha256:f4c0d87be03d6bea69f5e5dc0adb678bb498a190ee5c38422bf751541cebe92e
  1. Apply calico v3.26.1 with backend type none
❯ curl https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/calico.yaml | sed -r 's/(calico_backend:) "bird"/\1 "none"/' | kubectl apply -f -
  1. Wait for calico-node Pods running and see the log output
❯ kubectl -n kube-system logs calico-node-l7mv4 --tail 9
Defaulted container "calico-node" out of: calico-node, upgrade-ipam (init), install-cni (init), mount-bpffs (init)
W0627 11:06:02.068549     650 feature_gate.go:241] Setting GA feature gate ServiceInternalTrafficPolicy=true. It will be removed in a future release.
2023-06-27 11:06:02.072 [INFO][650] monitor-addresses/startup.go 432: Early log level set to info
2023-06-27 11:06:02.072 [INFO][650] monitor-addresses/startup.go 315: Skipped monitoring node IP changes when CALICO_NETWORKING_BACKEND=none
W0627 11:06:03.114813     666 feature_gate.go:241] Setting GA feature gate ServiceInternalTrafficPolicy=true. It will be removed in a future release.
2023-06-27 11:06:03.119 [INFO][666] monitor-addresses/startup.go 432: Early log level set to info
2023-06-27 11:06:03.119 [INFO][666] monitor-addresses/startup.go 315: Skipped monitoring node IP changes when CALICO_NETWORKING_BACKEND=none
W0627 11:06:04.159043     680 feature_gate.go:241] Setting GA feature gate ServiceInternalTrafficPolicy=true. It will be removed in a future release.
2023-06-27 11:06:04.163 [INFO][680] monitor-addresses/startup.go 432: Early log level set to info
2023-06-27 11:06:04.163 [INFO][680] monitor-addresses/startup.go 315: Skipped monitoring node IP changes when CALICO_NETWORKING_BACKEND=none

Setting CALICO_STARTUP_LOGLEVEL or FELIX_LOGSEVERITYSCREEN to error does not fix the issue.

Your Environment

  • Calico version v3.26.1
  • Orchestrator version (e.g. kubernetes, mesos, rkt): kind v1.26.4
  • Operating System and version:
  • Link to your project (optional):

Tobias Giese tobias.giese@mercedes-benz.com, Mercedes-Benz Tech Innovation GmbH, legal info/Impressum

@caseydavenport
Copy link
Member

Looks like that spammy log was removed in this commit: 08f2765

Seems like a reasonable enough cherry-pick if anyone wants to have a go

@tobiasgiese
Copy link
Contributor Author

Seems like a reasonable enough cherry-pick if anyone wants to have a go

I can try this, for sure. Should I open a cherry-pick PR after testing?

@tobiasgiese
Copy link
Contributor Author

tobiasgiese commented Jun 28, 2023

@caseydavenport only this cherry-pick creates a nil pointer because configureASNumber (L187 from the stacktrace below is L188 on master)

needsNodeUpdate = configureASNumber(node) || needsNodeUpdate
// Populate a reference to the node based on orchestrator node identifiers.

needs node.Spec.BGP.ASNumber (L705 from the stacktrace below is L706 on master)

if node.Spec.BGP.ASNumber == nil {

calico-node-ghflt calico-node W0628 07:25:57.491768       9 feature_gate.go:241] Setting GA feature gate ServiceInternalTrafficPolicy=true. It will be removed in a future release.
calico-node-ghflt calico-node panic: runtime error: invalid memory address or nil pointer dereference
calico-node-ghflt calico-node [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x19e7718]
calico-node-ghflt calico-node 
calico-node-ghflt calico-node goroutine 1 [running]:
calico-node-ghflt calico-node github.com/projectcalico/calico/node/pkg/lifecycle/startup.configureASNumber(0xc0000e8000)
calico-node-ghflt calico-node 	/go/src/github.com/projectcalico/calico/node/pkg/lifecycle/startup/startup.go:705 +0x58
calico-node-ghflt calico-node github.com/projectcalico/calico/node/pkg/lifecycle/startup.Run()
calico-node-ghflt calico-node 	/go/src/github.com/projectcalico/calico/node/pkg/lifecycle/startup/startup.go:187 +0x8e5
calico-node-ghflt calico-node main.main()
calico-node-ghflt calico-node 	/go/src/github.com/projectcalico/calico/node/cmd/calico-node/main.go:146 +0x732
calico-node-ghflt calico-node Calico node failed to start

Btw, this is also an issue with the latest v3.27.0-0.dev and master

@tobiasgiese
Copy link
Contributor Author

tobiasgiese commented Jun 28, 2023

@caseydavenport i've created a PR that fixes this nil pointer. After merge we can cherry-pick both PRs to backport this change to v3.26

@caseydavenport
Copy link
Member

@tobiasgiese good catch! I just gave that PR a look over and gave some suggestions - LMK what you think.

@tobiasgiese
Copy link
Contributor Author

tobiasgiese commented Jun 28, 2023

@caseydavenport adjusted the PR according to your suggestions and it's working as expected. Thanks for your review! 👍🏻

@tobiasgiese
Copy link
Contributor Author

@caseydavenport created PR #7824 to cherry-pick both commits.

@sridhartigera
Copy link
Member

@tobiasgiese Thanks for your PRs. Closing this issue.

@mindw
Copy link

mindw commented Sep 27, 2023

Any news on when this gets released? or at least if there is a workaround till it is?
Tx!

@tobiasgiese
Copy link
Contributor Author

@mindw seems like v3.26.3 has been released last week
https://github.com/projectcalico/calico/releases/tag/v3.26.3

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

No branches or pull requests

4 participants