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

Update Antrea Octant plugin to support latest Octant version #2951

Merged

Conversation

antoninbas
Copy link
Contributor

We can now support Octant 0.24 (latest version). Older versions (up to
0.19) may be supported as well (not tested).

By updating the Octant module dependency to v0.24.0, we can also start
using the Octant Dashboard client to perform CRUD operations on Antrea
CRDs, thus ensuring that the plugin is always using the correct cluster
context (see #1519).

A few other notable things:

  • We can remove replace directives in the plugin go.mod file (for now?)
    since K8s dependencies between Antrea and Octant are compatible.
  • Octant now has a new logging mechanism for plugins but unfortunately
    it is still buggy so we are not updating our plugin to use it.
  • The Dashboard client supports a link generator to easily generate
    links to resources
    (Add link generator to DashboardClient vmware-archive/octant#2276). Unfortunately I
    believe that in practice it would make our plugin code more
    complicated. We can revisit this in the future.

Fixes #1519
Fixes #2315
Fixes #2676

Signed-off-by: Antonin Bas [email protected]

@antoninbas antoninbas added the area/component/octant-plugin Issues or PRs related to the octant-plugin component label Oct 30, 2021
@codecov-commenter
Copy link

codecov-commenter commented Oct 30, 2021

Codecov Report

Merging #2951 (3fce0af) into main (9a52de9) will decrease coverage by 1.37%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2951      +/-   ##
==========================================
- Coverage   60.94%   59.56%   -1.38%     
==========================================
  Files         292      292              
  Lines       24742    24742              
==========================================
- Hits        15079    14738     -341     
- Misses       8012     8386     +374     
+ Partials     1651     1618      -33     
Flag Coverage Δ
kind-e2e-tests 46.61% <ø> (-1.48%) ⬇️
unit-tests 40.13% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
pkg/agent/util/net.go 16.32% <0.00%> (-22.45%) ⬇️
pkg/agent/route/route_linux.go 26.88% <0.00%> (-19.80%) ⬇️
pkg/agent/openflow/pipeline.go 67.77% <0.00%> (-7.72%) ⬇️
pkg/agent/util/ipset/ipset.go 61.53% <0.00%> (-7.70%) ⬇️
pkg/controller/networkpolicy/status_controller.go 71.24% <0.00%> (-5.89%) ⬇️
pkg/agent/controller/traceflow/packetin.go 59.25% <0.00%> (-5.35%) ⬇️
pkg/util/k8s/client.go 46.34% <0.00%> (-4.88%) ⬇️
pkg/agent/proxy/types/groupcounter.go 90.56% <0.00%> (-3.78%) ⬇️
...agent/controller/traceflow/traceflow_controller.go 69.85% <0.00%> (-3.55%) ⬇️
pkg/agent/controller/networkpolicy/reject.go 84.67% <0.00%> (-3.23%) ⬇️
... and 12 more

@antoninbas antoninbas force-pushed the support-more-recent-octant-version branch from d10e035 to 474bfa2 Compare November 1, 2021 19:37
@antoninbas antoninbas added this to the Antrea v1.5 release milestone Nov 2, 2021
Copy link
Contributor

@mengdie-song mengdie-song left a comment

Choose a reason for hiding this comment

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

Hi @antoninbas,

Thanks so much for helping make the antrea-octant-plugin changes and enhancements!
I was busy working on other problems previously and just found this change.
The change looks great to me.

We can now support Octant 0.24 (latest version). Older versions (up to
0.19) may be supported as well (not tested).

By updating the Octant module dependency to v0.24.0, we can also start
using the Octant Dashboard client to perform CRUD operations on Antrea
CRDs, thus ensuring that the plugin is always using the correct cluster
context (see antrea-io#1519).

A few other notable things:
* We can remove replace directives in the plugin go.mod file (for now?)
  since K8s dependencies between Antrea and Octant are compatible.
* Octant now has a new logging mechanism for plugins but unfortunately
  it is still buggy so we are not updating our plugin to use it.
* The Dashboard client supports a link generator to easily generate
  links to resources
  (vmware-archive/octant#2276). Unfortunately I
  believe that in practice it would make our plugin code more
  complicated. We can revisit this in the future.

Fixes antrea-io#1519
Fixes antrea-io#2315
Fixes antrea-io#2676

Signed-off-by: Antonin Bas <[email protected]>
@antoninbas antoninbas force-pushed the support-more-recent-octant-version branch from 1140746 to 3fce0af Compare November 30, 2021 20:59
Copy link
Contributor

@mengdie-song mengdie-song left a comment

Choose a reason for hiding this comment

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

Thanks a lot for making the change!

@antoninbas
Copy link
Contributor Author

@mengdie-song thanks for the review

@antoninbas
Copy link
Contributor Author

/skip-all

@antoninbas antoninbas merged commit 4851df5 into antrea-io:main Dec 2, 2021
@antoninbas antoninbas deleted the support-more-recent-octant-version branch December 2, 2021 19:51
@wu105
Copy link

wu105 commented Feb 24, 2022

Our clusters run antrea v0.13.3 (tanzu 1.4) and will be v1.2.3 (tanzu 1.5). What versions of the octant and the antrea plug-in versions should we use for viewing Tracceflow? See #2676 and related Traceflow issues.

@mengdie-song
Copy link
Contributor

Hi @wu105,

In your case, you can use the latest antrea-octant-plugin with octant v0.24.0 even though you are not using the latest Antrea. Another option will be using antrea-octant-plugin(v0.13.3 or v1.2.3) with octant v0.16.1.

@wu105
Copy link

wu105 commented Feb 25, 2022

@mengdie-song Thank you for the information. Octant v0.16.1 and antrea plugin v0.13.3 worked for our clusters running antrea v0.13.3. I did not try Octant v0.16.1 with antrea plugin v1.2.3.

I did try Octant v0.24.0 with anrea plugin v1.5.0, v1.4.0, v1.2.3, and v1.3.0, all not working in similar ways: When octant starts, the plugin is loaded, but soon after clicking on the Antrea link on the UI, Octant showed page not found error with the address field displaying http://127.0.0.1:7777/#/antrea-octant-plugin, and the Octant logs show the following:

Antrea plugin v1.5.0

2022-02-24T22:23:09.662-0500	INFO	plugin/manager.go:664	restarting plugin	{"plugin-name": 
"antrea-octant-plugin-windows-x86_64.exe"}
2022-02-24T22:23:09.662-0500	ERROR	api/content_manager.go:159	generate content	{"client-id": 
"397d234c-95ea-11ec-8c51-0205857feb80", "err": "generate content: grpc client content: rpc error: code = Canceled desc 
= grpc: the client connection is closing", "content-path": "antrea-octant-plugin"}
github.com/vmware-tanzu/octant/internal/api.(*ContentManager).runUpdate.func1
	/__w/octant/octant/internal/api/content_manager.go:159
github.com/vmware-tanzu/octant/internal/api.(*InterruptiblePoller).Run.func1
	/__w/octant/octant/internal/api/poller.go:86
github.com/vmware-tanzu/octant/internal/api.(*InterruptiblePoller).Run
	/__w/octant/octant/internal/api/poller.go:95
github.com/vmware-tanzu/octant/internal/api.(*ContentManager).Start
	/__w/octant/octant/internal/api/content_manager.go:133
2022-02-24T22:23:09.662-0500	ERROR	api/navigation_manager.go:101	load namespaces	{"component": "websocket-client", 
"client-id": "397d234c-95ea-11ec-8c51-0205857feb80", "poller-name": "navigation", "poller-instance": 
"822ca9ff-8ac9-486d-a322-50870e6531e3", "err": "unable to generate navigation for module antrea-octant-plugin: grpc 
client response: rpc error: code = Canceled desc = grpc: the client connection is closing"}
github.com/vmware-tanzu/octant/internal/api.(*NavigationManager).runUpdate.func1
	/__w/octant/octant/internal/api/navigation_manager.go:101
github.com/vmware-tanzu/octant/internal/api.(*InterruptiblePoller).Run.func1
	/__w/octant/octant/internal/api/poller.go:86
github.com/vmware-tanzu/octant/internal/api.(*InterruptiblePoller).Run
	/__w/octant/octant/internal/api/poller.go:95
github.com/vmware-tanzu/octant/internal/api.(*NavigationManager).Start
	/__w/octant/octant/internal/api/navigation_manager.go:90

antrea plugin 1.4.0, 1.2.3, 1.3.0

2022-02-24T20:47:30.854-0500	ERROR	api/content_manager.go:159	generate content	{"client-id": 
"dd416467-95dc-11ec-936f-0205857feb80", "err": "generate content: grpc client content: rpc error: code = Unavailable1.4.0 
desc = error reading from server: read tcp 127.0.0.1:58295->127.0.0.1:10017: wsarecv: An existing connection was 
forcibly closed by the remote host.", "content-path": "antrea-octant-plugin"}
github.com/vmware-tanzu/octant/internal/api.(*ContentManager).runUpdate.func1
	/__w/octant/octant/internal/api/content_manager.go:159
github.com/vmware-tanzu/octant/internal/api.(*InterruptiblePoller).Run.func1
	/__w/octant/octant/internal/api/poller.go:86
github.com/vmware-tanzu/octant/internal/api.(*InterruptiblePoller).Run
	/__w/octant/octant/internal/api/poller.go:95
github.com/vmware-tanzu/octant/internal/api.(*ContentManager).Start
	/__w/octant/octant/internal/api/content_manager.go:133

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/component/octant-plugin Issues or PRs related to the octant-plugin component
Projects
None yet
4 participants