Bug 851145

Summary: CLI method updateBackingContent fails few minutes after resrource was created
Product: [Other] RHQ Project Reporter: Libor Zoubek <lzoubek>
Component: CLIAssignee: RHQ Project Maintainer <rhq-maint>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 4.4CC: fbrychta, hrupp, jshaughn, loleary, myarboro, theute
Target Milestone: ---   
Target Release: RHQ 4.6   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-12 13:50:10 UTC 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:
Bug Depends On:    
Bug Blocks: 862011    

Description Libor Zoubek 2012-08-23 10:59:06 UTC
Description of problem: This bug seems to be similar to Bug 849779.


Version-Release number of selected component (if applicable):
JON 3.1.1.ER3

How reproducible: always


Steps to Reproduce:
1. create a EAp6 WAR deployment resource (using CLI)
2. wait till resource is discovered and goes UP
3.  run following JS in CLI
ProxyFactory.getResource(id).updateBackingContent('/some/file');
  
Actual results:

Caused by: java.lang.NullPointerException
	at org.rhq.bindings.client.ResourceClientProxy$ClientProxyMethodHandler.updateBackingContent(ResourceClientProxy.java:545)

Expected results: no NPE, content for particular resource gets updated


Additional info: There is only very little amount of time between steps 2 and 3 . approx 6s since resource becomes UP and updateBackingContent is called.

Comment 1 Charles Crouch 2012-09-24 18:54:29 UTC
Targeting for triage in JON312

Comment 2 Larry O'Leary 2012-10-01 15:13:01 UTC
This issue does not appear to deal with timing at all. The updateBackingContent method is broken when invoked on an EAP6 server group deployments.

Comment 3 Larry O'Leary 2012-10-01 15:47:38 UTC
This appears to be a direct result of Bug 856819 - [as7, CLI] NullPointerException when trying to deploy war on EAP 6 in domain mode using CLI and createPackageBackedResource method

Comment 4 Larry O'Leary 2012-10-01 20:03:52 UTC
Scratch what I said in comment 3. This is similar but the fix for Bug 856819 does not fix this one.

Comment 5 Jay Shaughnessy 2012-11-15 15:47:42 UTC
The errant codepath has already been removed previously. Setting to ON_QA as Bug 856819 is already fixed as well, clearing the way for deployment tests.

Comment 6 Filip Brychta 2013-03-11 13:57:56 UTC
Moving back to ON_DEV. This is basically the same as bug 830841 but just for updateBackingContent. NPE is still there in Version: 4.7.0-SNAPSHOT
Build Number: 2174d4c.

Problem:
1- resource was created but the content is still not there:
ResourceClientProxy_$$_javassist_0:
	                 availability: ?
	               backingContent: 
	                     children: 
	                 contentTypes: {file=EAR File}
	                  createdDate: Mon Mar 11 14:39:44 CET 2013
	                  description: JEE enterprise application (EAR)
	                     exploded: no
	                      handler: org.rhq.bindings.client.ResourceClientProxy$ClientProxyMethodHandler@7593c366
	                           id: 10095
	                 measurements: [Exploded?, Path, Availability]
	                 modifiedDate: Mon Mar 11 14:39:44 CET 2013
	                         name: MiscBeans-3.2.2.ear
	                   operations: [stop, restart, start]
	                         path: /home/hudson/jboss-eap5-standalone/jboss-as/server/default/deploy/MiscBeans-3.2.2.ear
	          pluginConfiguration: 
	pluginConfigurationDefinition: ConfigurationDefinition[id=10195, name=Enterprise Application (EAR)]
	                 resourceType: Enterprise Application (EAR)
	                      version:

2- updateBackingContent fails with NPE:
rhqadmin.23.190:7080$ ear.updateBackingContent("MiscBeans-3.2.5.ear","3.2.5");
java.lang.NullPointerException
ear.updateBackingContent("MiscBeans-3.2.5.ear","3.2.5");

3- retrieveBackingContent is already fixed:
rhqadmin.23.190:7080$ ear.retrieveBackingContent("/tmp")                      
java.lang.RuntimeException: Content not available in the content repository. If you recently deployed content to this resource, then the content repository has not yet received the content or content information. The content for a resource is available only after the deployment and discovery process completes. Please try again in a few minutes.
ear.retrieveBackingContent("/tmp")

Comment 7 Jay Shaughnessy 2013-09-12 13:50:10 UTC
This issue can no longer be reproduced, see Bug 862011.