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
Summary: editing a group config fails with "One or more null or empty member Resource ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: RHQ Project
Classification: Other
Component: Core UI
Version: 4.0.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: ---
Assignee: Ian Springer
QA Contact: Corey Welton
URL:
Whiteboard:
Depends On:
Blocks: rhq4 rhq401 jon3-sprint1 715334
TreeView+ depends on / blocked
 
Reported: 2011-04-18 17:06 UTC by Ian Springer
Modified: 2013-08-06 00:39 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed:
Embargoed:


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

Description Ian Springer 2011-04-18 17:06:13 UTC
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 14:15:55 UTC
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 15:12:08 UTC
[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 16:46:56 UTC
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 15:19:06 UTC
Created attachment 499871 [details]
server log showing error during verification process

Comment 7 Sudhir D 2011-05-20 11:51:11 UTC
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-24 01:15:39 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 9 Corey Welton 2011-05-24 01:15:39 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 10 Corey Welton 2011-05-24 01:15:39 UTC
Bookkeeping - closing bug - fixed in recent release.

Comment 11 Corey Welton 2011-05-24 01:15:44 UTC
Bookkeeping - closing bug - fixed in recent release.


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