Closed
Description
Bug
Current Behavior
@mitchfriedman reports that occasionally when running garden plugins kubernetes cluster-init
the script might fail wit hthe following error message:
Error: Could not find running pod for Deployment/garden-docker-registry
at Object.<anonymous> (/snapshot/project/garden-service/tmp/dist/build/src/plugins/kubernetes/container/exec.js:0)
at Generator.next (<anonymous>)
at fulfilled (/snapshot/project/garden-service/tmp/dist/build/src/plugins/kubernetes/container/exec.js:0)
at processTicksAndRejections (internal/process/task_queues.js:93:5)
Expected behavior
The command should not fail
Reproducible example
It's not consistently happening but just running it multiple time would make the error happen.
Workaround
Running the command again usually will succeed.
Suggested solution(s)
It looks like this is happening because the way we check if a resource is ready in the waitForResources
function.
It might happen that waitForResources
returns before the garden-docker-registry
pods are running, making the execInWorkload
function after that fail.