From 7385fe7b00e999a7c89edf0523708563c7947b17 Mon Sep 17 00:00:00 2001 From: Alexandru Avadanii Date: Mon, 13 Jan 2020 17:47:02 +0100 Subject: [PATCH] Fix ansible disk wipeoff skip Previous commit b2e1386 switched from using a shell `-b` test to using the ansible `stat` module for block device checks. However, Ansible `stat` does not follow symlinks by default, leading to some block devices being skipped, which left old metadata in place, triggering an OSD activation failure as reported in [1]. [1] https://github.com/ceph/ceph-ansible/issues/2945#issuecomment-411720133 Fixes: b2e13865c2b899ce48148879da20323bd9bc988c Reported-by: Krisztian Lengyel Signed-off-by: Alexandru Avadanii Change-Id: Ie0f00cea2f9ff70a123b007a54e18122846456f3 --- infra-ansible.spec | 2 +- playbooks/destroy_data_and_partitions.yml | 2 +- roles/cleanup_disks/tasks/destroy_data_and_partitions.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/infra-ansible.spec b/infra-ansible.spec index 39e7f74..6661a11 100644 --- a/infra-ansible.spec +++ b/infra-ansible.spec @@ -15,7 +15,7 @@ Name: infra-ansible Version: %{_version} -Release: 7%{?dist} +Release: 8%{?dist} Summary: Contains ansible playbook and roles for Akraino rec blueprint License: %{_platform_licence} Source0: %{name}-%{version}.tar.gz diff --git a/playbooks/destroy_data_and_partitions.yml b/playbooks/destroy_data_and_partitions.yml index ba187cd..a9de015 100644 --- a/playbooks/destroy_data_and_partitions.yml +++ b/playbooks/destroy_data_and_partitions.yml @@ -15,7 +15,7 @@ # limitations under the License. - name: check whether disks exist and are block devices - stat: path={{ item }} + stat: path={{ item }} follow=true with_items: "{{ disks }}" register: disks_stat diff --git a/roles/cleanup_disks/tasks/destroy_data_and_partitions.yml b/roles/cleanup_disks/tasks/destroy_data_and_partitions.yml index 7e85904..b1125ff 100644 --- a/roles/cleanup_disks/tasks/destroy_data_and_partitions.yml +++ b/roles/cleanup_disks/tasks/destroy_data_and_partitions.yml @@ -15,7 +15,7 @@ # limitations under the License. - name: check whether disks exist and are block devices - stat: path={{ item }} + stat: path={{ item }} follow=true with_items: "{{ disks }}" register: disks_stat -- 2.16.6