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

Antrea antctl get ovsflows response INTERNAL_ERROR #2944

Closed
wenqiq opened this issue Oct 28, 2021 · 2 comments
Closed

Antrea antctl get ovsflows response INTERNAL_ERROR #2944

wenqiq opened this issue Oct 28, 2021 · 2 comments
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.

Comments

@wenqiq
Copy link
Contributor

wenqiq commented Oct 28, 2021

Describe the bug

get ovsflows:

antctl get ovsflows -N 355cf6bb-973e-4969-a39e-2db0a6acf405 -n antrea-scale-test-ns
Error: Get “https://127.0.0.1:10350/ovsflows?namespace=antrea-scale-test-ns&networkpolicy=355cf6bb-973e-4969-a39e-2db0a6acf405”: stream error: stream ID 1; INTERNAL_ERROR

agent logs:

E1028 12:21:40.015378       1 runtime.go:76] Observed a panic: runtime error: invalid memory address or nil pointer dereference
goroutine 566296 [running]:
k8s.io/apiserver/pkg/server/filters.(*timeoutHandler).ServeHTTP.func1.1(0xc001e56540)
        /tmp/gopath/pkg/mod/k8s.io/apiserver@v0.21.0/pkg/server/filters/timeout.go:102 +0x113
panic(0x2332f60, 0x3a00a50)
        /usr/local/go/src/runtime/panic.go:969 +0x175
antrea.io/antrea/pkg/agent/openflow.(*client).GetNetworkPolicyFlowKeys(0xc00069c700, 0xc001e56397, 0x24, 0xc001e56374, 0x14, 0x0, 0x0, 0x0)
        /usr/src/antrea.io/antrea/pkg/agent/openflow/network_policy.go:1439 +0x137
antrea.io/antrea/pkg/agent/apiserver/handlers/ovsflows.getNetworkPolicyFlows(0x29def80, 0xc00089e680, 0xc001e56397, 0x24, 0xc001e56374, 0x14, 0x0, 0x0, 0x203000, 0x203000, ...)
        /usr/src/antrea.io/antrea/pkg/agent/apiserver/handlers/ovsflows/handler.go:178 +0x14f
antrea.io/antrea/pkg/agent/apiserver/handlers/ovsflows.HandleFunc.func1(0x7f6f986efeb0, 0xc00bb70378, 0xc00d1c2700)
        /usr/src/antrea.io/antrea/pkg/agent/apiserver/handlers/ovsflows/handler.go:211 +0x697
net/http.HandlerFunc.ServeHTTP(0xc002b34360, 0x7f6f986efeb0, 0xc00bb70378, 0xc00d1c2700)
        /usr/local/go/src/net/http/server.go:2042 +0x44
k8s.io/apiserver/pkg/server/mux.(*pathHandler).ServeHTTP(0xc002289f80, 0x7f6f986efeb0, 0xc00bb70378, 0xc00d1c2700)
        /tmp/gopath/pkg/mod/k8s.io/apiserver@v0.21.0/pkg/server/mux/pathrecorder.go:241 +0x6fa
k8s.io/apiserver/pkg/server/mux.(*PathRecorderMux).ServeHTTP(0xc00187e070, 0x7f6f986efeb0, 0xc00bb70378, 0xc00d1c2700)
        /tmp/gopath/pkg/mod/k8s.io/apiserver@v0.21.0/pkg/server/mux/pathrecorder.go:234 +0x8c
k8s.io/apiserver/pkg/server.director.ServeHTTP(0x269b917, 0x10, 0xc002ade6c0, 0xc00187e070, 0x7f6f986efeb0, 0xc00bb70378, 0xc00d1c2700)
        /tmp/gopath/pkg/mod/k8s.io/apiserver@v0.21.0/pkg/server/handler.go:154 +0x87f
k8s.io/apiserver/pkg/endpoints/filterlatency.trackCompleted.func1(0x7f6f986efeb0, 0xc00bb70378, 0xc00d1c2700)
        /tmp/gopath/pkg/mod/k8s.io/apiserver@v0.21.0/pkg/endpoints/filterlatency/filterlatency.go:95 +0x193
net/http.HandlerFunc.ServeHTTP(0xc002aaaba0, 0x7f6f986efeb0, 0xc00bb70378, 0xc00d1c2700)
        /usr/local/go/src/net/http/server.go:2042 +0x44
k8s.io/apiserver/pkg/endpoints/filters.WithAuthorization.func1(0x7f6f986efeb0, 0xc00bb70378, 0xc00d1c2700)
        /tmp/gopath/pkg/mod/k8s.io/apiserver@v0.21.0/pkg/endpoints/filters/authorization.go:64 +0x5ba
...

To Reproduce

create large scale networkPolicies(about 5k), and use antctl to get ovsflows

Expected

antctl get ovsflows works well with large scale pods and networkPolicies

Actual behavior

antctl get ovsflows reponse INTERNAL_ERROR, observed a panic in agent log: runtime error: invalid memory address or nil pointer ...

Versions:

  • Antrea version
    1.2.2

  • Kubernetes version

kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v0.21.0-beta.1", GitCommit:"1077b0516d5baf6f2717e4cb34f58236c0fb7a8c", GitTreeState:"clean", BuildDate:"2021-07-23T18:52:05Z", GoVersion:"go1.16.4", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"20", GitVersion:"v1.20.0+c8905da", GitCommit:"c8905da1d144e4625c8355643d8c034692accdcd", GitTreeState:"clean", BuildDate:"2021-04-07T09:12:37Z", GoVersion:"go1.15.7", Compiler:"gc", Platform:"linux/amd64"}
WARNING: version difference between client (0.21) and server (1.20) exceeds the supported minor version skew of +/-1
  • Container runtime
    cri-o
  • Linux kernel version on the Kubernetes Nodes
 uname -r
4.18.0-240.22.1.el8_3.x86_64

Additional context

@wenqiq wenqiq added the kind/bug Categorizes issue or PR as related to a bug. label Oct 28, 2021
@wenqiq wenqiq changed the title Antrea antctl get ovsflows reponse INTERNAL_ERROR Antrea antctl get ovsflows response INTERNAL_ERROR Nov 1, 2021
@github-actions
Copy link
Contributor

This issue is stale because it has been open 90 days with no activity. Remove stale label or comment, or this will be closed in 90 days

@github-actions github-actions bot added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 31, 2022
@tnqn
Copy link
Member

tnqn commented Mar 2, 2022

Fixed by #3335

@tnqn tnqn closed this as completed Mar 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale.
Projects
None yet
Development

No branches or pull requests

2 participants