fix(network): probe IPv6 and fall back to v4-only on aardvark bind failure#247
Merged
fix(network): probe IPv6 and fall back to v4-only on aardvark bind failure#247
Conversation
HostHasUsableIPv6 can return true on hosts where rootless podman's aardvark-dns still can't bind the ULA gateway (e.g. netavark/pasta routing gaps). This caused php-fpm, mysql, and nginx to fail on upgrade with "Cannot assign requested address" on [fd00:1e7d::1]:53. - After creating a dual-stack network, run a throw-away container to verify aardvark-dns can actually bind the IPv6 gateway. If it can't, tear down and recreate as v4-only. - Stop containers via StopUnit (systemctl) instead of podman stop during migration, preventing systemd auto-restart races that left aardvark-dns with partial registrations and broke inter-container DNS. - Write a marker file on probe failure so subsequent installs don't endlessly re-trigger the dual-stack migration.
Older binaries don't know about dual-stack networks, so rolling back leaves a broken IPv6 network in place. RecreateNetwork before re-exec ensures the old binary's `lerd install` starts with a clean network.
The rollback runs RecreateNetwork (with probe) before re-execing the old binary. This ensures a clean network regardless of the target version: if IPv6 works the old binary gets a functional dual-stack network, if not it gets v4-only.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
systemctl --user stop(StopUnit) instead ofpodman stopduring migration, preventing systemd auto-restart races that broke inter-container DNS~/.local/share/lerd/ipv6-probe-failed-lerd) on probe failure so subsequentlerd installruns don't re-trigger the migrationFixes upgrade failures from v1.17.1 → v1.18.0-beta.3 where
HostHasUsableIPv6returned true but rootless podman's aardvark-dns couldn't bind[fd00:1e7d::1]:53, causing php-fpm, mysql, and nginx to fail with "Cannot assign requested address".