Skip to content

Way to check if containers have booted #423

Closed
@ribalba

Description

@ribalba

Flows are currently failing because containers are taking longer to boot than we currently wait in the runner.py. Currently I modify the runner to have a custom wait.
I see the following options to fix this:

  • Add a variable to the usage_scenario where we can set a custom wait time if we know that containers might take longer to boot
  • Add a variable to the config.yml to wait in the boot phase. Not a big fan of this as development with the GMT is already quite time consuming/ annoying based on all the sleeps. And this would be for all runs even the ones we don't need the sleep as the containers don't need the time to boot.
  • Offer some checker to see if a container has booted with a timeout[1][2]. I imagine something like:
...
services:
  a:
    container_name: a
    image: a
    healthcheck:
      test: ["CMD-SHELL", "true"]
      interval: 10s
      timeout: 5s
      retries: 5

As soon as we see this in the services we start a routine to check that all containers have started before continuing.

[1] https://docs.docker.com/engine/reference/builder/#healthcheck
[2] https://docs.docker.com/compose/compose-file/compose-file-v3/#healthcheck

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions