]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
ceph-volume: fail fast during tests
authorAndrew Schoen <aschoen@redhat.com>
Mon, 24 Sep 2018 21:41:37 +0000 (16:41 -0500)
committerAndrew Schoen <aschoen@redhat.com>
Mon, 24 Sep 2018 21:41:37 +0000 (16:41 -0500)
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 <aschoen@redhat.com>
src/ceph-volume/ceph_volume/tests/functional/playbooks/deploy.yml

index ff3954b217850b4d427f94c4bf75739831e51622..7ebdf774ec9c16e7542f45f0a96144f2876e55b2 100644 (file)
   - 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
 
 - hosts: mgrs
   gather_facts: false
+  any_errors_fatal: true
   become: True
   roles:
     - role: ceph-defaults
 
 - 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