fix: tailscale container hook supports xbps, arch detection, and static binary fallback#2651
fix: tailscale container hook supports xbps, arch detection, and static binary fallback#2651medzin wants to merge 1 commit into
Conversation
…ic binary fallback The Tailscale Docker hook only detected apt-get, apk, and pacman with a hardcoded amd64 tarball, causing containers on other distros (Void Linux) or stripped-down minimal images without a package manager to fail with "Detection from Package Manager failed!" and start without Tailscale. - Add xbps-install detection for Void Linux. - Add static binary fallback when no package manager is available: fetch a static jq from jqlang/jq releases. The Tailscale tarball download path already works without a package manager, so jq was the only missing dependency. Exit-node mode (which needs iptables) still errors clearly under the fallback. - Detect host architecture and pick the matching Tailscale tarball and jq binary (was hardcoded amd64). - Create /var/log before redirecting tailscaled output so the daemon actually starts on images that don't ship the directory (e.g. searxng/searxng). Refs unraid#2650
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughThe Tailscale container hook script now detects host CPU architecture and adapts binary selection, adds support for xbps-install package manager, implements a static-binary fallback mode for unsupported environments, and ensures correct log directory setup. Architecture-specific Tailscale tarballs are downloaded based on detected CPU type. ChangesTailscale Container Hook Multi-Architecture Support
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Fixes #2650.
xbps-installdetection for Void Linux.jqfromjqlang/jqreleases (the Tailscale tarball is already static, sojqwas the only remaining dependency). Exit-node mode still errors clearly under the fallback since it needsiptables.uname -m) and pick the matching Tailscale tarball +jqbinary; was hardcoded amd64.mkdir -p /var/logbefore redirecting tailscaled output, so the daemon starts on images that don't ship the directory.Verified end-to-end against
searxng/searxng:latest(exercises the static fallback + arch detection +/var/logfix) andghcr.io/void-linux/void-glibc-full:latest(exercises the xbps path). In both,tailscaledboots andtailscale upreachescontrolplane.tailscale.com, failing only at fake auth key validation.Summary by CodeRabbit