Bug 1025848
Summary: | "Resource classLoader not found" error seen on upgraded agents, race condition with plugin download | ||
---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | Elias Ross <genman> |
Component: | Agent | Assignee: | Nobody <nobody> |
Status: | NEW --- | QA Contact: | |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 4.9 | CC: | gerhard.dreschler, hrupp, jshaughn |
Target Milestone: | --- | ||
Target Release: | RHQ 4.13 | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | Type: | Bug | |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Elias Ross
2013-11-01 18:00:27 UTC
Note: this is with patch, Bug 991149 I'm guessing the issue is the agent waited a bit for the download to complete, saw that it started, but timed out, then the plugin container started with the plugins in the process of being downloaded. With a very busy server (maxed out on threads, for example), this can happen I suppose. AgentMain.java: boolean updating = PluginUpdate.waitForUpdateToComplete(pc_config, 30000L); // false int after = plugin_dir.list().length; if ((after == 0) && !updating) { // true && !false -> true // still nothing and it doesn't look like we are downloading - try to update them again right now // (doing this because I saw a case where the startup update somehow happened just prior to the // registration finishing, so the original update was rejected by the server as "unauthorized") updatePluginsNow(m_clientSender); after = plugin_dir.list().length; } keep_waiting = ((after == 0) || (updating)); // evals false I think it's pretty fragile to check for the size of a directory. It should be checking if the download process completed or not, not the state of the filesystem. Why can't the PluginUpdate object return the number of plugins to download and the number of plugins downloaded? I'm actually thinking that it's not necessarily a plugin download race condition, but the initialization mess that I've addressed in Bug 991149 . ClassLoader resourceClassloader = resourceContainer.getResourceClassLoader(); if (resourceClassloader == null) { throw new PluginContainerException("Resource classLoader not found for " + resource + " - cannot create ResourceComponent."); } I need to trace this better, obviously. Seems like it has to do with the inventory manager having a sync issue with the server. I could reproduce the problem every time, except after uninv. the agent, the problem went away. Pushing to 4.11 Bump the target version now that 4.11 is out. Bumping again. Is this still an issue? |