Bug 852662

Summary: [eap6] Cannot unset resource configuration properties
Product: [JBoss] JBoss Operations Network Reporter: Stefan Negrea <snegrea>
Component: Plugin -- JBoss EAP 6Assignee: Stefan Negrea <snegrea>
Status: CLOSED CURRENTRELEASE QA Contact: Armine Hovsepyan <ahovsepy>
Severity: high Docs Contact:
Priority: high    
Version: JON 3.1.0CC: ahovsepy, hrupp, loleary, mfoley, myarboro
Target Milestone: DR01   
Target Release: JON 3.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 852552
: 1119499 (view as bug list) Environment:
Last Closed: 2014-12-11 14:03:25 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:
Bug Depends On: 844434, 852552, 879062    
Bug Blocks: 707223, 1119499    
Attachments:
Description Flags
before_unset
none
after_unset
none
before_unset2
none
after_unset2 none

Description Stefan Negrea 2012-08-29 08:43:02 UTC
+++ This bug was initially created as a clone of Bug #852552 +++

Description of problem:
For various AS7 subresources, cannot unset resource configuration properties. The properties are updated to any value that is non-empty. The properties however, do not get updated if either the unset checkbox is clicked or if the value from the field is empty. 

This only applies to non-required properties. For required properties the option to unset the property is not available, and the save button is disable until the field has a non-empty value (UI Validation).

How reproducible:
Alsways

Steps to Reproduce:
1. Discover and import an AS7 standalone server
2. Find any resource with non-required properties that currently set.
3. Either click on the unset checkbox or remove all the contents of the textbox
4. Save the configuration
  
Actual results:
The save operation succeeds but the property values is still set to the old value (before unset)

Expected results:
The save operation succeeds but the property is now null or the default value if a default value is available for the property.


Additional info:
This bug does not apply to resource creation. If a field is set to unset in the resource creation page, the field will get the default AS7 value upon resource creation since the AS7 plugin will not send a property configuration request to AS7 for the respective property.

--- Additional comment from snegrea on 2012-08-29 04:35:07 EDT ---

The following resources had to be updated because of this change. There is no functional update to any of these resources. All the changes are done to prevent regressions due to the plugin sending all the properties back to the server.

1) Transport (*/subsystem=infinispan/cache-container=*/transport=TRANSPORT):
Removed Transport properties that were no longer in the resource definition. 

2) Mod-cluster Configuration (/subsystem=modcluster,mod-cluster-config=configuration):
Replaced a property name referenced by alias with the actual name. The alias is no longer working correctly. 

3) Distributed Cache (*/subsystem=infinispan/cache-container=*/distributed-cache=*):
Created a separate resource for distributed-cache because it has three extra properties when compared to invalidation-cache and replicated-cache.

4) Socket-Binding Group:
Update the resource component to avoid sending port-offset configuration to the server for AS7 host controllers by removing the property completely from the definition and update report. Before this change, the property was not sent anyway because it was null, and null values were not sent to the server.

5) Transactions (*/subsystem=transactions):
Added special validation rules for properties.

6) Data-source and XA Data-source:
Updated the way configuration updates are sent for 9 properties. While these properties look undefined in the server, they cannot undefined or set to null at any point in time. The application server makes use of the default value at all times.

Comment 2 Stefan Negrea 2012-08-29 20:54:05 UTC
Reverted all the changes added to the release branch and retargeting for 3.1.2.

Comment 4 Charles Crouch 2012-10-30 22:25:48 UTC
This, at least superficially, looks related to 844434

Comment 5 mark yarborough 2012-11-20 20:46:06 UTC
Per triage with loleary, crouch, mfoley: Move to JBoss ON product, set target release JON 3.2, clear priority (will be subject to further triage in JON 3.2 timeframe).

Comment 7 Larry O'Leary 2014-06-12 23:47:07 UTC
This is already in master and the release branch.

Comment 8 Simeon Pinder 2014-07-31 15:52:39 UTC
Moving to ON_QA as available to test with brew build of DR01: https://brewweb.devel.redhat.com//buildinfo?buildID=373993

Comment 9 Armine Hovsepyan 2014-08-05 07:04:19 UTC
verified
screen-shots attached

Comment 10 Armine Hovsepyan 2014-08-05 07:05:23 UTC
Created attachment 924106 [details]
before_unset

Comment 11 Armine Hovsepyan 2014-08-05 07:05:42 UTC
Created attachment 924107 [details]
after_unset

Comment 12 Armine Hovsepyan 2014-08-05 07:06:02 UTC
Created attachment 924109 [details]
before_unset2

Comment 13 Armine Hovsepyan 2014-08-05 07:06:21 UTC
Created attachment 924111 [details]
after_unset2