Bug 1376202

Summary: JBoss Data Grid xPaas max idle not set
Product: OpenShift Container Platform Reporter: Trevor Xiao <tterris>
Component: ImageStreamsAssignee: kconner
Status: CLOSED UPSTREAM QA Contact: Tomas Schlosser <tschloss>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 3.2.1CC: aos-bugs, bparees, jokerman, mmccomas, pweil, tterris
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
undefined
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-02-20 15:14:08 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 Trevor Xiao 2016-09-14 20:39:57 UTC
Description of problem:
[Note: the problem is due to a typo in the infinispan-config.sh script, please see the "Additional info" section below for the fix]

In the JBoss Data Grid xPaaS image in OpenShift 3.2, the max-idle value for a cache's expiration won't be set, even if it's specified in an environment variable per https://access.redhat.com/documentation/en/red-hat-xpaas/0/paged/red-hat-xpaas-data-grid-image/chapter-4-reference.

Version-Release number of selected component (if applicable):
JBoss Data Grid 6.5, OpenShift 3.2.

How reproducible:
Always when a cache is configured with max-idle expiration.

Steps to Reproduce:
1. Set up OpenShift CDK - http://developers.redhat.com/products/cdk/overview/
2. Add JBoss image streams - https://github.com/jboss-openshift/application-templates/blob/master/jboss-image-streams.json
3. Copy the "datagrid65-basic.json" image from here - https://github.com/jboss-openshift/application-templates/tree/master/datagrid - and add the parameter DEFAULT_CACHE_EXPIRATION_MAX_IDLE with a value of 10000. 
4. Create the objects in the template.

Actual results:
The "default" cache does not have the max-idle property set in the <eviction /> parameter.

Expected results:
The "default" cache should have the max-idle property in the <eviction /> parameter set to 10000.

Additional info:
Appears to be due to a typo in the infinispan-config.sh script, located in /opt/datagrid/bin; someone apparently copy-pasted from the section on cache eviction, and didn't update the variable names. The problem line is as follows:

    local expiration="\
                    <expiration $CACHE_EXPIRATION_LIFESPAN $CACHE_EVICTION_MAX_IDLE/>"

It should be set to the following:

    local expiration="\
                    <expiration $CACHE_EXPIRATION_LIFESPAN $CACHE_EXPIRATION_MAX_IDLE/>"

Comment 1 Trevor Xiao 2016-09-14 20:46:28 UTC
Additionally, the line:

local CACHE_EXPIRATION_MAX_IDLE="max-entries=\"$(find_env "${prefix}_CACHE_EXPIRATION_MAX_IDLE")\""

should be changed to:

local CACHE_EXPIRATION_MAX_IDLE="max-idle=\"$(find_env "${prefix}_CACHE_EXPIRATION_MAX_IDLE")\""

Comment 2 kconner 2016-12-12 17:35:03 UTC
We've made changes to our upcoming image and will include these fixes in the release scheduled for the end of January.

Comment 4 Ben Parees 2017-02-20 15:14:08 UTC
closing as this is being tracked in JIRA now, which is the mechanism for middleware image issues.