From eed244473d11a153cd7a37e0e9bfaf804a20db89 Mon Sep 17 00:00:00 2001 From: Andrew Schoen Date: Mon, 24 Sep 2018 16:41:37 -0500 Subject: [PATCH] ceph-volume: fail fast during tests This also rsyncs the ceph-volume code to the testing vms before a ceph.conf is generated because ceph-volume is needed now for this to figure out the number of osds when you're using 'lvm batch'. Signed-off-by: Andrew Schoen --- .../tests/functional/playbooks/deploy.yml | 45 ++++++++++++++----- 1 file changed, 34 insertions(+), 11 deletions(-) diff --git a/src/ceph-volume/ceph_volume/tests/functional/playbooks/deploy.yml b/src/ceph-volume/ceph_volume/tests/functional/playbooks/deploy.yml index ff3954b217850..7ebdf774ec9c1 100644 --- a/src/ceph-volume/ceph_volume/tests/functional/playbooks/deploy.yml +++ b/src/ceph-volume/ceph_volume/tests/functional/playbooks/deploy.yml @@ -73,15 +73,36 @@ - mgrs gather_facts: false become: True + any_errors_fatal: true roles: - role: ceph-defaults tags: ['ceph_update_config'] - role: ceph-common - - role: ceph-config - tags: ['ceph_update_config'] + tasks: + - name: rsync ceph-volume to test nodes on centos + synchronize: + src: "{{ toxinidir}}/../../../../ceph_volume" + dest: "/usr/lib/python2.7/site-packages" + use_ssh_args: true + when: + - ansible_os_family == "RedHat" + - inventory_hostname in groups.get(osd_group_name, []) + + - name: rsync ceph-volume to test nodes on ubuntu + synchronize: + src: "{{ toxinidir}}/../../../../ceph_volume" + dest: "/usr/lib/python2.7/dist-packages" + use_ssh_args: true + when: + - ansible_os_family == "Debian" + - inventory_hostname in groups.get(osd_group_name, []) + + - import_role: + name: ceph-config - hosts: mons gather_facts: false + any_errors_fatal: true become: True roles: - role: ceph-defaults @@ -90,6 +111,7 @@ - hosts: mgrs gather_facts: false + any_errors_fatal: true become: True roles: - role: ceph-defaults @@ -98,26 +120,27 @@ - hosts: osds gather_facts: false + any_errors_fatal: true become: True + roles: + - role: ceph-defaults + - role: ceph-common tasks: - name: rsync ceph-volume to test nodes on centos synchronize: src: "{{ toxinidir}}/../../../../ceph_volume" dest: "/usr/lib/python2.7/site-packages" use_ssh_args: true - when: ansible_os_family == "RedHat" + when: + - ansible_os_family == "RedHat" - name: rsync ceph-volume to test nodes on ubuntu synchronize: src: "{{ toxinidir}}/../../../../ceph_volume" dest: "/usr/lib/python2.7/dist-packages" use_ssh_args: true - when: ansible_os_family == "Debian" + when: + - ansible_os_family == "Debian" -- hosts: osds - gather_facts: false - become: True - roles: - - role: ceph-defaults - - role: ceph-common - - role: ceph-osd + - import_role: + name: ceph-osd -- 2.39.5