Bug 1129304

Summary: Newly imported resources are not included in dynagroups which use resourceConfiguration in expression for several hours
Product: [JBoss] JBoss Operations Network Reporter: Filip Brychta <fbrychta>
Component: Configuration, Resource Grouping, Plugin -- JBoss EAP 6Assignee: Libor Zoubek <lzoubek>
Status: CLOSED CURRENTRELEASE QA Contact: Filip Brychta <fbrychta>
Severity: high Docs Contact:
Priority: unspecified    
Version: JON 3.3.0CC: loleary, lzoubek, theute
Target Milestone: ER02   
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-11 14:04:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Filip Brychta 2014-08-12 14:49:08 UTC
Description of problem:
This problem is similar to bz 1098187.
It takes several hours to load resource configuration unless a user visits the resource configuration via UI. This means that this resource is not included to any dynagroup which uses its configuration. For example Managed Servers in server-group which has following expression:

groupby resource.parent.trait[domain-name]
groupby resource.resourceConfiguration[group]
resource.type.plugin = JBossAS7
resource.type.name = Managed Server


Version-Release number of selected component (if applicable):
Version :	
3.3.0.DR01
Build Number :	
6468454:dda0a47

How reproducible:
Always

Steps to Reproduce:
1. clean JON server is running
2. register new rhq agent which is monitoring eap6 in domain mode
3. import eap6 resource from discovery queue
4. wait for group called "DynaGroup - Managed Servers in server-group ( Unnamed Domain,main-server-group )" to appear in Inventory->All Groups

Actual results:
It took more then one hour, which is way too long taking in consideration default recalculation interval which is for "Managed Servers in server-group" dynagroup definition 10 minutes. This means that even after several recalculations the actual state of JON groups doesn't reflect actual state of EAP managed servers just because the configuration of Managed Server resource is not yet loaded.

Another problem is that after almost 2 hours only one of two EAP managed servers was included in "DynaGroup - Managed Servers in server-group ( Unnamed Domain,main-server-group )" but two managed servers should be there. This probably means that configuration of second managed server was still not loaded. This state is incorrect and confusing.

Expected results:
JON groups should reflect actual state of EAP managed servers after each recalculation.

Comment 1 Filip Brychta 2014-08-13 13:32:31 UTC
Second EAP managed server was not visible in "DynaGroup - Managed Servers in server-group ( Unnamed Domain,main-server-group )" even after 24 hours. I had to visit its configuration via UI and then it was correclty included into that group after next recalculation.

Comment 2 Libor Zoubek 2014-08-18 10:56:08 UTC
in master

commit c79d87fc02caabad3e7ad306f831d895644d2652
Author: Libor Zoubek <lzoubek>
Date:   Mon Aug 18 12:50:21 2014 +0200

    Bug 1129304 - Newly imported resources are not included in dynagroups which
    use resourceConfiguration in expression for several hours
    
    Fixed ConfigurationCheckExecutor which was due to typo (incorrectly nested
    code inside if/else) not able to load configuration for all resources.

in 3.3 branch

commit 9c648e9445b06aafb5ba32a31af11b36660430d6
Author: Libor Zoubek <lzoubek>
Date:   Mon Aug 18 12:50:21 2014 +0200

    Bug 1129304 - Newly imported resources are not included in dynagroups which
    use resourceConfiguration in expression for several hours
    
    Fixed ConfigurationCheckExecutor which was due to typo (incorrectly nested
    code inside if/else) not able to load configuration for all resources.
    
    (cherry picked from commit c79d87fc02caabad3e7ad306f831d895644d2652)
    Signed-off-by: Libor Zoubek <lzoubek>

Comment 3 Simeon Pinder 2014-09-03 20:31:52 UTC
Moving to ON_QA as available for test with the following brew build:
https://brewweb.devel.redhat.com//buildinfo?buildID=381194

Comment 4 Filip Brychta 2014-09-04 07:47:53 UTC
Verified on
Version :	
3.3.0.ER02
Build Number :	
4fbb183:7da54e2