Uploaded image for project: 'Bamboo Data Center'
  1. Bamboo Data Center
  2. BAM-21233

Overriding xmx and xms is not possible via env vars in atlassian/bamboo-agent-base

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • 8.0.0, 8.0.0 EAP1
    • 7.2.2
    • Docker
    • None

      Issue Summary

      https://hub.docker.com/r/atlassian/bamboo-agent-base says it's possible to pass VM_OPTS to the container and they will be respected by the agent. However, even though this env var is passed to java -jar command, props are set for the wrapper JVM, not the agent. As a result, the only way to override props is to mount an entire conf file, which isn't a very container friendly approach

      Steps to Reproduce

      1. Run agent container according to docs on DockerHub, with -e VM_OPTS

      Expected Results

      Xmx or Xms are overridden for the agent process.

      Actual Results

      Java opts are overridden for the wrapper JVM only and the agent starts with default hardcoded settings.

      Workaround

      One can build own image, and execute bamboo-agent.jar rather than installer jar (use now wrapper).
      FROM atlassian/bamboo-agent-base:latest
      ADD bamboo-agent-7.2.2.jar
       
      then
      docker build -t registry/repo:tag .
       
      Add 2 envs to docker run to override jar location and pass VM_OPTS
      -e AGENT_JAR=/home/bamboo/bamboo-agent-7.2.2.jar -e VM_OPTS="-Xmx2048m"
      Alternatively, since an entire Bamboo home is mounted, one can edit the file, but that's not a great solution in a containers world.

      Looking at https://hub.docker.com/r/dchevell/bamboo-base-agent and what's happening there, it turns out conf file is generated from a template and some props are substituted with env var values.

            [BAM-21233] Overriding xmx and xms is not possible via env vars in atlassian/bamboo-agent-base

            mforrer added a comment -

            any idea when this gets resolved? We're still waiting for a solution.

            mforrer added a comment - any idea when this gets resolved? We're still waiting for a solution.

            mforrer added a comment -

            definitely highly interested in a solution as quickly as possible!

            mforrer added a comment - definitely highly interested in a solution as quickly as possible!

              Unassigned Unassigned
              c64f33b2bce3 Yevhen
              Affected customers:
              1 This affects my team
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: