Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fail early if Docker daemon is not available #88

Closed
clstokes opened this issue May 30, 2019 · 4 comments
Closed

Fail early if Docker daemon is not available #88

clstokes opened this issue May 30, 2019 · 4 comments
Labels
impact/usability Something that impacts users' ability to use the product easily and intuitively resolution/by-design This issue won't be fixed because the functionality is working as designed

Comments

@clstokes
Copy link

When using the Docker provider in a large deployment (e.g. aws-ts-thumbnailer), a Pulumi update can get pretty far along before failing on the Docker image build because the Docker daemon is not running or unavailable. This leaves the user and the update in an awkward state - best case they start docker and continue, worst case they have to install docker which can be a hassle depending on the platform.

Can the docker provider do a check as a part of the preview to determine if the environment is ready to go? This seems similar to the aws provider checking for credentials.

@pgavlin pgavlin added feature/q3 impact/no-changelog-required This issue doesn't require a CHANGELOG update impact/usability Something that impacts users' ability to use the product easily and intuitively and removed impact/no-changelog-required This issue doesn't require a CHANGELOG update labels Jul 19, 2019
@stack72 stack72 added this to the 0.32 milestone Feb 26, 2020
@stack72 stack72 self-assigned this Feb 26, 2020
@lukehoban
Copy link
Contributor

Note that to do this properly probably requires #132 so that we can fail at provider configuration time.

My suggestion would be to invest time in that issue instead of trying to patch things like this - as that will address a broad range of issues with the current implementation of this.

@stack72
Copy link
Contributor

stack72 commented Feb 28, 2020

Ok, I am going to leave this to be part of #132 so will move it outside of 0.32

@stack72 stack72 removed this from the 0.32 milestone Feb 28, 2020
@AaronFriel
Copy link
Contributor

There are a couple reasons I'm inclined to close this as by-design:

First, Pulumi does not eagerly instantiate default providers at application start; default providers are initialized on demand. The Image resource - or any other - will be created at approximately the same time as the provider.

Second, when we connect to the daemon, we don't know what the user will ask of that daemon to do. Particularly as we move to support cross platform builds (#471), not all Docker Engine daemons are configured for cross platform builds (with binfmt using QEMU). The platform field of an Image resource can cause a build to fail at the point of performing the build.

This issue is analogous to deploying a resource to Kubernetes. Moving kube-api-server detection into the provider create is insufficient to determine if resource creates will fail due to Kubernetes version or installed CRDs, and for most workflows the resource create occurs moments after the provider.

@AaronFriel AaronFriel added the resolution/by-design This issue won't be fixed because the functionality is working as designed label Feb 13, 2023
@AaronFriel
Copy link
Contributor

We're going to look at #51 to ensure the Docker Image resource uses provider config if possible. That may provide some degree of detection, however we cannot address this issue generally by design.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/usability Something that impacts users' ability to use the product easily and intuitively resolution/by-design This issue won't be fixed because the functionality is working as designed
Projects
None yet
Development

No branches or pull requests

5 participants