mirror of
https://github.com/kubernetes-sigs/kubespray.git
synced 2025-12-14 22:04:43 +03:00
fix etcdctl copy operation in crio (#10242)
Signed-off-by: bo.jiang <bo.jiang@daocloud.io>
This commit is contained in:
@@ -42,7 +42,10 @@
|
|||||||
when: container_manager == "docker"
|
when: container_manager == "docker"
|
||||||
|
|
||||||
- name: Copy etcdctl script to host
|
- name: Copy etcdctl script to host
|
||||||
shell: "{{ bin_dir }}/nerdctl cp \"$({{ bin_dir }}/crictl ps -q --image {{ etcd_image_repo }}:{{ etcd_image_tag }})\":/usr/local/bin/etcdctl {{ etcd_data_dir }}/etcdctl"
|
shell: >-
|
||||||
|
etcd_ctr_id="$({{ bin_dir }}/crictl ps -q --image {{ etcd_image_repo }}:{{ etcd_image_tag }})" &&
|
||||||
|
etcd_ctr_pid="$({{ bin_dir }}/crictl inspect --output go-template --template '{{ '{{' }} .info.pid {{ '}}' }}' ${etcd_ctr_id})" &&
|
||||||
|
cp /proc/${etcd_ctr_pid}/root/usr/local/bin/etcdctl {{ etcd_data_dir }}/etcdctl
|
||||||
when: container_manager in ['crio', 'containerd']
|
when: container_manager in ['crio', 'containerd']
|
||||||
|
|
||||||
- name: Copy etcdctl to {{ bin_dir }}
|
- name: Copy etcdctl to {{ bin_dir }}
|
||||||
|
|||||||
Reference in New Issue
Block a user