Bug 956329

Summary: Create new Managed Server using EAP 6 plug-in exposes server groups and socket binding groups from other resources
Product: [JBoss] JBoss Operations Network Reporter: Larry O'Leary <loleary>
Component: Plugin -- JBoss EAP 6, UIAssignee: Thomas Segismont <tsegismo>
Status: CLOSED CURRENTRELEASE QA Contact: Mike Foley <mfoley>
Severity: high Docs Contact:
Priority: unspecified    
Version: JON 3.1.2CC: hrupp, jcechace, tsegismo
Target Milestone: ER01   
Target Release: JON 3.2.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:
Attachments:
Description Flags
Screenshot showing extra server and socket binding groups none

Description Larry O'Leary 2013-04-24 17:22:13 UTC
Created attachment 739550 [details]
Screenshot showing extra server and socket binding groups

Description of problem:
When creating a new managed resource on a host controller, server groups and socket binding groups are exposed from other unrelated resources.

Version-Release number of selected component (if applicable):
4.4.0.JON312GA

How reproducible:
Always

Steps to Reproduce:
1.  Install JBoss EAP 6 domain in two separate folders:
        
        jboss-eap-6.0.1.GA-server-1/
        jboss-eap-6.0.1.GA-server-2/
        
2.  Adjust server-2's ports so that it can run on the same host as server-1:

        sed -i 's/${jboss.management.native.port:9999}/19999/' jboss-eap-6.0.1.GA-server-2/domain/configuration/host.xml
        sed -i 's/${jboss.management.http.port:9990}/19990/' jboss-eap-6.0.1.GA-server-2/domain/configuration/host.xml
        sed -i 's/port-offset="150"/port-offset="10150"/' jboss-eap-6.0.1.GA-server-2/domain/configuration/host.xml
        sed -i 's/port-offset="250"/port-offset="10250"/' jboss-eap-6.0.1.GA-server-2/domain/configuration/host.xml

    Manually edit jboss-eap-6.0.1.GA-server-2/domain/configuration/host.xml and remove the definition for server-one.
    
3.  Rename server-1's and server-2's server groups so that on server-1 they end with 01 and on server-2 they end with 02:

        sed -i 's/group="main-server-group"/group="main-server-group-01"/' jboss-eap-6.0.1.GA-server-1/domain/configuration/host.xml
        sed -i 's/name="main-server-group"/name="main-server-group-01"/' jboss-eap-6.0.1.GA-server-1/domain/configuration/domain.xml
        sed -i 's/group="other-server-group"/group="other-server-group-01"/' jboss-eap-6.0.1.GA-server-1/domain/configuration/host.xml
        sed -i 's/name="other-server-group"/name="other-server-group-01"/' jboss-eap-6.0.1.GA-server-1/domain/configuration/domain.xml
        sed -i 's/group="main-server-group"/group="main-server-group-02"/' jboss-eap-6.0.1.GA-server-2/domain/configuration/host.xml
        sed -i 's/name="main-server-group"/name="main-server-group-02"/' jboss-eap-6.0.1.GA-server-2/domain/configuration/domain.xml
        sed -i 's/group="other-server-group"/group="other-server-group-02"/' jboss-eap-6.0.1.GA-server-2/domain/configuration/host.xml
        sed -i 's/name="other-server-group"/name="other-server-group-02"/' jboss-eap-6.0.1.GA-server-2/domain/configuration/domain.xml

4.  Rename server-1's and server-2's socket-binding-groups so that on server-1 they end with 01 and on server-2 they end with 02:

        sed -i 's/name="standard-sockets"/name="standard-sockets-01"/' jboss-eap-6.0.1.GA-server-1/domain/configuration/domain.xml
        sed -i 's/name="ha-sockets"/name="ha-sockets-01"/' jboss-eap-6.0.1.GA-server-1/domain/configuration/domain.xml
        sed -i 's/name="full-sockets"/name="full-sockets-01"/' jboss-eap-6.0.1.GA-server-1/domain/configuration/domain.xml
        sed -i 's/name="full-ha-sockets"/name="full-ha-sockets-01"/' jboss-eap-6.0.1.GA-server-1/domain/configuration/domain.xml
        sed -i 's/socket-binding-group ref="full-ha-sockets"/socket-binding-group ref="full-ha-sockets-01"/' jboss-eap-6.0.1.GA-server-1/domain/configuration/domain.xml
        sed -i 's/socket-binding-group ref="full-sockets"/socket-binding-group ref="full-sockets-01"/' jboss-eap-6.0.1.GA-server-1/domain/configuration/domain.xml
        sed -i 's/name="standard-sockets"/name="standard-sockets-02"/' jboss-eap-6.0.1.GA-server-2/domain/configuration/domain.xml
        sed -i 's/name="ha-sockets"/name="ha-sockets-02"/' jboss-eap-6.0.1.GA-server-2/domain/configuration/domain.xml
        sed -i 's/name="full-sockets"/name="full-sockets-02"/' jboss-eap-6.0.1.GA-server-2/domain/configuration/domain.xml
        sed -i 's/name="full-ha-sockets"/name="full-ha-sockets-02"/' jboss-eap-6.0.1.GA-server-2/domain/configuration/domain.xml
        sed -i 's/socket-binding-group ref="full-ha-sockets"/socket-binding-group ref="full-ha-sockets-02"/' jboss-eap-6.0.1.GA-server-2/domain/configuration/domain.xml
        sed -i 's/socket-binding-group ref="full-sockets"/socket-binding-group ref="full-sockets-02"/' jboss-eap-6.0.1.GA-server-2/domain/configuration/domain.xml



5.  Start EAP 6 domain server-1 and server-2.
6.  Start JBoss ON system.
7.  Import both EAP servers into inventory.
8.  Configure management user/password for newly imported EAP servers.
9.  Wait for both servers to report UP.
10. From host controller server-01's (EAP Domain Controller (127.0.0.1:9990)) child resource page, select *Create Child -> Managed Server*.

    *   *Name*:         new-server

Actual results:
The *Server Group* and *Socket binding group* fields contain values from both server-1 and server-2.

Expected results:
The *Server Group* field should only contain main-server-group-01 and other-server-group-01.
The *Socket binding group* field should only contain *-01 as well.

Additional info:
If you were to select one of the -02 entries when on server 01, the result would be an invalid domain.xml or host.xml file on server 01.

Comment 1 Thomas Segismont 2013-08-14 15:00:16 UTC
Fixed in master

commit 07bead42ccd636be67b717e9922f5a4eb134cff8
Author: Thomas Segismont <tsegismo>
Date:   Wed Aug 14 11:13:09 2013 +0200

Introduced new expressionScope attribute in RHQ config XSD for option source node (updated config parser, PropertyOptionSource entity and database schema accordingly)
    
Updated ConfigurationGWTService and ConfigurationManagerBean: now when filling enumeratedValues we look at expressionScope attribute to narrow down search results if expressionScope is 'baseResource'
    
Updated as7 plugin to use new expressionScope attribute for Managed Server resource configuration attributes

Comment 2 Heiko W. Rupp 2013-08-15 19:31:33 UTC
See also master f1cc58b
and master 85c1c8a8c3

Comment 3 Jakub Cechacek 2013-11-19 14:11:00 UTC
Verified 3.2.0.ER5