fix(chv-guest): seed user-data 不再自带 runcmd,防顶掉镜像钩子
sync-test 首轮实测:seed 的 runcmd 整体替换了镜像 /etc/cloud/cloud.cfg.d/99-chv-sync.cfg 的 runcmd(cloud-init 不跨配置类型合并,merge_how 救不了 conf.d),chv-sync boot 钩子静默不跑、启动 clone 没跑。 - hostkeys.build_seed_user_data 不再发 runcmd;chmod 600 已由 write_files 0600 保证;sshd 重启搬到镜像自己的 runcmd(cloud-final,sshd 首次启动之后)。 - build.sh:99-chv-sync.cfg 的 runcmd 增加 restart ssh 一行(在 chv-sync boot 之前)。 - README §5 同步硬性要求;回归测试 2 项(无 runcmd、 带 secret 仍单 write_files 列表无 runcmd)。 - 针对性 147 项全过(test_chv_to10/gaps/secfix/fix/ arch95plus)。 本地提交,未推未部署。
This commit is contained in:
1 parent
cbd5ab7c0b
commit
67ca0b86cd
4 files changed
+71
-10
No files matched your search
+1
-1
@@ -244,7 +244,7 @@ VC_ARGS=(-a "$OUT/disk.raw"
|
||||
--copy-in "$REPO_DIR/cloud:/app/"
|
||||
--copy-in "$SCRIPT_DIR/chv-sync.sh:/usr/local/bin/"
|
||||
--run-command 'mv /usr/local/bin/chv-sync.sh /usr/local/bin/chv-sync && chmod +x /usr/local/bin/chv-sync'
|
||||
--run-command 'printf "runcmd:\n - /usr/local/bin/chv-sync boot >>/var/log/chv-sync.log 2>&1 || true\n" > /etc/cloud/cloud.cfg.d/99-chv-sync.cfg'
|
||||
--run-command 'printf "runcmd:\n - systemctl restart ssh || service ssh restart || true\n - /usr/local/bin/chv-sync boot >>/var/log/chv-sync.log 2>&1 || true\n" > /etc/cloud/cloud.cfg.d/99-chv-sync.cfg'
|
||||
--run-command 'git config --system user.name chv && git config --system user.email chv@localhost && git config --system credential.helper store && git config --system init.defaultBranch main'
|
||||
--run-command "$GT_INSTALL_CMD"
|
||||
--run-command '/usr/local/bin/gt version > /app/guest-versions-gt.txt'
|
||||
|
||||
Reference in new issue
Block a user