-
Notifications
You must be signed in to change notification settings - Fork 184
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for handling API errors from Podman #584
Comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Community Note
Description
The Coder (coder.com) application makes use of this Terraform provider to interact with Docker. For the most part, when replacing Docker with Podman, this continues to work very well, which is awesome! I have noticed a small inconsistency in how error messages are reported from the Podman API vs the Docker API that causes an error to be reported in Coder (although the functionality still works), and which I believe could be easily worked around here to allow more complete replacement of Docker with Podman in some situations.
When the Docker API returns an error indicating that there is no such container, the response is "No such container". Podman returns "no such container" (lowercase). My suggestion is to make
containsIgnorableErrorMessage
(ininternal/provider/helpers.go
) lowercase theerrorMsg
andignorableErrorMessages
that it takes in so that the comparison would work for either case, and allow more interoperability with the Podman API.New or Affected Resource(s)
resourceDockerContainerDelete
function when it waits for the container to be deleted:if !containsIgnorableErrorMessage(err.Error(), "No such container", "is already in progress") {
Potential Terraform Configuration
References
The text was updated successfully, but these errors were encountered: