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

Plugin crashes when using wait=true with no healthcheck command #569

Open
0xall opened this issue Jul 6, 2023 · 0 comments · May be fixed by #641
Open

Plugin crashes when using wait=true with no healthcheck command #569

0xall opened this issue Jul 6, 2023 · 0 comments · May be fixed by #641

Comments

@0xall
Copy link

0xall commented Jul 6, 2023

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

Terraform v1.5.2
on darwin_arm64

Affected Resource(s)

  • docker_container

Terraform Configuration Files

terraform {
  required_providers {
    docker = {
      source  = "kreuzwerker/docker"
      version = "3.0.2"
    }
  }
}

resource "docker_image" "nginx" {
  name         = "nginx:latest"
  keep_locally = true
}

resource "docker_container" "nginx" {
  image = docker_image.nginx.name
  name  = "nginx"
  ports {
    internal = 80
    external = 8080
  }
  wait = true
}

Panic Output

Stack trace from the terraform-provider-docker_v3.0.2 plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x10317c3f4]

goroutine 97 [running]:
github.com/terraform-providers/terraform-provider-docker/internal/provider.resourceDockerContainerCreate.func1(0x0?)
        github.com/terraform-providers/terraform-provider-docker/internal/provider/resource_docker_container_funcs.go:508 +0x154
created by github.com/terraform-providers/terraform-provider-docker/internal/provider.resourceDockerContainerCreate
        github.com/terraform-providers/terraform-provider-docker/internal/provider/resource_docker_container_funcs.go:521 +0x2384

Error: The terraform-provider-docker_v3.0.2 plugin crashed!

Expected Behaviour

Since its wait value is true, it should wait until healthy. But it does not have healthcheck value, so there is no
way to check it. So, it should raise error for terraform apply or terraform validate commands.

Actual Behaviour

  1. It doesn't raise any error for terraform validate command.
  2. It crashes when executing terraform apply.

Steps to Reproduce

  1. terraform apply
@0xall 0xall changed the title Plugin crashes when using wait=true with no healthcheck command Plugin crashes when using wait=true with no healthcheck command Jul 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant