generated from ansible-collections/collection_template
-
Notifications
You must be signed in to change notification settings - Fork 122
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
Misleading error when binding ports on IPv6 without square brackets #365
Labels
Comments
I created a PR to fix this in #367. |
felixfontein
added
bug
Something isn't working
docker-plain
plain Docker (no swarm, no compose, no stack)
labels
May 21, 2022
This was referenced May 24, 2022
1 task
Merged
1 task
1 task
1 task
1 task
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
SUMMARY
When binding ports to an IPv6 address for a container, the IPv6 address has to be in [square brackets]. If not, it only checks whether there are one, two or three parts split by colons, and fails to catch any remaining cases which would indicate improper handling. Instead, the module fails with
UnboundLocalError: local variable 'port_binds' referenced before assignment
where it should tell the user to put IPv6 addresses in square brackets.ISSUE TYPE
COMPONENT NAME
docker_container.py
ANSIBLE VERSION
COLLECTION VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
EXPECTED RESULTS
Module fails with helpful message that the string describing the port binding is malformed and if the user meant to specify an IPv6 address, it should be put in square brackets.
ACTUAL RESULTS
Module fails with
UnboundLocalError: local variable 'port_binds' referenced before assignment
.The text was updated successfully, but these errors were encountered: