Skip to content

Count idle docker-machine instances properly v2

Constantine Mavromichalis requested to merge (removed):pickup into main

What does this MR do?

I'm trying to get traction for !1624 (comment 265504593)

The original developer hasn't responded in a few weeks to my merge request and the logs getting spammed with level=warning msg="Failed to update executor docker+machine for xxxxxxxx No free machines that can process builds" is annoying.

Quoting !1624 (comment 265504593) :

This merge request fixes #2251 by ensuring that idle machines are not left in the acquired status forever. That ensures that using IdleCount: 1 in the gitlab-runner configuration will not cause tons of No free machines that can process builds in the logs.

It also ensures that users do not see the No free machines error if gitlab-runner is creating a new machine to run the job.

Finally, it adds all of the machineDetails() fields to the debug log to make bugs like these easier to find in the future.

(I am happy to split these into multiple MRs if needed.)

Additionally I updated the unit tests, starting from !1624 (closed) Split machineDetails into machineDetails and machineAcquire so I could fix unit tests for counting idle docker-machine instances properly

Why was this MR needed?

We have a good use case for IdleCount: 1 via docker machine in AWS and the No free machines messages were filling our logs.

Are there points in the code the reviewer needs to double check?

Please focus on the changes made in executor/docker/machine/* and that I did not unknowingly introduce problems or break patterns/workflows that are in the larger scope of things I am not aware of.

Does this MR meet the acceptance criteria?

  • Documentation created/updated
  • Added tests for this feature/bug
  • In case of conflicts with master - branch was rebased

What are the relevant issue numbers?

#2251

Merge request reports