Uploaded image for project: 'Marathon'
  1. Marathon
  2. MARATHON-8254

"*" for MARATHON_DEFAULT_ACCEPTED_RESOURCE_ROLES gets filename-expanded

    Details

      Description

      Expected behavior:

      If I specify an environment variable MARATHON_DEFAULT_ACCEPTED_RESOURCE_ROLES="*", then Marathon should receive the parameter --default_accepted_resource_roles "*".

      Observed behavior:

      Marathon is getting the glob expanded list of files, instead of the string "*", and fails to launch. IE:

       --default_accepted_resource_roles bin boot dev etc home lib lib64 lost+found media mnt opt proc root run sbin srv sys tmp usr var 
      

      Additional details

      Our bin/marathon launcher script for Marathon which is responsible for taking environment variables prefixed with MARATHON_ and converting them into arguments is not properly quoting the values.

      Acceptance criteria

      Properly quote asterisks

      Given you build Marathon with sbt stage
      When you run bin/marathon from the folder ./target/universal/stage with an exported env variable MARATHON_MESOS_ROLE="*"
      Then Marathon should launch properly
      And when you query /v2/info you should see "mesos_role": "*" in the output

      HOOK_MARATHON_START continues to work

      Given you build Marathon with sbt stage
      And a script test.sh in ./target/universal/stage with 755 permissions and the contents:

      echo test-hook-script executed
      echo "MARATHON_LOL=testing" > test.env
      

      When you run bin/marathon from the folder ./target/universal/stage with an exported env variable HOOK_MARATHON_START=test.sh
      Then you should see test-hook-script in the output
      And you should also see an error reporting Unknown option 'lol'

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                tharper Tim Harper
                Reporter:
                tharper Tim Harper
                Team:
                Orchestration Team
                Watchers:
                Tim Harper
              • Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: