Executing multiple Docker tasks simultaneously on multiple remote agents as the same user on the same machine can cause incorrect credential usage

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Low
    • 9.4.0
    • Affects Version/s: 8.1.2, 9.0.0, 9.1.0, 9.3.0, 9.2.1, 8.2.9
    • Component/s: Docker
    • None
    • 1
    • Severity 3 - Minor
    • 1

      Issue Summary

      When running multiple Remote Agents on the same server using the same user, a race condition exists where multiple Docker Login tasks can overlap and the wrong credentials can be used.

      This is reproducible on Data Center: (yes)

      Steps to Reproduce

      Setup:

      • Remote Agent A and B are installed on one server. Both agents are running under the bamboo-agent user.
      • Build TEST-A and TEST-B both use authenticated docker tasks (ex. Docker Build)
      1. TEST-A is assigned to agent A. The first task executes a docker login.
      2. A very short amount of time after TEST-A executes it's docker login, TEST-B executes a docker login using different credentials

      Expected Results

      TEST-A and TEST-B both use the appropriate credentials as defined in the web UI.

      Actual Results

      In limited scenarios where the docker login tasks are executed in a very short period of time the credentials may get overwritten before being referenced by the task, or when a task ends it performs a docker logout and removes any credentials from the system.

      Task fails with invalid credentials error.

      Workaround

      There are currently two known workarounds:

      1. Deploy all remote agents on dedicated users (User A for Remote Agent A) when installing more than 1 agent per server.
      2. Deploy 1 remote agent per server.

            Assignee:
            James Williams (Inactive)
            Reporter:
            James Williams (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: