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

[RHEL-9] JAVA_APP_NAME breaks if contains whitespace, incorrectly wraps with quotes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • UBI9 Containers 1.15.GA
    • UBI9 Containers 1.14.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
              jdowland@redhat.com Jonathan Dowland
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: