Skip to content
This repository has been archived by the owner on Jan 19, 2023. It is now read-only.

Installing a plugin requires restart of main octant process. #178

Closed
n3wscott opened this issue Aug 16, 2019 · 7 comments · Fixed by #2818
Closed

Installing a plugin requires restart of main octant process. #178

n3wscott opened this issue Aug 16, 2019 · 7 comments · Fixed by #2818
Assignees
Labels
api enhancement New feature or request plugin question Further information is requested

Comments

@n3wscott
Copy link

I installed the sample plugin and it did not show up until I restarted.

@wwitzel3 wwitzel3 added api enhancement New feature or request question Further information is requested labels Aug 16, 2019
@imjasonh
Copy link

imjasonh commented Sep 9, 2019

+1, This also makes plugin development a bit more painful, since I have to rebuild my plugin and restart Octant to see changes.

@jdolitsky
Copy link

Hi, I ran into the same issue. Needing to restart octant to check plugin changes during development etc.

I put together this script to autobuild the plugin and restart octant on source changes: https://gist.github.com/jdolitsky/34b67113afe515e096064a4d01fd4dd6

@jdolitsky
Copy link

Would it be useful to add some flag like --watch-plugins that periodically re-checks/re-loads the plugin directory?

@bryanl
Copy link
Contributor

bryanl commented Nov 16, 2019

Octant should be able to restart a plugin or plugins. Or perhaps you kill the plugin and Octant could could restart registered plugins. We will draft upma solution and tag the issue.

@imjasonh
Copy link

Just heard of this script to help with plugin development, which looks promising: https://gist.github.com/jdolitsky/34b67113afe515e096064a4d01fd4dd6

I haven't tried it yet, but I plan to when I have time to play with plugin development again.

@jdolitsky
Copy link

Octant could restart registered plugins

That would work great. I just tried to kill the plugin process manually, and Octant falls into a bad state, w/ this in the logs over and over:

err in navigation: grpc client response: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = "transport: error while dialing: dial unix /var/folders/51/0bdn93qj1s98v438m1y357lw0000gn/T/plugin228550586: connect: connection refused"2019-11-16T23:37:51.773-0600	ERROR	api/navigation_manager.go:97	load namespaces	{"poller-name": "navigation", "err": "grpc client response: rpc error: code = Unavailable desc = all SubConns are in TransientFailure, latest connection error: connection error: desc = \"transport: error while dialing: dial unix /var/folders/51/0bdn93qj1s98v438m1y357lw0000gn/T/plugin228550586: connect: connection refused\""}
github.com/vmware-tanzu/octant/internal/api.(*NavigationManager).runUpdate.func1
	/go/src/github.com/vmware-tanzu/octant/internal/api/navigation_manager.go:97
github.com/vmware-tanzu/octant/internal/api.(*job).run.func1
	/go/src/github.com/vmware-tanzu/octant/internal/api/poller.go:111

The webapp remains available, but the lefthand menu then disappears:
Screen Shot 2019-11-16 at 11 44 03 PM

Problem resolved by restarting octant

@wwitzel3
Copy link
Contributor

My initial thought for doing something like this is to extend the existing process launcher to have a bit more management to it.

  • add fsnotify/fswatch to the plugin folder
  • compare the filename that changed to our filename list in our process management
  • kill/restart the plugin with a matching filename that has changed

Related reading:

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api enhancement New feature or request plugin question Further information is requested
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants