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

Fix docker goss test #6955

Merged
merged 3 commits into from Apr 17, 2024
Merged

Fix docker goss test #6955

merged 3 commits into from Apr 17, 2024

Conversation

siladu
Copy link
Contributor

@siladu siladu commented Apr 16, 2024

Fixes docker.yml github workflow on self-hosted runner version 2.315.0 (docker 25.0.4+ 26.0.0?)

Since docker 26.0.0, IPv6 is used by default but our goss_wait test is expecting ports to be exposed on IPv4.
Note, this is a problem for amd64 as well as arm64.
Disabling IPv6 should work for all docker versions, at least while the runners are on various versions of docker.

Once all runners are on 26+ then we could probably change goss_wait.yml to:

# runtime docker tests for interfaces & ports
port:
  tcp6:30303:
    listening: true
    ip:
    - '::'
  udp6:30303:
    listening: true
    ip:
    - '::'
  tcp6:8545:
    listening: true
    ip:
    - '::'
  tcp6:8546:
    listening: true
    ip:
    - '::'
  tcp6:8547:
    listening: true
    ip:
    - '::'

and reenable IPv6

Fixes #6929

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
@siladu siladu marked this pull request as draft April 16, 2024 06:26
@siladu
Copy link
Contributor Author

siladu commented Apr 16, 2024

Explicit port mappings doesn't fix the issue

@siladu siladu closed this Apr 16, 2024
Since docker 26.0.0, IPv6 is used by default but our goss_wait test is expecting ports to be exposed on IPv4.
Disabling IPv6 should work for all docker versions
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
@siladu siladu reopened this Apr 17, 2024
@siladu siladu changed the title Explicit port mappings for docker goss test Fix docker goss test Apr 17, 2024
Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
@siladu siladu marked this pull request as ready for review April 17, 2024 04:05
@siladu
Copy link
Contributor Author

siladu commented Apr 17, 2024

Seems to be introduced by this docker 26.0.0 feature...

https://docs.docker.com/engine/release-notes/26.0/#bug-fixes-and-enhancements-1

Always attempt to enable IPv6 on a container's loopback interface, and only include IPv6 in /etc/hosts if successful. moby/moby#47062

Note

By default, IPv6 will remain enabled on a container's loopback interface when the container is not connected to an IPv6-enabled network. For example, containers that are only connected to an IPv4-only network now have the ::1 address on their loopback interface.

To disable IPv6 in a container, use option --sysctl net.ipv6.conf.all.disable_ipv6=1 in the create or run command, or the equivalent sysctls option in the service configuration section of a Compose file.

If IPv6 is not available in a container because it has been explicitly disabled for the container, or the host's networking stack does not have IPv6 enabled (or for any other reason) the container's /etc/hosts file will not include IPv6 entries.

Copy link
Contributor

@jframe jframe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a sensible approach until all the runners can be updated

@siladu siladu merged commit f68db38 into hyperledger:main Apr 17, 2024
42 checks passed
@siladu siladu deleted the docker-goss-fix branch April 17, 2024 06:30
@siladu
Copy link
Contributor Author

siladu commented Apr 18, 2024

Seems like a sensible approach until all the runners can be updated

@jframe spoke to Josh - this is the preferred approach. Most users should remain on ipv4

macfarla pushed a commit to macfarla/besu that referenced this pull request Apr 26, 2024
Disable IPv6 in docker container for goss_wait test

Since docker 26.0.0, IPv6 is used by default but our goss_wait test is expecting ports to be exposed on IPv4.
Disabling IPv6 should work for all docker versions
---------

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by:  Usman Saleem <usman@usmans.info>
macfarla pushed a commit to macfarla/besu that referenced this pull request Apr 26, 2024
Disable IPv6 in docker container for goss_wait test

Since docker 26.0.0, IPv6 is used by default but our goss_wait test is expecting ports to be exposed on IPv4.
Disabling IPv6 should work for all docker versions
---------

Signed-off-by: Simon Dudley <simon.dudley@consensys.net>
Co-authored-by:  Usman Saleem <usman@usmans.info>
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 this pull request may close these issues.

GHA: buildDocker (self-hosted, ARM64) step failing
2 participants