Bug 680312
Summary: | resource inventory>child history is empty | ||||||
---|---|---|---|---|---|---|---|
Product: | [Other] RHQ Project | Reporter: | John Mazzitelli <mazz> | ||||
Component: | Core UI | Assignee: | John Mazzitelli <mazz> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Corey Welton <cwelton> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 4.0.0.B02 | CC: | mfoley | ||||
Target Milestone: | --- | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2011-05-24 01:12:48 UTC | Type: | --- | ||||
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: | 585306, 678340 | ||||||
Attachments: |
|
Description
John Mazzitelli
2011-02-25 01:52:38 UTC
need to write criteria for the following entities: 1) DeleteResourceHistory 2) CreateResourceHistory and we need a table to show both histories combined may need to do something about this: https://fedorahosted.org/pipermail/rhq-devel/2011-March/000660.html (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()); 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]
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.
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. Bookkeeping - closing bug - fixed in recent release. Bookkeeping - closing bug - fixed in recent release. |