Bug 1060299

Summary: Unable to create a cache store using default configuration due to optional property being null
Product: [JBoss] JBoss Data Grid 6 Reporter: Larry O'Leary <loleary>
Component: JON PluginAssignee: Tristan Tarrant <ttarrant>
Status: VERIFIED --- QA Contact: Martin Gencur <mgencur>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.2.0CC: jdg-bugs, ksuzumur, tsykora, wburns
Target Milestone: CR1   
Target Release: 6.2.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 1076047    
Bug Blocks:    

Description Larry O'Leary 2014-01-31 17:52:11 UTC
Description of problem:
When attempting to create a cache store, creation fails if the `class` property is left unset.

Version-Release number of selected component (if applicable):
JDG Plugin Pack Update-01 for JBoss ON 3.2.0
   Infinispan Plugin 6.0.1.Final-redhat-2

How reproducible:
Always

Steps to Reproduce:
1.  Install and start JON 3.2 system.
2.  Install JDG Plugin Pack Update-01 for JBoss ON 3.2.0.
3.  Install and start JDG server using clustered.xml configuration
4.  Import JDG 6.2 server into inventory.
5.  Configure JDG connection settings.
6.  Create a new Infinispan Cache:

    From JDG (127.0.0.1:9990) / infinispan / Cache Containers / clustered -> Create Child > Cache
    *   *New Resource Name*: `MyCacheA`
    *   *Kind of cache*: *distributed-cache*
    *   *Start*: *LAZY*
    *   *Batching*: *No*
    *   *Indexing*: *NONE*
    *   *Mode*: *SYNC*

7.  Create a new Cache Store:

    From JDG (127.0.0.1:9990) / infinispan / Cache Containers / clustered / Cache / MyCacheA -> Create Child > Store
    *   *New Resource Name*: `MyCacheStoreA`
    *   *Kind of store*:    *Generic Store*

Actual results:
Cache store creation fails and child history reports reason:

    JBAS014746: class may not be null, rolled-back=true

Expected results:
Cache store creation should be successful -OR- if a class is required and no default one is being provided by JDG, this property should be marked as required to prevent the create child wizard from completing until the user provides the required properties.

Additional info:
It is not clear to me whether a class is actually a required property or not. From the management plug-in it is not marked as required so my assumption from a user perspective is that it is not required. The error on the other hand leads me to believe that either the plug-in is actually submitting the value as "null" rather then "unset" or JDG isn't treating null as an undefined value.

In either case we need to to the right thing here. This also includes the other configuration options that are provided in this dialog. If for example one requires additional values while another does not then the wizard should only inform the user they are missing required properties when the selected configuration requires those additional values.

Comment 1 Larry O'Leary 2014-01-31 17:57:12 UTC
This also occurs if the property Properties contains no name/value pairs. The error returned in that case is:

    JBAS014688: Wrong type for properties. Expected [PROPERTY] but was OBJECT, rolled-back=true

Comment 4 Tomas Sykora 2014-02-17 10:54:43 UTC
No, this functionality was added in 6.2.

Comment 5 Tomas Sykora 2014-02-17 13:04:15 UTC
I confirm this is real issue. I can experience this unwanted behaviour with environment set up mentioned by customer.

We probably need to make this field compulsory-to-fill + it would be nice to provide some help (example) where can be found suitable classes for filling into the text-box for property 'Class'.

CCing William here to let him know.

Comment 6 William Burns 2014-03-03 14:35:21 UTC
The fixes for this will be included in https://bugzilla.redhat.com/show_bug.cgi?id=1060301  Will move this to POST when the changes for it are merged.

Comment 7 Tomas Sykora 2014-03-14 13:12:02 UTC
A class property is now required field. (6.2.1-CR1)

And for a File store -- we have a new child resource creation option which is working.
However, generic store child resource creation not yet: https://bugzilla.redhat.com/show_bug.cgi?id=1076047

Comment 8 Tomas Sykora 2014-03-31 12:03:40 UTC
6.2.1 CR3 update.

Now we are able to configure generic cache store via JON.

The property CLASS is now fully required.

Setting this as VERIFIED. Thanks for the fix!