Bug 1068816 - RFE: Need remote way to work with Server Plugins, controls, and configuration
Summary: RFE: Need remote way to work with Server Plugins, controls, and configuration
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Plugin Container
Version: 4.9
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: RHQ 4.12
Assignee: RHQ Project Maintainer
QA Contact: Mike Foley
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-22 00:12 UTC by Elias Ross
Modified: 2014-12-15 11:35 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-12-15 11:35:49 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 621906 0 low CLOSED Expose remote API for ServerPluginsBean 2021-02-22 00:41:40 UTC

Internal Links: 621906

Description Elias Ross 2014-02-22 00:12:05 UTC
Description of problem:

Server plugins are a great way to add functionality to the system. However, all the functionality only works from the UI.

There needs to be some API usable from the CLI for:
1) Listing the deployed server plugins (by criteria?)
2) Invoking a server plugin control
4) Setting configuration
5) Restarting the plugin container (?)

Less necessary:
1) Start/stopping/disable/undeploy a server plugin
2) Uploading a plugin
3) Relationship queries

ServerPluginsLocal could become the defacto remote interface, although you would need some form of authenticated methods or only allow administrators.


Version-Release number of selected component (if applicable): 4.9

Comment 1 Heiko W. Rupp 2014-02-22 08:02:33 UTC
I can see your point, but am reluctant to expose that via CLI, but would rather do it via REST-api (and yes then the apis are not orthogonal). CLI has the issue with binary (in)compatibility.
I also wonder if the current api is really what should be exposed or if it should be cut differently.
I would like to get more community feedback first, so that the exposed api matches what is needed.

Comment 2 Elias Ross 2014-02-22 23:07:12 UTC
Writing scripts in JavaScript for administration is so productive, I don't know if a REST interface really improves on productivity. If and when we update RHQ itself, updating the RHQ CLI library is quite straightforward.

To build any kind of sophisticated tooling that uses the REST API requires building a sort of secondary Java API around that anyway. If RHQ had such a thing, that would be great.

Of confusing things, there is an exposed API for Storage Nodes (StorageNodeManagerRemote), and I'm not sure why the plugin system isn't exposed, as it's probably of greater interest to administrators. I definitely interact more with the plugin system than the storage system.

AgentManagerLocal
PluginManagerLocal

would also be nice to expose, in some fashion.

I'll bring this up in the message boards...

Comment 3 Lukas Krejci 2014-06-12 09:31:10 UTC
commit 2404fdf0864a779cd7e5af63ae52841687596d8a
Author: Lukas Krejci <lkrejci>
Date:   Thu Jun 12 11:27:43 2014 +0200

    [BZ 1068816] - Forgot to add an API change record for the newly exposed
    method.

commit d1cf00128ae79434020c543e9a563b244aa5b234
Merge: 5d42dcc 0a5323e
Author: Lukas Krejci <metlos.github.com>
Date:   Wed Jun 11 15:50:39 2014 +0200

    Merge pull request #44 from genman/genman/moreremote
    
    BZ 1068816 - More remote methods for managing agent and server plugins, metrics

Comment 4 John Mazzitelli 2014-06-16 18:03:07 UTC
(In reply to Lukas Krejci from comment #3)
> commit 2404fdf0864a779cd7e5af63ae52841687596d8a

This is a bad commit - breaks the CLI LocalClient stuff. The itests-2 tests are showing this:

Caused by: java.lang.RuntimeException: Failed to lookup local interface to EJB ServerPluginManagerBean, localJNDI=[java:global/rhq/rhq-server/ServerPluginManagerBean!org.rhq.enterprise.server.plugin.ServerPluginsLocal]
	at org.rhq.enterprise.server.util.LookupUtil.lookupByName(LookupUtil.java:721)
	at org.rhq.enterprise.server.util.LookupUtil.getEjb(LookupUtil.java:670)
	at org.rhq.enterprise.client.LocalClient.getLocalSLSB(LocalClient.java:142)

The problem is a bad update to RhqManagers:

   ServerPluginManager(ServerPluginsRemote.class, "${ServerPluginManager}"), //

ServerPluginManager isn't an EJB - that's the class that deals with the server-side plugin manager that runs in the server. I believe this needs to be "ServerPlugins".

I'm going to change this - I think it will fix the problem.  Without this fix, itests-2 shows 12 failures, all related.

Comment 5 John Mazzitelli 2014-06-16 18:09:22 UTC
> I'm going to change this - I think it will fix the problem.  Without this
> fix, itests-2 shows 12 failures, all related.

git commit to master: 3049c67

Comment 6 Elias Ross 2014-06-17 05:04:39 UTC
Sorry about this. If you see something break from me in the future, I'm always willing to adjust the patch.

Comment 7 Lukas Krejci 2014-06-17 09:21:31 UTC
commit faa39e42539d845d6fbbfcc857afa00b92647ed1
Author: Lukas Krejci <lkrejci>
Date:   Tue Jun 17 09:03:13 2014 +0200

    [BZ 1068816] ServerPlugins -> ServerPluginManager to have consistent names

Comment 8 Heiko W. Rupp 2014-12-15 11:35:49 UTC
Bulk close of items fixed in RHQ 4.12

If you think this is not solved, then please open a *new* BZ and link to this one.


Note You need to log in before you can comment on or make changes to this bug.