]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-build.git/commitdiff
ceph-volume-scenario: collect ceph-volume logs on failure
authorAndrew Schoen <aschoen@redhat.com>
Thu, 8 Mar 2018 16:08:39 +0000 (10:08 -0600)
committerAndrew Schoen <aschoen@redhat.com>
Thu, 8 Mar 2018 16:57:42 +0000 (10:57 -0600)
Signed-off-by: Andrew Schoen <aschoen@redhat.com>
ceph-volume-scenario/build/teardown
ceph-volume-scenario/config/definitions/ceph-volume-scenario.yml

index 9650719d75a12daa1e6298522a7554b65851d1d8..450e750e98a2f1529fc85e81659d124fb830a727 100644 (file)
@@ -7,8 +7,18 @@ cd $WORKSPACE/src/ceph-volume/ceph_volume/tests/functional
 
 scenarios=$(find . | grep Vagrantfile | xargs dirname)
 
+mkdir -p $WORKSPACE/logs
+
+pkgs=( "ansible" )
+install_python_packages "pkgs[@]"
+
 for scenario in $scenarios; do
     cd $scenario
+    if [ -f "./vagrant_ssh_config" ]; then
+        export ANSIBLE_SSH_ARGS='-F ./vagrant_ssh_config'
+        $VENV/ansible -i hosts -b -m fetch -a "src=/var/log/ceph/ceph-volume.log dest=$WORKSPACE/logs/ceph-volume.log flat=yes fail_on_missing=no" osds
+        $VENV/ansible -i hosts -b -m fetch -a "src=/var/log/ceph/ceph-volume-systemd.log dest=$WORKSPACE/logs/ceph-volume-systemd.log flat=yes fail_on_missing=no" osds
+    fi
     vagrant destroy -f
     cd -
 done
index fb467a579d93ca8e583e93b46fe8a18b451c97e8..3017818c5df892d73cdccd5639ad5398beca649f 100644 (file)
           script-only-if-succeeded: False
           script-only-if-failed: True
           builders:
-            - shell: !include-raw ../../build/teardown
+            - shell:
+                !include-raw:
+                  - ../../../scripts/build_utils.sh
+                  - ../../build/teardown
+
+      - archive:
+          artifacts: 'logs/**'
+          allow-empty: false
+          latest-only: false