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

[RHEL8] JAVA_APP_NAME breaks if contains whitespace, incorrectly wraps with quotes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • UBI8 Containers 1.16.GA
    • UBI8 Containers 1.15.GA
    • container
    • None
    • Hide

      deploy an openjdk application, set env JAVA_APP_NAME=foo
      oc rsh <pod>
      ps x -o args

      notice the process cmd starts with

      'foo' -javaagent...

      instead of the expected

      foo -javaagent...

      Show
      deploy an openjdk application, set env JAVA_APP_NAME=foo oc rsh <pod> ps x -o args notice the process cmd starts with 'foo' -javaagent... instead of the expected foo -javaagent...

      https://github.com/jboss-openshift/cct_module/blob/master/os-java-run/added/run-java.sh#L217

      is not interpreted by shell, but instead just passed as argument, so

      • JAVA_APP_NAME=foo means the process name will be 'foo' (with the single quotes included
      • JAVA_APP_NAME=foo bar will cause the container to crash loop with exec: bar': not found

            jdowland@redhat.com Jonathan Dowland
            maschmid@redhat.com Marek Schmidt
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: