Bug 1327655

Summary: Unable to configure welcome-file via JON
Product: [JBoss] JBoss Operations Network Reporter: Radim Hatlapatka <rhatlapa>
Component: Plugin -- JBoss EAP 7Assignee: Ruben Vargas Palma <rvargasp>
Status: CLOSED CURRENTRELEASE QA Contact: Filip Brychta <fbrychta>
Severity: high Docs Contact:
Priority: medium    
Version: JON 3.3.5CC: fbrychta, loleary, rhatlapa, rvargasp, spinder
Target Milestone: CR01Keywords: Triaged
Target Release: One-off release   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-06-06 18:57:41 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:
Bug Depends On:    
Bug Blocks: 1314853    
Attachments:
Description Flags
eap7-welcome-child none

Description Radim Hatlapatka 2016-04-15 14:50:59 UTC
Description of problem:

It is not possible to define welcome files for EAP 7 via JON. In case of EAP6 it was possible to add it as part of general web configuration.

In case of EAP 7 configuration for welcome-files can be found in undertow subsystem in servlet configuration. Nevertheless configuration of the welcome files is not exposed in JON EAP 7 plugin.

Note this is missing functionality in comparison with JON plugin for EAP 6, where such functionality is available.

Version-Release number of selected component (if applicable):
EAP 7.0.0 JON 3.3.5 with JON EAP plugin update ER1 from BZ#1314853

Comment 2 Ruben Vargas Palma 2016-04-18 18:55:20 UTC
commit b6b6d1be19f001e7d7ac638915730981dd7ae54a
Author: Ruben Vargas <rvargasp>
Date:   Fri Apr 15 14:21:03 2016 -0500

    Bug 1327655 - Unable to configure welcome-file via JON

Comment 7 Ruben Vargas Palma 2016-04-29 20:56:59 UTC
Created attachment 1152414 [details]
eap7-welcome-child

Comment 8 Ruben Vargas Palma 2016-04-29 20:57:33 UTC
@Filip

The option for add welcome files is there, but you need to add it as a child of the servlet container
(see attached eap7-welcome-child screenshot).

This is because in the EAP7 undertow, the welcome file is a child of the servlet container not an attribute.


[standalone@localhost:9990 /] /subsystem=undertow/servlet-container=default:read-resource-description
....

"children" => {
    "welcome-file" => {
        "description" => "A welcome file",
        "model-description" => undefined
    },
    "setting" => {
        "description" => "The servlet container settings",
        "model-description" => undefined
    },
    "mime-mapping" => {
        "description" => "Servlet mime mapping config",
        "model-description" => undefined
    }
}


On the other hand, In EAP6 the welcome file is an attribute of type list:

standalone@localhost:10000 /] /subsystem=web/configuration=container:read-resource-description
{
    "outcome" => "success",
    "result" => {
        "description" => "Common container configuration",
        "attributes" => {
            "mime-mapping" => {
                "type" => OBJECT,
                "description" => "A mime-mapping definition.",
                "expressions-allowed" => true,
                "nillable" => true,
                "value-type" => STRING,
                "access-type" => "read-write",
                "storage" => "configuration",
                "restart-required" => "no-services"
            },
            "welcome-file" => {
                "type" => LIST,
                "description" => "A welcome files declaration",
                "expressions-allowed" => true,
                "nillable" => true,
                "value-type" => STRING,
                "access-type" => "read-write",
                "storage" => "configuration",
                "restart-required" => "resource-services"
            }
        },
        "operations" => undefined,
        "children" => {}
    }
}

Comment 10 Radim Hatlapatka 2016-05-04 12:01:54 UTC
The fix is OK, I can now configure welcome-file by adding it as child resource of servlet container.

Verified with JON 3.3.5 +  JON EAP plugin update CR1 from BZ#1314853