Bug 1005186

Summary: Unable to undefine attribute enable-welcome-root for virtual server via CLI
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Radim Hatlapatka <rhatlapa>
Component: WebAssignee: Chao Wang <chaowan>
Status: CLOSED CURRENTRELEASE QA Contact: Radim Hatlapatka <rhatlapa>
Severity: medium Docs Contact: Russell Dickenson <rdickens>
Priority: unspecified    
Version: 6.1.1CC: brian.stansberry, chaowan
Target Milestone: ER7   
Target Release: EAP 6.2.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-15 16:20:17 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:

Description Radim Hatlapatka 2013-09-06 11:36:45 UTC
Description of problem:
Instead of attribute enable-welcome-root being undefined it is set to a default value

Version-Release number of selected component (if applicable):
EAP 6.1.1

How reproducible: always


Steps to Reproduce:
1. /subsystem=web/virtual-server=default-host:undefine-attribute(name=enable-welcome-root)
2. /subsystem=web/virtual-server=default-host:read-attribute(include-defaults=false, name=enable-welcome-root)


Actual results:

false

Expected results:

undefined


Additional info:
read-resource-description shows that this attribute is nillable

Comment 1 Chao Wang 2013-09-27 08:49:56 UTC
This because that SimpleAttribute 'enable-welcome-root' is nillable but has a default value set to false and WriteEnableWelcomeRoot considers all non-true value as a false value, Thus, user can't undefine it.

I have prepared a fix on https://github.com/soul2zimate/jboss-eap/commit/848349cec769600e7be012b9bfc2ca759a41b367

However, I wonder if it's intended to work like that? if true, we only need to revise attribute description to non-nullable and accept false as default value.

Comment 3 Radim Hatlapatka 2013-11-04 12:34:44 UTC
Verified in EAP 6.2.0.ER7