Rancher rke2部署集群后,怎么修改日志路径

RKE2 我用的麒麟v10系统
rancher rke2部署集群后,默认路径始终是/run/k3s/containerd,修改不过来
vim /var/lib/rancher/rke2/agent/etc/containerd/config.toml
[plugins.“io.containerd.grpc.v1.cri”.containerd]
root = “/data/docker/containerd/root”
state = “/data/docker/containerd/state”
snapshotter = “overlayfs”
disable_snapshot_annotations = true
修改过这个配置,重启systemctl restart rke2-agent,会自动还原配置

也修改过/etc/rancher/rke2/config.yaml(这个文件我自己创建的)
write-kubeconfig-mode: “0644”
data-dir: “/data/docker/containerd”
system-default-registry: “registry.cn-hangzhou.aliyuncs.com
node-name: “work3”
cni: “cilium”
config:
identity-allocation-mode: crd
bpf-map-dynamic-size-ratio: “0.0025”
cluster-cidr: “10.42.0.0/16”
重启后,修改了默认路径,但是cilium-agent服务一直重启,想不到其他方法了

这个是日志
time=“2025-02-17T05:52:32Z” level=info msg=“Allocating identities between range” cluster-id=0 max=65535 min=256 subsys=identity-cache
time=“2025-02-17T05:52:32Z” level=info msg=“regenerating all endpoints” reason=“one or more identities created or deleted” subsys=endpoint-manager
time=“2025-02-17T05:52:33Z” level=info msg=“Program cil_from_overlay attached to device cilium_vxlan using legacy tc” subsys=datapath-loader
time=“2025-02-17T05:52:33Z” level=info msg=“Program cil_to_overlay attached to device cilium_vxlan using legacy tc” subsys=datapath-loader
time=“2025-02-17T05:52:33Z” level=info msg=“Adding new proxy port rules for cilium-dns-egress:45167” id=cilium-dns-egress subsys=proxy
time=“2025-02-17T05:52:33Z” level=info msg=“Initializing daemon” subsys=daemon
time=“2025-02-17T05:52:33Z” level=info msg=“Validating configured node address ranges” subsys=daemon
time=“2025-02-17T05:52:33Z” level=info msg=“Starting IP identity watcher” subsys=ipcache
time=“2025-02-17T05:52:33Z” level=info msg=“Serving cilium API at unix:///var/run/cilium/cilium.sock” subsys=cilium-api-server
time=2025-02-17T05:52:33Z level=info msg=“Start hook executed” function=“cmd.newDaemonPromise.func1 (cmd/daemon_main.go:1730) (agent.controlplane.daemon)” duration=1.339080213s
time=2025-02-17T05:52:33Z level=info msg=Started duration=1.509642364s
time=“2025-02-17T05:52:33Z” level=info msg=“Using discoveryv1.EndpointSlice” subsys=k8s
time=2025-02-17T05:52:33Z level=info msg=Stopping
time=“2025-02-17T05:52:33Z” level=info msg=“regenerating all endpoints” reason=“one or more identities created or deleted” subsys=endpoint-manager
time=“2025-02-17T05:52:34Z” level=info msg=“regenerating all endpoints” reason= subsys=endpoint-manager
panic: Start or stop failed to finish on time, aborting forcefully.

goroutine 1658 [running]:
github.com/cilium/hive.(*Hive).fatalOnTimeout.func1()
/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/hive.go:373 +0xdc
created by github.com/cilium/hive.(*Hive).fatalOnTimeout in goroutine 1
/go/src/github.com/cilium/cilium/vendor/github.com/cilium/hive/hive.go:359 +0x8c
求指点

部署方式docker run -d --restart=unless-stopped --privileged -p 8099:443 -v /data/rancher_home/rancher:/var/lib/rancher -e CATTLE_SYSTEM_DEFAULT_REGISTRY=registry.cn-hangzhou.aliyuncs.com --name rancher registry.cn-hangzhou.aliyuncs.com/rancher/rancher:最新版
ln -s /var/lib/rancher/rke2/bin/crictl /usr/bin/crictl

cat >> /etc/crictl.yaml << EOF

runtime-endpoint: unix:///run/k3s/containerd/containerd.sock

image-endpoint: unix:///run/k3s/containerd/containerd.sock

timeout: 3

debug: true

EOF

ln -s /var/lib/rancher/rke2/bin/kubectl /usr/bin/kubectl

mkdir ${HOME}/.kube/

ln -s /etc/rancher/rke2/rke2.yaml ${HOME}/.kube/config

curl --insecure -fL https://172.99.224.81:10070/system-agent-install.sh | sudo sh -s - --server https://172.99.224.81:10070 --label ‘cattle.io/os=linux’ --token 75gr4wtl74bxljwmhbtvj9nxbfj7blrtwpqcnntzzz9xr7vgp5xbkk --ca-checksum a7ada8be9bec288f02e23c0edd597a9fe8ca44f25360070d34ccdcd9aa9ab188 --etcd --controlplane

参考:https://docs.rke2.io/advanced#configuring-containerd