Bug 680312 - resource inventory>child history is empty
resource inventory>child history is empty
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
4.0.0.B02
Unspecified Unspecified
high Severity high (vote)
: ---
: ---
Assigned To: John Mazzitelli
Corey Welton
:
Depends On:
Blocks: rhq4 jon3
  Show dependency treegraph
 
Reported: 2011-02-24 20:52 EST by John Mazzitelli
Modified: 2011-05-23 21:13 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-05-23 21:12:48 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
resourcefactory-plugin.zip (20.55 KB, application/x-zip-compressed)
2011-04-11 09:33 EDT, John Mazzitelli
no flags Details

  None (edit)
Description John Mazzitelli 2011-02-24 20:52:38 EST
Inventory>Child History is not yet implemented
Comment 1 John Mazzitelli 2011-04-01 16:56:33 EDT
need to write criteria for the following entities:

1) DeleteResourceHistory
2) CreateResourceHistory

and we need a table to show both histories combined
Comment 2 John Mazzitelli 2011-04-06 21:06:21 EDT
may need to do something about this:

https://fedorahosted.org/pipermail/rhq-devel/2011-March/000660.html
Comment 3 John Mazzitelli 2011-04-08 09:35:53 EDT
(In reply to comment #2)
> may need to do something about this:
> 
> https://fedorahosted.org/pipermail/rhq-devel/2011-March/000660.html

I am testing to see if this one line change will solve the problem I have with showing delete child history items without affecting too much infrastructure (i.e. without breaking other things)

@@ -188,3 +188,3 @@ public class ResourceFactoryManagerBean implements ResourceFactoryManagerLocal,
             resource.setInventoryStatus(InventoryStatus.DELETED);
-            resource.setParentResource(null);
+            //resource.setParentResource(null); can't null this out since the query DeleteResourceHistory.QUERY_FIND_BY_PARENT_RESOURCE_ID needs it
             resource.setItime(System.currentTimeMillis());
Comment 4 John Mazzitelli 2011-04-08 17:16:52 EDT
commit d501f6a28cfa4b74edbd320a398c77af5076d5a2 has a one line change to not set the parent resource null. initial testing shows this doesn't affect uninventory or deleting of resources
Comment 5 John Mazzitelli 2011-04-08 17:21:09 EDT
the current data shown in the history now includes very limited information on what was deleted. need more SLSB methods to provide infomration on DeleteResourceHistory such as the name of the resource that was deleted. Right now, all you know is something was deleted, you don't know what.

I think a little more info can be retrieved from teh create history too, while I'm at it.
Comment 6 John Mazzitelli 2011-04-11 09:33:39 EDT
Created attachment 491238 [details]
resourcefactory-plugin.zip

the attached resourcefactory-plugin.zip has a target/resourcefactory-plugin-1.0-snapshot.jar that you can deploy into RHQ to test manually creating and deleting resources in order to test this issue. The plugin auto-detects a "My Top Server" resource that you have to import via the auto-discovery queue. You can then create/delete Child resources under that "My Top Server" resource.
Comment 7 John Mazzitelli 2011-04-11 12:10:25 EDT
to test this, we have to test both creating and deleting resources and make sure they are created/deleted on the agent as well as in the DB:

1) install a plugin that supports creating and deleting child resources. either use the jboss-as plugin and create/delete its child "Datasource" resource or use the attached test plugin which lets you auto-discover a resource "My Top Server" that can have children created and deleted (see comment #6)

2) Create a couple children and make sure the history items show up in the Inventory>Child History subtab. Make sure they are created in the agent (you can use the agent's "inventory" prompt command to do this. Make sure the Inventory>Services page shows you the deleted resources in the table.

3) Delete the children you created. Make sure the delete history items show up in the Inventory>Child History subtab and make sure the agent deleted the children from its inventory. Make sure the Inventory>Services page doesn't show you the deleted resources in the table.

I'll create a new issue to enhance this ChildHistory subtab. The delete history doesn't tell you much other than SOMETHING was deleted, but doesn't tell you what was deleted.
Comment 8 Mike Foley 2011-05-02 13:52:47 EDT
note: command is "plugins update" to run on the agent after uploading the attached test plugin.
Comment 9 Mike Foley 2011-05-02 14:24:49 EDT
verified as follows: rhq 4.0 rc2, using the attached plugin.  i uploaded the plugin.  on the agent, i did 'plugins update'.  i added and deleted child resources
Comment 10 Corey Welton 2011-05-23 21:12:48 EDT
Bookkeeping - closing bug - fixed in recent release.
Comment 11 Corey Welton 2011-05-23 21:12:48 EDT
Bookkeeping - closing bug - fixed in recent release.
Comment 12 Corey Welton 2011-05-23 21:13:04 EDT
Bookkeeping - closing bug - fixed in recent release.

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