From 8cfcb3f40439bc9096115bc7d426adb7b8d751ab Mon Sep 17 00:00:00 2001 From: Mark Goddard Date: Thu, 22 Feb 2018 14:24:26 +0000 Subject: [PATCH] Fix kolla-ceph tests The journal label should be generated using the OSD device path, not the journal's. --- ansible/roles/kolla-ceph/tests/test-bootstrapped-journal.yml | 4 ++-- ansible/roles/kolla-ceph/tests/test-data-journal.yml | 4 ++-- ansible/roles/kolla-ceph/tests/test-journal.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ansible/roles/kolla-ceph/tests/test-bootstrapped-journal.yml b/ansible/roles/kolla-ceph/tests/test-bootstrapped-journal.yml index a15a28e21..a32fd1771 100644 --- a/ansible/roles/kolla-ceph/tests/test-bootstrapped-journal.yml +++ b/ansible/roles/kolla-ceph/tests/test-bootstrapped-journal.yml @@ -42,7 +42,7 @@ state: present vars: part_label: "KOLLA_CEPH_OSD_BOOTSTRAP_{{ (osd_id | hash('md5'))[:9] }}_J" - osd_id: "{{ journal_tempfile.path | basename }}{{ ansible_hostname }}" + osd_id: "{{ osd_tempfile.path | basename }}{{ ansible_hostname }}" - block: - name: Import parted role @@ -99,7 +99,7 @@ Name of journal partition is not correct. Expected {{ expected }}, actual {{ disk_journal_info.partitions.0.name }}. vars: - expected: "{{ 'KOLLA_CEPH_OSD_BOOTSTRAP_' ~ (( journal_tempfile.path | basename ~ ansible_hostname) | hash('md5'))[:9] ~ '_J' }}" + expected: "{{ 'KOLLA_CEPH_OSD_BOOTSTRAP_' ~ (( osd_tempfile.path | basename ~ ansible_hostname) | hash('md5'))[:9] ~ '_J' }}" always: - name: Remove the fake OSD file diff --git a/ansible/roles/kolla-ceph/tests/test-data-journal.yml b/ansible/roles/kolla-ceph/tests/test-data-journal.yml index 4a8efecb1..6fdf489bf 100644 --- a/ansible/roles/kolla-ceph/tests/test-data-journal.yml +++ b/ansible/roles/kolla-ceph/tests/test-data-journal.yml @@ -41,7 +41,7 @@ state: present vars: part_label: "KOLLA_CEPH_DATA_{{ (osd_id | hash('md5'))[:9] }}_J" - osd_id: "{{ (journal_tempfile.path | basename ~ ansible_hostname) }}" + osd_id: "{{ (osd_tempfile.path | basename ~ ansible_hostname) }}" - block: - name: Import parted role @@ -98,7 +98,7 @@ Name of journal partition is not correct. Expected {{ expected }}, actual {{ disk_journal_info.partitions.0.name }}. vars: - expected: "{{ 'KOLLA_CEPH_DATA_' ~ ((journal_tempfile.path | basename ~ ansible_hostname)| hash('md5'))[:9] ~ '_J' }}" + expected: "{{ 'KOLLA_CEPH_DATA_' ~ ((osd_tempfile.path | basename ~ ansible_hostname)| hash('md5'))[:9] ~ '_J' }}" always: - name: Remove the fake OSD file diff --git a/ansible/roles/kolla-ceph/tests/test-journal.yml b/ansible/roles/kolla-ceph/tests/test-journal.yml index d66b3cbf6..850a805fc 100644 --- a/ansible/roles/kolla-ceph/tests/test-journal.yml +++ b/ansible/roles/kolla-ceph/tests/test-journal.yml @@ -74,7 +74,7 @@ Name of journal partition is not correct. Expected {{ expected }}, actual {{ disk_journal_info.partitions.0.name }}. vars: - expected: "{{ 'KOLLA_CEPH_OSD_BOOTSTRAP_' ~ ((journal_tempfile.path | basename ~ ansible_hostname)| hash('md5'))[:9] ~ '_J' }}" + expected: "{{ 'KOLLA_CEPH_OSD_BOOTSTRAP_' ~ ((osd_tempfile.path | basename ~ ansible_hostname)| hash('md5'))[:9] ~ '_J' }}" always: - name: Remove the fake OSD file