Skip to content
Snippets Groups Projects
Unverified Commit 2aafab6c authored by ERIK's avatar ERIK Committed by GitHub
Browse files

fix etcdctl copy operation in crio (#10242)


Signed-off-by: default avatarbo.jiang <bo.jiang@daocloud.io>
parent 35aaf972
No related branches found
No related tags found
No related merge requests found
......@@ -42,7 +42,10 @@
when: container_manager == "docker"
- 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']
- name: Copy etcdctl to {{ bin_dir }}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment