You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the above will pull the elasticsearch image into every host in my docker swarm cluster. In my environment I have found that when scaling up my docker swarm, I have no way to trigger another docker_image.elasticsearch pull so that my new swarm node gets an ES image. Currently, the workaround is that I would have to taint this resource to get it on my new node. Alternatively I can interpolate the cluster size and sha256 together.
So pull_trigger becomes a list called pull_triggers so that image pulls can be invoked by state changes other than just sha changes.
The other change required is that currently when pulling images, the docker provider first checks to see which images are already pulled, then if the image you want is not pulled, it pulls it. When using swarm, while setting up a new swarm host, terraform will not pull existing images onto new hosts, because those same images already exist on some nodes of the cluster already. The simplest fix I can see is to remove this check that sees if an image is already pulled. Pulling an image that you already have just results in a no-op with the side-effect that new swarm hosts will now also download the image as needed.
Later today I'll be throwing together a PR for this enhancement since it should be a very easy change, but I just wanted to get an issue out there for tracking. Thanks!
The text was updated successfully, but these errors were encountered:
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
ghost
locked and limited conversation to collaborators
Apr 18, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Terraform Version
0.7.13
Affected Resource(s)
Please list the resources as a list, for example:
Terraform Configuration Files
Currently, the above will pull the elasticsearch image into every host in my docker swarm cluster. In my environment I have found that when scaling up my docker swarm, I have no way to trigger another docker_image.elasticsearch pull so that my new swarm node gets an ES image. Currently, the workaround is that I would have to taint this resource to get it on my new node. Alternatively I can interpolate the cluster size and sha256 together.
I'm proposing support for something like this:
So pull_trigger becomes a list called pull_triggers so that image pulls can be invoked by state changes other than just sha changes.
The other change required is that currently when pulling images, the docker provider first checks to see which images are already pulled, then if the image you want is not pulled, it pulls it. When using swarm, while setting up a new swarm host, terraform will not pull existing images onto new hosts, because those same images already exist on some nodes of the cluster already. The simplest fix I can see is to remove this check that sees if an image is already pulled. Pulling an image that you already have just results in a no-op with the side-effect that new swarm hosts will now also download the image as needed.
Later today I'll be throwing together a PR for this enhancement since it should be a very easy change, but I just wanted to get an issue out there for tracking. Thanks!
The text was updated successfully, but these errors were encountered: