Bug 753141 - child resources (sporadically) appear/disappear in resource tree
child resources (sporadically) appear/disappear in resource tree
Status: CLOSED DUPLICATE of bug 847014
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
i686 Linux
high Severity high (vote)
: ---
: ---
Assigned To: Ian Springer
Mike Foley
Depends On:
Blocks: jon30-sprint8
  Show dependency treegraph
Reported: 2011-11-11 07:50 EST by Andreas Dietrich
Modified: 2013-08-05 20:42 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2012-08-20 14:32:47 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
all nodes displayed (15.06 KB, image/png)
2011-11-11 07:50 EST, Andreas Dietrich
no flags Details
some nodes disappeared (12.34 KB, image/png)
2011-11-11 07:51 EST, Andreas Dietrich
no flags Details

  None (edit)
Description Andreas Dietrich 2011-11-11 07:50:55 EST
Created attachment 533052 [details]
all nodes displayed

Description of problem / How reproducible / Steps to Reproduce / Actual results / Expected results

(Tested with our own Oracle Database plugin which works perfectly with RHQ 3.1.0 GA.)
The plugin (normally) renders various "2-level-grouped" child resources (all DB instance components have only direct resource children which are grouped in a two-level hierarchy) in the form

Platform x
- Oracle DB Instances
-- Instance dbv
--- Backup (*)
---- RMAN backup jobs
--- Configuration
----- Initialization Parameters
------ ... (+)
--- Dbvisit (*)
---- Dbvisit Gap Reports
----- Gap Report (+)
--- Health (*)
----- ...
------ (+)
----- ...
------ (+)
--- Licensing
---- ...
--- Performance
---- ...
--- Space
---- ...

   (+) = direct subresources of "Instance dbv" (non-(+)-nodes are "visual" groups)
   (*) = disappearing tree-nodes (inclusive subtree of course)

(see also attached screenshots)

Like statet in (*) and seen in the screenshots always subnodes (*) disappear/appear in the following cases:

1. disappear when navigated via platform (any direct platform link in the GUI, i.e. http://rhq-01.test.aspicon.local:7080/coregui/#Resource/10351)
(which is obviously the worst case!)

2. appear when "Instance dbv" is requested directly via compatible "DB Instance" group (via inventory list or any other direct link, i.e. http://rhq-01.test.aspicon.local:7080/coregui/#Resource/12543)

3. disappear when clicking "Refresh" on "Instance dbv" or any ancestor of it

Additional info:

We set up the environment from the ground with a fresh Oracle database underneath.
Comment 1 Andreas Dietrich 2011-11-11 07:51:49 EST
Created attachment 533054 [details]
some nodes disappeared
Comment 2 Andreas Dietrich 2011-11-11 07:52:52 EST
no RHQ server log entries indicated some server problem here
Comment 3 Andreas Dietrich 2011-11-11 07:56:16 EST
If one clicks on the "Instance dbv" the browser link updates to point to this resources. If one refreshes the page via browser refresh all nodes are displayed again.
Comment 5 Ian Springer 2011-11-14 11:13:46 EST

When you said RHQ 3.1.0.GA, did you mean to say 4.1.0? There was 3.1.0 release.

A fix for https://bugzilla.redhat.com/show_bug.cgi?id=736517 went in between the 4.1.0 and 4.2.0 releases. Prior to that fix, the Resource tree loading code would load the children and grandchildren of the selected node and the children and grandchildren of each of its ancestors. Now we only load the children of the selected node and the children of each of its ancestors. For example, for the following Resource hiearachy:


If the user navigated to A, we used to load A, B, C, and D into the tree, but now we only load A and B. In order to load C and D, the user now has to click the expand icon next to the B node.

So I think you're seeing expected behavior. You're just used to the way things worked in 4.1.0. Can you confirm this is the case?
Comment 6 Ian Springer 2011-11-14 11:14:37 EST
Typo correction: There was -no- 3.1.0 release.
Comment 7 Andreas Dietrich 2011-11-14 14:45:53 EST
sorry ... should have looked it up ... we built this one: http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=tag;h=refs/tags/RHQ_3_0_1_GA

Please have a look at the two screenshots. Then you will understand that it's a bug and at first has nothing to do with the "load-depth" at first.

The following can be seen:

1. The logic of retrieving and/or dispaying the tree-nodes seems to differ depending on which URL you call (platform or platform child).

2. Somehow it obviously happens, that platform-grandchildren are not retrieved/displayed although existing.

Another maybe unrelated comment to the change you mentioned ... obviously the plain visibility of a node (and its children, if expanded) should always mean, that this node, its ancestor nodes, its sibling nodes (and all its children - on node expansion) have to be fetched in the tree and be displayed.
Comment 8 Ian Springer 2011-11-15 17:36:59 EST
(In reply to comment #7)
> 1. The logic of retrieving and/or dispaying the tree-nodes seems to differ
> depending on which URL you call (platform or platform child).

This is correct and by design. If you navigate to a platform, we'll load that platform's children only. To view grandchildren, you'll need to click the expand icon next to one of the child nodes. If you navigate to a platform child, we'll load that Resource's children (i.e. the platform's grandchildren). 

If you want to look at the code of the method used to load the initial set of Resources based on the node the user navigated to, see ResourceManagerBean.getResourceLineageAndSiblings() (in the server-jar module).

> 2. Somehow it obviously happens, that platform-grandchildren are not
> retrieved/displayed although existing.

Correct, they are not displayed if you initially navigated to the platform. you would need to click on a platform-child for the platform-grandchildren to be loaded and displayed.

I'm not sure there is a bug here, since what you've described is the expected behavior.

I do see that three of your Resource types are missing in the 2nd screenshot. I'm not sure why the others are not also displayed. Note, the missing nodes are autogroup nodes, not Resource nodes.

It would help a lot if you could tell me how to reproduce the issue using one of the ResourceTypes that is bundled with RHQ. If that's not possible, perhaps you could attach a minimal plugin that can be used to reproduce the issue.
Comment 9 Jay Shaughnessy 2012-08-20 14:12:13 EDT
The issues here, in addition to what has been described above, is likely the fact that when we expanded resource nodes in the tree (meaning, when we had to fetch children that were not already fetched in the initial call to ResourceManagerBean.getResourceLineageAndSiblings()) we fetched at most 200 children.  Additionally, they were not sorted server-side and as such the 200 we fetched could differ from fetch to fetch, or refresh.

So, entire child types may disappear, etc.

This is a tricky problem since we need to avoid an unbounded fetch for situations where there may be a huge number of siblings.

Work has recently been done in this area for bug 847014 (RHQ 4.5/JON 3.1.1) and likely responds to this issue.

I think this one can be closed as a duplicate.
Comment 10 Jay Shaughnessy 2012-08-20 14:32:47 EDT

*** This bug has been marked as a duplicate of bug 847014 ***

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