Bug 844434 - [eap] as7 resource configuration doesn't keep changed values on unset operation.
Summary: [eap] as7 resource configuration doesn't keep changed values on unset operation.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: JBoss Operations Network
Classification: JBoss
Component: Plugin -- JBoss EAP 6
Version: JON 3.1.0
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
: One-off release
Assignee: Thomas Segismont
QA Contact: Mike Foley
URL:
Whiteboard:
: 843514 (view as bug list)
Depends On: 847021 879062
Blocks: as7-plugin 852662
TreeView+ depends on / blocked
 
Reported: 2012-07-30 15:37 UTC by Armine Hovsepyan
Modified: 2015-09-03 00:01 UTC (History)
8 users (show)

Fixed In Version:
Clone Of:
: 879062 (view as bug list)
Environment:
Last Closed: 2014-06-12 23:38:09 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 843514 0 medium CLOSED [eap6] JAXR subsystem resource configuration cannot be unset (undefined) 2021-02-22 00:41:40 UTC

Internal Links: 843514

Description Armine Hovsepyan 2012-07-30 15:37:02 UTC
Description of problem:


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


How reproducible:
always

Steps to Reproduce:
1. Start eap in domain mode
2. Enter to "profle=full-ha, subsystem=modcluster, mod-cluster-config=configuration," 
3. unset proxy URL
4. Save configuration
  
Actual results:
ProxyURL gets changed by rhqadmin user, and then gets back to old value by "no-user"

Expected results:
Proxy URL should be set as "undefined"

Additional info:
No error in history,
Warn in agent log:

 2012-07-30 17:30:27,990 WARN  [ResourceContainer.invoker.daemon-47] (rhq.modules.plugins.jbossas7.ASConnection)- We got a 500 with the following response body back: {"outcome" : "failed", "failure-description" : "JBAS014792: Unknown attribute name", "rolled-back" : true

Comment 1 Armine Hovsepyan 2012-07-30 15:38:15 UTC
Additional information: Change of value from "smth" to "smth-else" works perfect, it reflects to only unsettling of the value.

Comment 2 Charles Crouch 2012-07-30 15:48:50 UTC
Should be investigated as to whether this field should be required or if something else is going on here

Comment 3 Simeon Pinder 2012-07-31 13:27:33 UTC
After some quick analysis this is a problem for other(non-modcluster) as7 resources as well. Unsetting of the ejb3 asynch service does not correctly clear the value.  Moving this to ON_DEV.

Comment 4 Simeon Pinder 2012-08-02 14:29:30 UTC
So tracked down the problem and it's an issue executing an unset operation on any as7 resources based off of BaseComponent. That's almost all of them but is really only apparent on unset.  Set and udpate of resource configurations are unaffected.  This code was an optimization to not execute changes when 'null' values were passed in on a configuration update. 

The fix is to remove the optimization code, but this change also means that incorrect optional configuration attributes will now cause configuration update operations to fail with 'unknown attribute blah' on all updates.  An incorrect optional configuration attribute would be caused by an AS7 plugin definition that became stale after attribute name changes between as7 versions.  

Ex. modcluster attribute 'domain' -> 'load-balancing-group'. 

This meant that modcluster configuration update was broken but would never be detected.  Consequently there can be many other places in the AS7 tree where configuration update will be broken after this fix. 

I'm going to try to spend some time today trying to write some code to detect/verify our plugin definition against a given as7 instance if it's not too difficult.

Comment 5 Heiko W. Rupp 2012-08-02 14:34:44 UTC
To add to the above analysis: RHQ plugins only get the new configuration, but no diff with respect to the previous configuration, which makes live hard.
With removal of the optimization, we now send dozens of :write-attribute(name,null) operations over the wire (inside a composite operation), just because we can not distinguish between "attribute was and is null" and "attribute became null".

Comment 6 John Sanda 2012-08-02 18:52:02 UTC
JON 3.1.1 ER1 build is available. Moving to ON_QA.

https://brewweb.devel.redhat.com/buildinfo?buildID=226942

Comment 7 John Sanda 2012-08-02 20:27:44 UTC
Moving back to ON_DEV. This should not have been moved to ON_QA as noted in comment 6.

Comment 8 Simeon Pinder 2012-08-07 13:10:27 UTC
*** Bug 843514 has been marked as a duplicate of this bug. ***

Comment 9 Simeon Pinder 2012-08-09 13:34:12 UTC
I think we should push this issue out of 3.1.1 as fixing it without addressing 847021 first could stop users from being able to update as7 configurations and execute operations where they would have been able to before the fix was applied for this issue.

In the even that we proceed with applying this issue anyway, and I am unavailable, Heiko should know the exact line number to change in the root BaseComponent as we discussed it.

Comment 10 Charles Crouch 2012-08-14 18:04:45 UTC
As per triage mtg, moving this to jon312 to correspond to 847021.

Comment 11 mark yarborough 2012-11-20 20:45:40 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 12 Heiko W. Rupp 2013-08-12 11:26:41 UTC
Thomas, can you please investigate that further?
A full solution would mean to also send the previous version / a diff, but that is to much for 3.2.
If there is a low risk improvement for 3.2 we do it, otherwise postpone and do a real fix in 3.3.

Comment 15 Larry O'Leary 2014-02-14 01:54:40 UTC
Re-targeted to CP02 to reduce CP01 overall payload.

Comment 16 Larry O'Leary 2014-06-12 23:38:09 UTC
I am closing this as NOTABUG.

Reasons being:
 - the actual bug that could happen with un-setting configuration values was addressed upstream and is tracked by product bug 852662;
 - un-setting of Proxy Url as in the reproducer for this bug is behaving as expected;

When unsetting a configuration option in JBoss ON it results in an undefined value in JBoss EAP. This means that JBoss EAP will return the actual default. In other words, undefined is saying 'use the default'.


Note You need to log in before you can comment on or make changes to this bug.