Bug 551056
| Summary: | agent created multiple classloaders for a single resource when starting clean | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Other] RHQ Project | Reporter: | John Mazzitelli <mazz> | ||||
| Component: | Plugin Container | Assignee: | John Mazzitelli <mazz> | ||||
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Sunil Kondkar <skondkar> | ||||
| Severity: | high | Docs Contact: | |||||
| Priority: | high | ||||||
| Version: | 1.4 | ||||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | 2.4 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2010-08-12 16:44:37 UTC | Type: | --- | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
John Mazzitelli
2009-12-28 18:35:47 UTC
Created attachment 380671 [details]
patch to avoid using uuid as a unique resource key in classloader manager
see attached cl.patch for a proposed patch that no longer uses UUID in the classloader manager - instead it uses a "Canonical" key object that uses resource key/type/plugin, parent key/type/plugin as the canonical resource ID. I ran a quick test and it at least fixes the problem I had in my particular use-case. I think this should be a good general solution, but more testing needs to be done.
preliminary testing shows that this is OK now with the patch. I'll be checking it in with some additional code to the inventory manager and agent plugin so it can report more details on classloaders. this can be moved along to qa... though QA will probably need to wait for me to checkin the byteman plugin and jdbc trace plugin before they can test it (I don't know how to replicate the problem without those two). this has been checked into master branch qa -> skondkar In the reproducible steps, when I say, "Commit to inventory a resource that needs an instance classloader", this means any resource whose descriptor has the classLoader="instance" attribute, like this:
<server name="some-resource-name" classLoader="instance" ...>
Today I think one of the few plugins that use instance classloaders is the JBossAS 5 plugin - so you need to inventory a JBossAS 5 server to test this. I see this in the jboss-as-5 plugin:
<server name="JBossAS Server"
classLoader="instance" ...
Verified on maser build#165 (Revision: 1d862cf744ee88a5024414996b2adb9bffd52eaa) Installed JBossAS 5 server on agent and after it's inventory and availability , shutdown the agent and restarted it using --cleanconfig. Repeated shutdown and restart with --cleanconfig few times. Observed that the agent.log did not display ClassCastException. Mass-closure of verified bugs against JON. |