From c0860d58a4f49cc5728bb09f540c54e693dcfbae Mon Sep 17 00:00:00 2001 From: Jiri Stransky Date: Fri, 31 May 2019 14:17:57 +0200 Subject: [PATCH] Do not assume the CNI config directory exists The upgrade to Stein can fail on task "Remove default cni config for cni0" with error "Destination directory /etc/cni/net.d does not exist". Don't fail if the directory doesn't exist. Change-Id: Ia08ec74917b6d80376f59ce04613432ad0b041ea Closes-Bug: #1831238 --- deployment/podman/podman-baremetal-ansible.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/deployment/podman/podman-baremetal-ansible.yaml b/deployment/podman/podman-baremetal-ansible.yaml index fad398f252..46f737f254 100644 --- a/deployment/podman/podman-baremetal-ansible.yaml +++ b/deployment/podman/podman-baremetal-ansible.yaml @@ -60,11 +60,12 @@ outputs: package: name: podman state: latest - - name: Remove default cni config for cni0 + - name: Remove default cni config for cni0 if exists copy: dest: /etc/cni/net.d/87-podman-bridge.conflist content: '' force: yes + ignore_errors: True - name: Delete cni0 interface if exists command: ip link delete cni0 ignore_errors: True @@ -88,11 +89,12 @@ outputs: - name: Install podman packages on upgrade if missing when: step|int == 3 package: name=podman state=latest - - name: Remove default cni config for cni0 + - name: Remove default cni config for cni0 if exists copy: dest: /etc/cni/net.d/87-podman-bridge.conflist content: '' force: yes + ignore_errors: True - name: Delete cni0 interface if exists command: ip link delete cni0 ignore_errors: True