terraform-provider-docker: Multiple problems with the plugin
Community Note
- Please vote on this issue by adding a π reaction to the original issue to help the community and maintainers prioritize this request
- Please do not leave β+1β or βme tooβ comments, they generate extra noise for issue followers and do not help prioritize the request
- If you are interested in working on this issue or have submitted a pull request, please leave a comment
Terraform (and docker Provider) Version
0.13.4, 0.14.8
Affected Resource(s)
2.10.0, 2.11.0
Docker version 19.03.12, build 48a66213fe
Terraform Configuration Files
terraform {
required_providers {
docker = {
source = "kreuzwerker/docker"
version = "2.11.0"
}
}
}
provider "docker" {
host = "npipe:////.//pipe//docker_engine"
registry_auth {
# some settings
}
}
data "docker_registry_image" "jenkins-image" {
name = "some-registry/some-repository/jenkins:version"
}
resource "docker_image" "jenkins" {
name = data.docker_registry_image.jenkins-image.name
pull_triggers = [data.docker_registry_image.jenkins-image.sha256_digest]
keep_locally = true
}
resource "docker_volume" "prod-jenkins" {
name = "prod-jenkins"
}
resource "docker_service" "prod-jenkins" {
name = "prod-jenkins"
task_spec {
container_spec {
image = data.docker_registry_image.jenkins-image.name
mounts {
target = "/var/jenkins_home"
source = "prod-jenkins"
type = "volume"
read_only = false
}
env = {
# some env variables
}
}
}
endpoint_spec {
ports {
# some settings
}
ports {
# some settings
}
}
}
Debug Output
No special warnings or errors in debug logs.
Panic Output
N/A
Expected Behaviour
All resources are created, removed or updated.
Actual Behaviour
Many different issues:
#1 - timeout
D:\some\path>terraform apply -auto-approve -no-color
data.docker_registry_image.jenkins-image: Refreshing state...
Error: timeout while waiting for plugin to start
[Pipeline] echo
Skipping terraform-jenkins-repo\production-jenkins2...
[Pipeline] echo
script returned exit code 1
#2 - refreshing was not responding
D:\some\path>terraform plan -no-color
Refreshing Terraform state in-memory prior to plan...
The refreshed state will be used to calculate this plan, but will not be
persisted to local or remote state storage.
data.docker_registry_image.jenkins-image: Refreshing state... [id=sha256:7892bfdb1d0114fbfd7b12a5d9c298c433cbdd24316f7130b465d76a70ed5b3d]
docker_volume.dev-jenkins2: Refreshing state... [id=dev-jenkins2]
docker_image.jenkins: Refreshing state... [id=sha256:a518becb9e71f68686eff2c90f729f28fe561d44da77842aa09d4bcccb8ba537some-registry/jenkins:2.263.4-release14]
docker_service.dev-jenkins2: Refreshing state... [id=o7sszeydr2sogox686vrp6fhy]
Aborted by admin
Sending interrupt signal to process
Interrupt received.
Please wait for Terraform to exit or data loss may occur.
Gracefully shutting down...
script returned exit code -1
#3 - issue with loading
D:\some\path>terraform plan -no-color
Error: Could not load plugin
Plugin reinitialization required. Please run "terraform init".
Plugins are external binaries that Terraform uses to access and manipulate
resources. The configuration provided requires plugins which can't be located,
don't satisfy the version constraints, or are otherwise incompatible.
Terraform automatically discovers provider requirements from your
configuration, including providers used in child modules. To see the
requirements and constraints, run "terraform providers".
Failed to instantiate provider "registry.terraform.io/kreuzwerker/docker" to
obtain schema: timeout while waiting for plugin to start
#4 - TLS timeout
Initializing the backend...Initializing provider plugins...
- Finding kreuzwerker/docker versions matching "2.11.0"...
- Installing kreuzwerker/docker v2.11.0...
Error: Failed to install providerError while installing kreuzwerker/docker v2.11.0: Get
"https://github.com/kreuzwerker/terraform-provider-docker/releases/download/v2.11.0/terraform-provider-docker_2.11.0_windows_amd64.zip":
net/http: TLS handshake timeout
#5 - removing docker_volume
Error: timeout while waiting for state to become 'removed' (last state: 'in_use', timeout: 30s)
Steps to Reproduce
- Just use
terraform applyorterraform plan- the issues above seem to be non-deterministic, sometimes I have to re-start the pipeline several times, and sometimes some builds in a row are successful.
Important Factoids
References
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 21
Sure, I will post here debug logs as soon as I get the error message.