Red Hat Bugzilla – Bug 680312
resource inventory>child history is empty
Last modified: 2011-05-23 21:13:04 EDT
Inventory>Child History is not yet implemented
need to write criteria for the following entities:
and we need a table to show both histories combined
may need to do something about this:
(In reply to comment #2)
> may need to do something about this:
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.setParentResource(null); can't null this out since the query DeleteResourceHistory.QUERY_FIND_BY_PARENT_RESOURCE_ID needs it
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
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.
Created attachment 491238 [details]
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.
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.
note: command is "plugins update" to run on the agent after uploading the attached test plugin.
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
Bookkeeping - closing bug - fixed in recent release.