Details
-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
None
Description
Description of problem:
Xmx and Xms are not part of MAVEN_OPTS with build configuration memory limit included.
The issue is regression against previous releases.
Version-Release number of selected component (if applicable):
4.3.0-0.nightly-2019-11-11-115927 (https://projects.engineering.redhat.com/browse/LPINTEROP-680)
How reproducible:
Always
Steps to Reproduce:
$ oc new-app --name=sample-java quay.io/wildfly/wildfly-centos7:18.0~https://github.com/openshiftdemos/os-sample-java-web.git
- wait until the build 1 is completed
$ oc get pods/sample-java-1-build -w
NAME READY STATUS
sample-java-1-build 0/1 Completed
$ oc logs pod/sample-java-1-build | grep MAVEN_OPTS
INFO Using MAVEN_OPTS -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m -XX:+ExitOnOutOfMemoryError
- update the memory limits for build config
$ oc edit buildconfig.build.openshift.io/sample-java
< resources: {}
—
> resources:
> limits:
> memory: 1Gi
$ oc start-build buildconfig.build.openshift.io/sample-java
build.build.openshift.io/sample-java-2 started
- wait until the build 2 is completed
$ oc get pods/sample-java-2-build -w
NAME READY STATUS
sample-java-2-build 0/1 Completed
Actual results:
- heap size setup is missing
$ oc logs pod/sample-java-2-build | grep MAVEN_OPTS
INFO Using MAVEN_OPTS -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m -XX:+ExitOnOutOfMemoryError
Expected results:
- initial and maximum heap size are part of options for maven
$ oc logs pod/sample-java-2-build | grep MAVEN_OPTS
INFO Using MAVEN_OPTS -Xms128m -Xmx512m -XX:+UseParallelOldGC -XX:MinHeapFreeRatio=10 -XX:MaxHeapFreeRatio=20 -XX:GCTimeRatio=4 -XX:AdaptiveSizePolicyWeight=90 -XX:MaxMetaspaceSize=100m -XX:+ExitOnOutOfMemoryError