From d626a3c82ffde5b40f0b9537c843f669a9fe3e2c Mon Sep 17 00:00:00 2001 From: Kenichi Omichi Date: Tue, 20 Sep 2022 00:31:43 +0000 Subject: [PATCH] DNM: Check restarting-containerd work or not --- roles/network_plugin/macvlan/tasks/main.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/roles/network_plugin/macvlan/tasks/main.yml b/roles/network_plugin/macvlan/tasks/main.yml index bdc2dbc26..c5c079a3e 100644 --- a/roles/network_plugin/macvlan/tasks/main.yml +++ b/roles/network_plugin/macvlan/tasks/main.yml @@ -108,3 +108,18 @@ sysctl_file: "{{ sysctl_file_path }}" state: present reload: yes + +- name: Containerd | restart containerd + systemd: + name: containerd + state: restarted + enabled: yes + daemon-reload: yes + masked: no + +- name: Containerd | wait for containerd + command: "{{ containerd_bin_dir }}/ctr images ls -q" + register: containerd_ready + retries: 8 + delay: 4 + until: containerd_ready.rc == 0