Uploaded image for project: 'Cloud Enablement'
  1. Cloud Enablement
  2. CLOUD-3434

OCP 4.3 JAVA S2I Xmx and Xms are not part of MAVEN_OPTS if memory limit is included

    XMLWordPrintable

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

      1. 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
      1. 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

      1. 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:

      1. 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:

      1. 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

      Attachments

        Activity

          People

            yborgess1@redhat.com Yeray Borges Santana
            pkremens@redhat.com Petr Kremensky (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: