Skip to content

garden plugins kubernetes cluster-init cannot find garden-docker-registry pod #1635

Closed
@10ko

Description

@10ko

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugpriority:mediumMedium priority issue or featureprovider/k8sstaleLabel that's automatically set by stalebot. Stale issues get closed after 14 days of inactivity.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions