Bug 663377

Summary: Group config update causes open map properties to "spread" across all resources in the group
Product: [Other] RHQ Project Reporter: Lukas Krejci <lkrejci>
Component: ConfigurationAssignee: Lukas Krejci <lkrejci>
Status: CLOSED CURRENTRELEASE QA Contact: Corey Welton <cwelton>
Severity: medium Docs Contact:
Priority: high    
Version: 3.0.0CC: rtimaniy, skondkar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
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:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 662662, 663608    
Bug Blocks: 616081    

Description Lukas Krejci 2010-12-15 15:34:01 UTC
Description of problem:
An open map can contain arbitrary properties.
When a compatible group contains resource which have open map in their configurations, the calculated group configuration shows the open map as having a union of all the properties in the open maps of individual resources. That is OK, because if a particular resource doesn't define some property, it is shown as having that property unset in the detail of the group property.

But if the user edits a group configuration and saves it (and doesn't even have to edit the open map in question), all the configurations of the individual resources in the group are going to contain all the properties defined in their open maps, regardless of whether they had them originally or not.

Perhaps an example will serve as a better explanation:

- a compatible group contains 2 resources that define an open map called "props" in their resource configurations

- resource 1 props:
key1=value
key2=value
key3=value

- resource 2 props:
key3=value
key4=value
key5=value

After updating the group configuration, the props open map will look like this:

- resource 1 props:
key1=value
key2=value
key3=value
key4=
key5=

and resource 2 props:
key1=
key2=
key3=value
key4=value
key5=value

Version-Release number of selected component (if applicable):
3.0.1-SNAPSHOT

How reproducible:
always

Steps to Reproduce:
1. Create a group of JBoss AS Datasources with at least 2 members
2. Add some distinct values to "Connection Property" open map of each resource in the group
3. Go to group configuration
4. Click "Edit" followed by "Save" without any modifications
5. Go to resource configs of individual resources in the group
6. Observe that the "Connection Property" of each resource config now contains the union of all values that were previously defined.

Actual results:
6. from the repro steps

Expected results:
No new properties should be secretly added to the resource configs

Additional info:

Comment 1 Lukas Krejci 2010-12-15 15:44:35 UTC
Note that this is specific to RHQ 3 / JON 2.4.1. There will be no fix for this
issue in RHQ 4 as that has a completely different UI codebase.

commit 0a53ca30d70fe38283185673bff7aeae58ea33d5
Author: Lukas Krejci <lkrejci>
Date:   Wed Dec 15 16:40:21 2010 +0100

    BZ 663377 - Updating group config doesn't introduce "foreign" properties in open maps of individual resources.

Comment 2 Rajan Timaniya 2010-12-17 07:20:16 UTC
Verified on JON-2.4.1 build #42 (build number: 10963:0a53ca3)

Observed that JBossAS Datasources group not adding new properties secretly.

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

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