Uploaded image for project: 'OpenJDK'
  1. OpenJDK
  2. OPENJDK-474

JAVA_ARGS value gets duplicated in the logs ubi8/openjdk image

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • Containers.1.11.GA
    • None
    • container
    • None

      Hello Team,

      There is duplicate logging of JAVA_ARGS when running a java process in the ubi8/openjdk-8:1.3-12 base image using the default script.

      As per the Dockerfile:
      ```
      ...
      WORKDIR /home/jboss

      1. Define run cmd
        CMD ["/usr/local/s2i/run"] >>>> Script executed
        ```
        Ref:
        ~~~
      2. cat /usr/local/s2i/run (source Dockerfile for ubi8/openjdk-8:1.3-12)
        ``
        exec ${DEPLOYMENTS_DIR}/bin/run.sh $args ${JAVA_ARGS}
        else
        echo "Starting the Java application using ${JBOSS_CONTAINER_JAVA_RUN_MODULE}/run-java.sh $args..."
        exec "${JBOSS_CONTAINER_JAVA_RUN_MODULE}/run-java.sh" $args ${JAVA_ARGS} <<<<<<<<<<<<<<<<<<<< Here it is.
        fi
        ``
      1. cat run-java.sh
        ...
        if [ "x${JAVA_MAIN_CLASS}" != x ] ; then
        args="${JAVA_MAIN_CLASS}"
        else
        args="-jar ${JAVA_APP_JAR}"
        fi
        log_info "exec $(get_exec_args) java $(get_java_options) -cp \"$(get_classpath)\" ${args} $* ${JAVA_ARGS}" <<<<<<<<<<<<< Log statement.
        exec $(get_exec_args) java $(get_java_options) -cp "$(get_classpath)" ${args} $*
        }

      From the above it is evident that

      {JAVA_ARGS}

      is just printed in the log_info, not present in the actual command. $* is also present in the exec command.

              jhuttana1@redhat.com Jayashree Huttanagoudar
              rhn-support-ansachde Ankit Sachdeva (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: