Hide Forgot
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/>"
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")\""
We've made changes to our upcoming image and will include these fixes in the release scheduled for the end of January.
An example workaround https://github.com/knrc/openshift-examples/tree/jdg-configuration/jdg-configuration
closing as this is being tracked in JIRA now, which is the mechanism for middleware image issues.