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 (...)"
in summary header for autogroups, Name, Description, and Recursive fields are...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
4.0.1
Unspecified Unspecified
medium Severity medium (vote)
: ---
: JON 3.0.0,RHQ 4.3.0
Assigned To: Jay Shaughnessy
Mike Foley
:
Depends On:
Blocks: rhq42
  Show dependency treegraph
 
Reported: 2011-08-30 16:36 EDT by Ian Springer
Modified: 2013-08-05 20:40 EDT (History)
3 users (show)

See Also:
Fixed In Version: 4,3
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-02-07 14:19:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
screenshot (192.44 KB, image/png)
2011-08-30 16:39 EDT, 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 12:04 EDT, 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 12:06 EDT, Heiko W. Rupp
no flags Details

  None (edit)
Description Ian Springer 2011-08-30 16:36:14 EDT
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 16:39:16 EDT
Created attachment 520686 [details]
screenshot
Comment 2 Ian Springer 2011-08-30 17:10:33 EDT
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 09:16:42 EDT
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 12:39:27 EDT
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
twice.

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 08:59:50 EDT
Making fields read-only should be an easy fix
Comment 6 Charles Crouch 2011-10-04 08:14:59 EDT
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 12:13:00 EDT
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 12:04:31 EDT
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 12:06:36 EDT
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 12:25:06 EDT
Looking into the r/w issue at least.
Comment 11 Heiko W. Rupp 2011-10-18 12:37:09 EDT
9f9f742 in master - making the details read-only for autogroups
Comment 12 Heiko W. Rupp 2011-10-19 04:40:15 EDT
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
org.rhq.enterprise.server.resource.group.ResourceGroupManagerBean#findResourceGroupCompositesByCriteria

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 11:39:47 EDT
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 18:04:10 EDT
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 15:44:00 EDT
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 14:19:28 EST
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.