Bug 1011095 - Give created resources the name supplied by the user even if the managed object has no "name" attribute
Give created resources the name supplied by the user even if the managed obje...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Plugin Container (Show other bugs)
4.9
Unspecified Unspecified
medium Severity medium (vote)
: ---
: RHQ 4.10
Assigned To: Thomas Segismont
Mike Foley
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-09-23 11:29 EDT by Thomas Segismont
Modified: 2014-04-23 08:30 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-04-23 08:30:18 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Thomas Segismont 2013-09-23 11:29:56 EDT
This bug follows BZ886119 - "JON is using JNDI when referring to child Datasource resource instead of specified Resource name".

As a reminder, when a created resource is discovered, it is given a name by the agent plugin. If the underlying managed object has no "name" attribute, the agent plugin gives a name to the resource which is completely different than the user supplied name.

The proposal is to maintain a cache of the latest (10 minutes) resource creation requests (CreateResourceReport holds the user supplied name), and to lookup for an entry in this cache before sending the inventory report to the server, in order to update the newly discovered resource name, if needed.
Comment 1 Thomas Segismont 2013-10-21 05:16:21 EDT
Fixed in master

commit 7652569a57e633470fa325470533aa35769fbeda
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Thu Oct 17 12:32:36 2013 +0200
    
Made ResourceFactoryServerService#completeCreateResource synchronous
    
When merging inventory report, look for a CreateResourceHistory entity if merging a creatable resource.
If it exists, use the user supplied resource name.
    
Remove unused code in ResourceFactoryManagerBean
    
Added integration test
Comment 2 Thomas Segismont 2013-10-30 10:42:39 EDT
Additional commit in master

commit 3cee61d26c5151750a727502fd5c95c4bf715a18
Author: Thomas Segismont <tsegismo@redhat.com>
Date:   Wed Oct 30 15:34:28 2013 +0100

Revert "Bug 886119 - JON is using JNDI when referring to child Datasource resource instead of specified Resource name"
Comment 3 Heiko W. Rupp 2014-04-23 08:30:18 EDT
Bulk closing of 4.10 issues.

If an issue is not solved for you, please open a new BZ (or clone the existing one) with a version designator of 4.10.

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