Bug 534324 (RHQ-1131)

Summary: fix performance of ResourceError callback from agent to server
Product: [Other] RHQ Project Reporter: Joseph Marques <jmarques>
Component: InventoryAssignee: Joseph Marques <jmarques>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 1.1.2Keywords: Task
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: All   
URL: http://jira.rhq-project.org/browse/RHQ-1131
Whiteboard:
Fixed In Version: 1.2 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On: 534325, 534326    
Bug Blocks:    

Description Joseph Marques 2008-11-19 11:59:00 EST
this needs to be fixed in trunk and 1_1_2_GA_CP

problem is that InventoryManager.sendResourceErrorToServer(ResourceError resourceError) contains a Resource entity, which (incorrectly) represents the ENTIRE agent-side resource hierarchy...as opposed to just the single resource that had the error.

so, if an agent has a large hierarchy to manage (several MB in serialized form), and if several resources are DOWN (which means they throw InvalidPluginConfigurationExceptions, which in turn force these ResourceErrors to be sent to the server), then the ClientCommandSender will queue them up and might eventually run out of memory...under the assumption that the sheer weight of the ResourceError objects make the agent incapable of keeping up with the sending. 

fix is to use "new Resource(resource_id)" trick to only send a light-weight proxy up to the server, reducing the payload from MB to a few bytes.
Comment 1 Joseph Marques 2008-11-19 12:17:02 EST
patched trunk and 1_1_2_GA_CP.  will re-open and add more sub-tasks if this needs to be patched in other branches as well.
Comment 2 Charles Crouch 2008-11-19 18:55:29 EST
associated case: 234996
Comment 3 Red Hat Bugzilla 2009-11-10 15:24:40 EST
This bug was previously known as http://jira.rhq-project.org/browse/RHQ-1131