Skip to content

Use container ID, not name, for service's healthcheck hostname

What does this MR do?

For the docker executor's health check, it passes in the short container ID for the hostname, rather than the long container name for that service.

Why was this MR needed?

The Docker executor's service names are not always valid hostnames. The components are often over 63 characters long. Due to the invalid name, the inbuilt DNS server that handles requests never resolves the name provided.

This is typically hit whenever using a docker image from anything other than hub.docker.com, as the full registry address is used for the container name. Such as is the case with #25660 (closed).

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

There's an issue open https://github.com/docker/for-win/issues/4425 regarding "short names" not working on Windows. However, I don't believe these affect the container IDs being used as a hostname.

Full container IDs are always 64 characters, and the short verison always 12.

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?

Closes #25660 (closed)

Edited by Arran Walker

Merge request reports