fix(deploy): order cube-proxy.service after cube-sandbox-dns.service#346
Merged
fslongjin merged 1 commit intoMay 25, 2026
Merged
Conversation
cube-sandbox-cube-proxy.service runs cube-proxy-start.sh, which performs `docker build` containing `apk update`. That step needs the host's /etc/resolv.conf to already be rewritten away from the systemd-resolved loopback stub (127.0.0.53) — otherwise Docker copies the loopback nameserver into the build container and `apk update` fails to resolve mirrors.tencent.com, breaking the one-click install on Ubuntu 24.04 and similar systemd-resolved hosts (issue TencentCloud#345). PR TencentCloud#331 introduced cube-sandbox-dns.service, a oneshot that runs dns-host-route-up.sh to perform that rewrite, but the two units were only co-pulled by cube-sandbox-control.target via Wants= with no explicit ordering between them — letting cube-proxy race ahead of the DNS rewrite. Add cube-sandbox-dns.service to After= so systemd waits for the oneshot to finish before starting cube-proxy, and to Wants= to match the file's existing After=/Wants= convention and keep the unit robust when started directly outside the control target. Signed-off-by: staryxchen <staryxchen@tencent.com>
|
Claude finished @staryxchen's task in 26s —— View job Code Review: fix(deploy): order cube-proxy.service after cube-sandbox-dns.serviceResult: ✅ Looks good — no issues found. SummaryThe change adds Analysis
Test plan notesThe test plan in the PR description covers the right scenarios. One refinement:
No changes requested. |
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
cube-sandbox-cube-proxy.servicerunscube-proxy-start.sh, which callsdocker buildcontainingapk update. That step needs/etc/resolv.confalready rewritten away from the systemd-resolved loopback stub (127.0.0.53); otherwise Docker copies the loopback nameserver into the build container andapk updatefails to resolvemirrors.tencent.com, breaking the one-click install on Ubuntu 24.04 and similar systemd-resolved hosts ([Bug Report] One-click install fails on Ubuntu 24.04: apk update can't resolve Tencent Alpine mirror during cube-proxy image build #345).cube-sandbox-dns.service(oneshot runningdns-host-route-up.sh) to perform that rewrite, but the two units were only co-pulled bycube-sandbox-control.targetviaWants=with no explicit ordering — lettingcube-proxyrace ahead of the DNS rewrite.cube-sandbox-dns.servicetoAfter=so systemd waits for the oneshot to finish before startingcube-proxy, and toWants=to match the file's existingAfter=/Wants=convention and keep the unit robust when started directly outside the control target.Test plan
/etc/resolv.conf→127.0.0.53): runonline-install.sh | MIRROR=cn bashand confirm cube-proxy image build'sapk updatesucceeds without manual/etc/docker/daemon.jsonworkaround.systemctl list-dependencies cube-sandbox-cube-proxy.serviceshowscube-sandbox-dns.servicein the resolved chain.systemctl show cube-sandbox-cube-proxy.service -p Afterincludescube-sandbox-dns.service.systemctl restart cube-sandbox-cube-proxy.service(alone, outside the target) also brings upcube-sandbox-dns.servicefirst.Refs: #345, #331