Bug 697589 - editing a group config fails with "One or more null or empty member Resource configuration was returned by the Server." if one or more of the member configs have not first been viewed individually
editing a group config fails with "One or more null or empty member Resource ...
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Core UI (Show other bugs)
4.0.0
Unspecified Unspecified
high Severity high (vote)
: ---
: ---
Assigned To: Ian Springer
Corey Welton
:
Depends On:
Blocks: rhq4 rhq401 jon3-sprint1 715334
  Show dependency treegraph
 
Reported: 2011-04-18 13:06 EDT by Ian Springer
Modified: 2013-08-05 20:39 EDT (History)
3 users (show)

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


Attachments (Terms of Use)
server log showing error during verification process (3.21 MB, application/octet-stream)
2011-05-19 11:19 EDT, Mike Foley
no flags Details

  None (edit)
Description Ian Springer 2011-04-18 13:06:13 EDT
I'm guessing the SLSB method that loads a group config is not smart enough to fetch live configs for member Resources; it probably just tries to load persisted configs and if none are found, returns empty configs (when I attached to coregui w/ JPDA, I saw that the member configs were empty, not null).
Comment 3 Ian Springer 2011-05-18 10:15:55 EDT
To load group member configs, call configurationManager.getResourceConfigurationsForCompatibleGroup(), rather than configurationManager.getResourceConfigurationMapForCompatibleGroup(), to ensure we get the latest/live configs for each of the group members - [master ed17448].
Comment 4 Ian Springer 2011-05-18 11:12:08 EDT
[master eac0b5c] removes getResourceConfigurationMapForCompatibleGroup() from ConfigurationManagerLocal and ConfigurationManagerBean, since it is not a method anyone should ever call (getResourceConfigurationsForCompatibleGroup() should always be used instead).
Comment 5 Ian Springer 2011-05-18 12:46:56 EDT
To verify this fix:

1) create a compatible group of some type of Resource that support configuration (e.g. RHQ Agent, Datasource, Topic, Queue, etc.). make sure that you have not gone to the Configuration>Current subtab for any of the members of the group.
2) go the group's Configuration>Current subtab, and make sure the group's config is displayed. change the values of a couple properties, then save the group config. verify that succeeds.
3) make some changes to one of the group members configs *outside of the RHQ GUI or CLI*. for example, if it's a group of RHQ Agent Resources, change some Agent config props from the Agent command prompt.
4) go back to the group's Configuration>Current subtab, and make sure the group's config is displayed and the updates you made in step 3) are evident. this verifies that the group config always represents the "live" configs of each of the group's members, and not just the latest member configs from the DB.
Comment 6 Mike Foley 2011-05-19 11:19:06 EDT
Created attachment 499871 [details]
server log showing error during verification process
Comment 7 Sudhir D 2011-05-20 07:51:11 EDT
Verified on rhq-server-4.0.1-SNAPSHOT Build# a104cdf

My setup was on postgres. I do not see the error message that Michael saw in comment# 6. 

The UI change reflected correctly,
2011-05-20 17:13:58,450 INFO  [org.rhq.enterprise.server.configuration.ConfigurationManagerBean] Group Resource configuration update [10001] for ResourceGroup[id=10031, name=compact group, category=COMPATIBLE, type=RHQ Agent, isDynaGroup=false, isClusterGroup=false] has completed with status [Success].

The Agent command prompt change also reflected correctly on the UI,
> setconfig rhq.agent.wait-for-server-at-startup-msecs=50000
Set preference: rhq.agent.wait-for-server-at-startup-msecs=50000

I'm marking this bug as verified. Will double check with Michael separately.
Comment 8 Corey Welton 2011-05-23 21:15:39 EDT
Bookkeeping - closing bug - fixed in recent release.
Comment 9 Corey Welton 2011-05-23 21:15:39 EDT
Bookkeeping - closing bug - fixed in recent release.
Comment 10 Corey Welton 2011-05-23 21:15:39 EDT
Bookkeeping - closing bug - fixed in recent release.
Comment 11 Corey Welton 2011-05-23 21:15:44 EDT
Bookkeeping - closing bug - fixed in recent release.

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