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

Document admin_reloadPlugin API #146

Closed
bgravenorst opened this issue Feb 6, 2020 · 6 comments
Closed

Document admin_reloadPlugin API #146

bgravenorst opened this issue Feb 6, 2020 · 6 comments
Assignees

Comments

@bgravenorst
Copy link
Contributor

Providing a new RPC method admin_reloadPlugin to dynamically (without the need to restart Besu) reload plugin config (this required a new reloadConfiguration method in Besu plugin api as it’s available for all plugins) see hyperledger/besu#261

@bgravenorst bgravenorst self-assigned this Feb 6, 2020
@NicolasMassart
Copy link
Contributor

The method seems not to be called admin_reloadPlugin as indicated in #261 but looking at the code is seems to be plugins_reloadPluginConfig and have parameters. I think Parameters may be the name of the plugin that should be reloaded, but I still have to make sure as my last try was not working.

@MadelineMurray
Copy link
Contributor

@NicolasMassart - once you get this working could you paste a working example into here Bryon can use.

@MadelineMurray
Copy link
Contributor

Was there a CLI option related to this?

@NicolasMassart
Copy link
Contributor

No, only the RPC. No need for a CLI as it would mean that you stop and start Besu to run it, and if you do so, it reloads plugins. SO the only reason you need to reload is when you don't want to restart Besu, hence the RPC method. Will provide the method syntax here asap.

@NicolasMassart
Copy link
Contributor

NicolasMassart commented Feb 12, 2020

In theory, a sample request to reload a Kafka plugin config using RPC would be :
{"jsonrpc":"2.0","method":"plugins_reloadPluginConfig","params":["tech.pegasys.plus.plugin.kafka.KafkaPlugin"],"id":1} with the plugin name being the fully qualified java name of the plugin class.
But I'm having issues with internal error when trying this so I will add more details once I'm sure it works.

@NicolasMassart
Copy link
Contributor

NicolasMassart commented Feb 13, 2020

The issue on this Kafka example is related to some changes in the Event stream plugin (see private Jira https://pegasys1.atlassian.net/browse/PIE-2292).
Also I wonder, as the Kafka plugin is not open source, if we should use it as an example. But we have no open source plugins, so we may use a fake plugin name in our example request.
It would then be something like: {"jsonrpc":"2.0","method":"plugins_reloadPluginConfig","params":["com.example.SamplePlugin"],"id":1}

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

3 participants