Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix bug cause 'plugins."io.containerd.grpc.v1.cri".registry' duplicat…
…ed (#192) env: Aliyun ACK kubernetes: 1.22.15-aliyun.1 containerd: 1.5.13 if `[plugins."io.containerd.grpc.v1.cri".registry]` exists in containerd config file, will insert duplicated line `[plugins."io.containerd.grpc.v1.cri".registry]`, which will cause a containerd fatal error: ``` Aug 11 15:00:34 systemd[1]: containerd.service holdoff time over, scheduling restart. Aug 11 15:00:34 systemd[1]: Stopped containerd container runtime. Aug 11 15:00:34 systemd[1]: Starting containerd container runtime... Aug 11 15:00:34 containerd[501622]: containerd: failed to load TOML: /etc/containerd/config.toml: (72, 2): duplicated tables Aug 11 15:00:34 systemd[1]: containerd.service: main process exited, code=exited, status=1/FAILURE Aug 11 15:00:34 systemd[1]: Failed to start containerd container runtime. Aug 11 15:00:34 systemd[1]: Unit containerd.service entered failed state. Aug 11 15:00:34 systemd[1]: containerd.service failed. ``` this commit is for checking the line exist, then append the cert config after it Signed-off-by: littleplus <start@tom.com> Co-authored-by: littleplus <start@tom.com>
- Loading branch information