ops: run Linux provider gateway as root
Pipelines as Code CI / hwlab-web-probe-sentinel-nc01- Success
Pipelines as Code CI / platform-infra-gitea-nc01- Success
Pipelines as Code CI / unidesk-host- Success

This commit is contained in:
pikastech
2026-07-20 18:03:04 +02:00
parent 091f192df0
commit d229bc81b3
2 changed files with 7 additions and 2 deletions
+5
View File
@@ -46,6 +46,11 @@
## Hyper-V Ubuntu Provider VM
- `config/platform-infra/hyperv-vms.yaml` 是 Windows Hyper-V Ubuntu Provider VM 的唯一配置真相,完整需求见 `project-management/PJ2026-01/specs/PJ2026-01060314-hyperv-ubuntu-vm.md`
- Linux `provider-gateway` 权限边界:
- Provider 运行用户必须是 `root`,以便受控入口管理系统级网络、代理、Docker、k3s 和 `/etc` 配置;
- Windows SSH bootstrap 可以使用 YAML 声明的普通用户并通过 `sudo` 安装,但最终 Provider 进程必须以 `root` 运行;
- 缺少 root 权限时必须停止并向用户申请权限;
- 禁止改用降权 helper、旁路 route、其他 provider 标识或手工运行面修改来规避权限要求。
- 安装与状态入口为 `platform-infra hyperv-vm plan|apply|status|logs`;用户原入口验收统一使用 `platform-infra hyperv-vm verify --target <id>`,不得以 VM、systemd 或容器 active 替代 `trans` host 与 k3s route 证据。
- `verify` 默认只读。只有返回 Provider TCP 数据通道缺失且操作者显式提供 `--repair-provider-channel --confirm` 时,才允许通过 owning YAML 声明的宿主 route 重启 Provider systemd unit并在同一调用内重试;普通超时或数据池忙只允许重试。
- Provider 通道修复不得重启 VM、Docker 或 k3s;目标、guest SSH、unit 和重试参数均由 owning YAML 声明,禁止在 CLI 中固化节点特例。