-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add diagnostic for IPv6 support (see #357)
- Loading branch information
Showing
8 changed files
with
104 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
from .diagnostic_all import allDiagnostics | ||
from .diagnostic_8gig import diagnostic8Gig | ||
from .diagnostic_20gig import diagnostic20Gig | ||
from .diagnostic_ipv6 import diagnosticIPv6 | ||
from .diagnostic_network import diagnosticNetwork |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
from .base import DiagnosticBase | ||
|
||
|
||
class diagnosticIPv6(DiagnosticBase): | ||
# The tag we use for built images | ||
IMAGE_TAG = "adamrehn/ue4-docker/diagnostics:ipv6" | ||
|
||
def __init__(self): | ||
pass | ||
|
||
def getName(self): | ||
""" | ||
Returns the human-readable name of the diagnostic | ||
""" | ||
return "Check that Linux containers can access the IPv6 loopback address" | ||
|
||
def getDescription(self): | ||
""" | ||
Returns a description of what the diagnostic does | ||
""" | ||
return "\n".join( | ||
[ | ||
"This diagnostic determines whether Linux containers are able to access the IPv6,", | ||
"loopback address ::1, which is required by Unreal Engine 5.4 and newer for", | ||
"local ZenServer communication.", | ||
"", | ||
"This should work automatically under Docker 26.0.0 and newer, but older versions", | ||
"require manual configuration by the user.", | ||
] | ||
) | ||
|
||
def getPrefix(self): | ||
""" | ||
Returns the short name of the diagnostic for use in log output | ||
""" | ||
return "ipv6" | ||
|
||
def run(self, logger, args=[]): | ||
""" | ||
Runs the diagnostic | ||
""" | ||
|
||
# This diagnostic only applies to Linux containers | ||
containerPlatform = "linux" | ||
|
||
# Verify that the user isn't trying to test Linux containers under Windows 10 when in Windows container mode | ||
try: | ||
self._checkPlatformMistmatch(logger, containerPlatform, False) | ||
except RuntimeError: | ||
return False | ||
|
||
# Attempt to build the Dockerfile | ||
logger.action( | ||
"[network] Attempting to build an image that accesses the IPv6 loopback address...", | ||
False, | ||
) | ||
built = self._buildDockerfile( | ||
logger, containerPlatform, diagnosticIPv6.IMAGE_TAG, [] | ||
) | ||
|
||
# Inform the user of the outcome of the diagnostic | ||
if built == True: | ||
logger.action( | ||
"[network] Diagnostic succeeded! Linux containers can access the IPv6 loopback address without any issues.\n" | ||
) | ||
else: | ||
logger.error( | ||
"[network] Diagnostic failed! Linux containers cannot access the IPv6 loopback address. Update to Docker 26.0.0+ or manually enable IPv6:", | ||
True, | ||
) | ||
logger.error( | ||
"[network] https://docs.docker.com/config/daemon/ipv6/#use-ipv6-for-the-default-bridge-network\n", | ||
False, | ||
) | ||
|
||
return built |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM alpine:latest | ||
|
||
# Add a sentinel label so we can easily identify intermediate images | ||
LABEL com.adamrehn.ue4-docker.sentinel="1" | ||
|
||
# Test that we can ping the IPv6 loopback address | ||
RUN ping6 -c 5 '::1' |