Bug 734592 - in summary header for autogroups, Name, Description, and Recursive fields are editable and for some autogroups, the Name field contains the string "null (...)"
Summary: in summary header for autogroups, Name, Description, and Recursive fields are...
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.0.1
Hardware: Unspecified
OS: Unspecified
medium vote
Target Milestone: ---
: JON 3.0.0,RHQ 4.3.0
Assignee: Jay Shaughnessy
QA Contact: Mike Foley
Depends On:
Blocks: rhq42
TreeView+ depends on / blocked
Reported: 2011-08-30 20:36 UTC by Ian Springer
Modified: 2013-08-06 00:40 UTC (History)
3 users (show)

Fixed In Version: 4,3
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2012-02-07 19:19:28 UTC

Attachments (Terms of Use)
screenshot (192.44 KB, image/png)
2011-08-30 20:39 UTC, Ian Springer
no flags Details
Actually the editing of the name and recursiveness is still possible ; the name change is only on the right hand panel while the tree is still "right". (24.74 KB, image/png)
2011-10-18 16:04 UTC, Heiko W. Rupp
no flags Details
Changes seem to go to a resource group 10001 which does not exist in the system (29.03 KB, image/png)
2011-10-18 16:06 UTC, Heiko W. Rupp
no flags Details

System ID Priority Status Summary Last Updated
Red Hat Bugzilla 817165 None None None Never
Red Hat Bugzilla 817185 None None None Never

Internal Links: 817165 817185

Description Ian Springer 2011-08-30 20:36:14 UTC
Do we want to allow users to edit the name and description of autogroups? I know they're real groups under the covers now, so perhaps it's fine. In any case, I don't think we want to allow them to set the Recursive flag to true, since the group would no longer be a normal autogroup at that point.

The second part of this issue only occurs for certain autogroups. Specifically I see it for autogroups of service-d-metrics Resources, which is a ResourceType defined in the perftest plugin. The Name field has the value "null ( service-d-metrics )". The "null" portion should instead be the Resource name of the autogroup's parent Resource ("server-d-2" in this case). I'm attaching a screenshot that shows the issue.

Comment 1 Ian Springer 2011-08-30 20:39:16 UTC
Created attachment 520686 [details]

Comment 2 Ian Springer 2011-08-30 21:10:33 UTC
I also see the "null" in the Resource name for the Embedded WAR and JBossCache autogroups under the RHQ Server. I don't know what these all have in common...

Comment 3 Jay Shaughnessy 2011-08-31 13:16:42 UTC
I don't think we should allow any editing of the fields. That is not really 
high priority but I'm setting to high due to the other part of this, the
occasional null in the names. That's ugly and wrong.

Comment 4 Jay Shaughnessy 2011-08-31 16:39:27 UTC
Although I did see it happen locally I can't get it to happen again, now.
And I can't explain how it happens as it would seem a Resource.getName()
method is returning null, which should never happen. It is not
predictable, I could not get it to happen for the same autogroup

It would seem like the AutoGroupTreeNode.parentResource must have a
null name when the tree is loaded. Again, I don't know how and I
can't repro at the moment.

Although ugly this does not prevent the use or usefuleness of the AG,
so for now, I'm stopping the investigation to see if we can learn
more going forward.

Comment 5 Charles Crouch 2011-09-22 12:59:50 UTC
Making fields read-only should be an easy fix

Comment 6 Charles Crouch 2011-10-04 12:14:59 UTC
IIRC this is one jay volunteered for, so pushing it into the RHQ4.2 bucket.
If I misremembered Jay, please unassign and Heiko/Lukas triage it

Comment 7 Heiko W. Rupp 2011-10-17 16:13:00 UTC
Jay says, he can not reproduce those, but that he has seen them in rare occurrences, but which does not limit the ability to use autogroups.

Lowering the prio

Comment 8 Heiko W. Rupp 2011-10-18 16:04:31 UTC
Created attachment 528842 [details]
Actually the editing of the name and recursiveness is still possible ; the name change is only on the right hand panel while the tree is still "right".

Comment 9 Heiko W. Rupp 2011-10-18 16:06:36 UTC
Created attachment 528843 [details]
Changes seem to go to a resource group 10001 which does not exist in the system

Comment 10 Heiko W. Rupp 2011-10-18 16:25:06 UTC
Looking into the r/w issue at least.

Comment 11 Heiko W. Rupp 2011-10-18 16:37:09 UTC
9f9f742 in master - making the details read-only for autogroups

Comment 12 Heiko W. Rupp 2011-10-19 08:40:15 UTC
About the "null (type)" : This is set in org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.GeneralProperties#onInit which gets its data from 
org.rhq.enterprise.gui.coregui.client.inventory.groups.detail.ResourceGroupTitleBar#update and the callback into the group manager

And indeed here the query does not return the name, authzType is NONE - changing to AUTO_CLUSTER does not change the behavior.

Btw: displaying such an autgroup takes 4(!) calls into the backend, which takes 4 round trips to the database

Comment 13 Heiko W. Rupp 2011-10-19 15:39:47 UTC
While my analysis was correct, the data the backend provides was pre-computed, so if the pre-compute put the null in, the backend call could only get null out.

45a797b in master -- code by Jay Shaughnessy

QA: to test, you need to un-inventory stuff first, as otherwise you may have bogus entries in the DB persisted.

Comment 14 Mike Foley 2011-11-02 22:04:10 UTC
documenting this BZ as having caused a regression with non-rhqadmin users...which is now https://bugzilla.redhat.com/show_bug.cgi?id=750897

Comment 15 Jay Shaughnessy 2011-11-04 19:44:00 UTC
This needs to be re-verified again as the previous fix was re-done to solve
bug 751091. That fix was insufficient and has been fixed again. Note that
751091 does not need to be re-verified, only this bug.

master         commit f7523d5757af1d0955dc75358e0a9f4e54be43fe
release_jon3.x commit 2932513b74ff180d201c1691745b8cffdbb4eb3f

Test Notes:
1) If you have an RHQ server in inventory then un-import it.
2) Import RHQ Server resource
3) Navigate to your platform and start expanding nodes, continuing
   down into the RHQ Server resource.

   Click on all AutoGroup nodes and verify they get the correct name
   and are rendered correctly in the details main page.

   Make sure you go several levels deep in the tree.

   See bug 751091 for more, if you want to exercise a non-perm test case.

Comment 16 Mike Foley 2012-02-07 19:19:28 UTC
changing status of VERIFIED BZs for JON 2.4.2 and JON 3.0 to CLOSED/CURRENTRELEASE

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