Bug 835696 - [as7] Empty lists should be null for some HornetQ sub-resources
[as7] Empty lists should be null for some HornetQ sub-resources
Status: CLOSED CURRENTRELEASE
Product: RHQ Project
Classification: Other
Component: Plugins (Show other bugs)
4.4
Unspecified Unspecified
unspecified Severity unspecified (vote)
: ---
: JON 3.1.1
Assigned To: Stefan Negrea
Mike Foley
:
Depends On: 833187
Blocks: as7-plugin 847865
  Show dependency treegraph
 
Reported: 2012-06-26 16:46 EDT by Stefan Negrea
Modified: 2013-09-03 11:14 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 833187
Environment:
Last Closed: 2013-09-03 11:14:04 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Stefan Negrea 2012-06-26 16:46:56 EDT
+++ This bug was initially created as a clone of Bug #833187 +++

Description of problem:
Three list properties should be sent as null if empty to the AS7. The current implementation treats all the lists in an equal manner, if the list is empty then an empty list is sent back to AS7 for a configuration update. The three list properties identified so far are: static-connectors (from Cluster Connection of HornetQ), static-connectors (from Bridge of HornetQ), and remoting-inceptors (of HornetQ).


How reproducible:
Every time

Steps to Reproduce:
1. Discovery and import an AS7 standalone server
2. Find the resource with the following path subsystem=messaging,hornetq-server=default,cluster-connection=my-cluster
3. Try to update the resource configuration.
  
Actual results:
The following error is received from AS7:
{JBAS014653: Composite operation failed and was rolled back. Steps that failed:={Operation step-16=JBAS014706: [0] is an invalid size for parameter static-connectors. A minimum length of [1] is required}},

Expected results:
The update should happen without an error.

Additional info:
For most cases sending an empty list back to the server is correct way of setting the property to empty; in those cases sending an null value will result in errors. So this update needs to be specific for the properties identified.

--- Additional comment from snegrea@redhat.com on 2012-06-18 17:56:22 EDT ---

Added support for nullable lists. If a nullable list is empty then send back to the AS7 the null value instead of an empty list.
Comment 1 Stefan Negrea 2012-07-20 18:05:11 EDT
release/jon3.1.x branch commit:

http://git.fedorahosted.org/git/?p=rhq/rhq.git;a=commit;h=3e354dccd5859417ce58fb4b2f010e12bd1daad4
Comment 2 John Sanda 2012-08-02 14:52:14 EDT
JON 3.1.1 ER1 build is available. Moving to ON_QA.

https://brewweb.devel.redhat.com/buildinfo?buildID=226942
Comment 3 Armine Hovsepyan 2012-08-06 08:48:36 EDT
reopened.

There are no errors visible neither on logs nor int the UI, but the update is not being done.

additional info: This may be the same problem as -
https://bugzilla.redhat.com/show_bug.cgi?id=843514
and
https://bugzilla.redhat.com/show_bug.cgi?id=844434
Comment 4 Stefan Negrea 2012-08-14 15:41:02 EDT
A couple more updates were required to the loading and writing code for nullable lists. The code did not handle well the loading from JSON. Please retest.

This bug is not related at all to bug 844434.


The new commit to release/jon3.1.x branch:

http://git.fedorahosted.org/cgit/rhq/rhq.git/commit/?h=release/jon3.1.x&id=b40c6d9c81f01382ffd2a8321b7e0a81b5e7e682
Comment 5 John Sanda 2012-08-22 01:41:46 EDT
Moving to ON_QA. The JON 3.1.1 ER3 build is available at https://brewweb.devel.redhat.com/buildinfo?buildID=230321.
Comment 7 Armine Hovsepyan 2012-08-23 11:00:33 EDT
bug#846400 is being reproduced by this steps, so marking back to  on_dev.
Comment 8 Heiko W. Rupp 2012-08-28 10:28:21 EDT
Bug 846400 is something totally different and triggered by setting connector and discovery groups at once. as7 does not catch that on the api and writes a bogus configuration to disk. 
It has nothing to do with this case of empty lists.


There is an issue here though (again reproducible with : connection-factory=InVmConnectionFactory)

If you unset the connector and add a discovery group the config update will fail with:

Null key for a Map not allowed in JSON (use a converting NullKeySerializer?), rolled-back=false, rolled-back=false
Comment 9 Stefan Negrea 2012-08-28 16:17:28 EDT
Created bug 852534 to resolve the error mentioned in comment 8 with regards to the connector property.
Comment 10 Stefan Negrea 2012-08-29 17:10:07 EDT
Please retest updating the properties for this resource type. This issue has been resolved by other fixes applied to the AS7 plugin.
Comment 11 John Sanda 2012-08-29 21:48:56 EDT
The CR1 build is available at
https://brewweb.devel.redhat.com/buildinfo?buildID=231258. Moving to ON_QA.
Comment 12 Armine Hovsepyan 2012-09-12 06:41:02 EDT
verified.

discovery group and static connector are non-editable anymore.
Comment 13 Heiko W. Rupp 2013-09-03 11:14:04 EDT
Bulk closing of old issues in VERIFIED state.

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