Bug 789419

Summary: no way to manually add (import) top level servers to inventory
Product: [Other] RHQ Project Reporter: John Mazzitelli <mazz>
Component: Core UIAssignee: Charles Crouch <ccrouch>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 4.2CC: ccrouch, hbrock, hrupp, mazz, skondkar, spinder
Target Milestone: ---   
Target Release: JON 3.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 751097 Environment:
Last Closed: 2013-09-03 15:05:40 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: 751097    
Bug Blocks:    
Attachments:
Description Flags
Screenshot-Right_click_Menu
none
Screenshot-Import_Menu none

Description John Mazzitelli 2012-02-10 18:30:41 UTC
+++ This bug was initially created as a clone of Bug #751097 +++

Try to manually add a (non-discovered) postgres server or jboss as or standalone jmx server  into inventory.
There is no place in the UI where the user can trigger a "manual add" for those kinds of servers.

This used to be a righ-click option on the platform in the tree, but that is gone.

--- Additional comment from ian.springer on 2011-11-03 12:07:25 EDT ---

Created attachment 531594 [details]
screenshot showing that i do see the Postgres Server type listed

--- Additional comment from hrupp on 2011-11-03 12:12:11 EDT ---

Created attachment 531595 [details]
Screenshot listing only limited items

--- Additional comment from hrupp on 2011-11-03 12:14:20 EDT ---

Created attachment 531596 [details]
Screenshot listing only limited items

--- Additional comment from ian.springer on 2011-11-04 10:44:48 EDT ---

I wasn't able to reproduce this. I see all the importable types, including the top-level server types, listed in both locations.

[master 7f74d06] (http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=7f74d06) makes various improvements in the code used by coregui to load top-level server and service types (the types that are missing from Heiko's Import type selection menus). Heiko, I'm hoping I'll get lucky and this will fix things for you. Please give it another try and let me know.

--- Additional comment from hrupp on 2011-11-04 11:09:54 EDT ---

Created attachment 531793 [details]
That change helps a lot

--- Additional comment from mfoley on 2012-02-07 14:21:45 EST ---

changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

Comment 1 John Mazzitelli 2012-02-10 18:36:26 UTC
since two people have see this behavior in RHQ, it might be best to get this into jon 3.0.1 too.

see bug #751097 and bug #720456 for what was fixed around this area. specifically, master commits: 7f74d06 and d47438f

Comment 2 Ian Springer 2012-02-14 18:49:15 UTC
The two commits from master have been cherry-picked:

http://git.fedorahosted.org/git?p=rhq/rhq.git;a=commitdiff;h=0d4efdc
http://git.fedorahosted.org/git?p=rhq/rhq.git;a=commitdiff;h=f3c5218

After cherry-picking those, there was an additional NPE I had to fix to get import working:

http://git.fedorahosted.org/git?p=rhq/rhq.git;a=commitdiff;h=1979ff1

I'll check whether this NPE affects master as well.

Comment 3 Ian Springer 2012-02-14 18:55:54 UTC
This was already fixed in master by commit 36fec92. Apparently that commit did not get properly merged into the 3.0.x branch.

Comment 4 Ian Springer 2012-02-14 21:10:45 UTC
I realized the cherry-picks did not merge in to the 3.0.x branch cleanly, because there had been a bunch of other commits to master that modified ResourceTypeRepsository in the time between the two commits I cherry-picked.

So I decided it would be safest to copy the HEAD version of ResourceTypeRepository from master to the 3.0.x branch:

http://git.fedorahosted.org/git?p=rhq/rhq.git;a=commitdiff;h=39ac89b

Comment 5 Ian Springer 2012-02-15 02:25:14 UTC
It turns out there was only one other change to ResourceTypeRepsository that happened in master *after* the release/jon3.0.x branch got created:

http://git.fedorahosted.org/git?p=rhq/rhq.git;a=commitdiff;h=36fec92

So my last commit (39ac89b) essentially incorporates the changes from that commit. Here's the comment from that commit:

"Fix issue in handling of non-cached metadata types in type repo. Also,optimize further by only querying for metadata that is not already cached for the requested types."

Comment 6 Simeon Pinder 2012-02-17 05:28:49 UTC
Moving to ON_QA for testing with JON 3.0.1.GA RC5 or better:
https://brewweb.devel.redhat.com//buildinfo?buildID=199114

Comment 7 Sunil Kondkar 2012-02-17 11:15:44 UTC
Verified on JON 3.0.1.GA RC5 (Build Number: dd8a001:fbca611)

The right-click menu on the platform in the tree and import button menu in Platform->Inventory->Child Resources is populated with child types. Please refer the attached screenshots.

Comment 8 Sunil Kondkar 2012-02-17 11:17:14 UTC
Created attachment 563889 [details]
Screenshot-Right_click_Menu

Comment 9 Sunil Kondkar 2012-02-17 11:17:57 UTC
Created attachment 563890 [details]
Screenshot-Import_Menu

Comment 11 Heiko W. Rupp 2013-09-03 15:05:40 UTC
Bulk closing of old issues in VERIFIED state.