aboutsummaryrefslogtreecommitdiff
path: root/tests/get_logs.sh
diff options
context:
space:
mode:
authorMichal Nasiadka <mnasiadka@gmail.com>2023-01-23 14:23:33 +0100
committerMichal Nasiadka <mnasiadka@gmail.com>2023-02-16 15:40:32 +0000
commitf8e1b8f47f6f0b1d342f8b23aa993a59c04e22b5 (patch)
tree9e4b6d4e737663287b196fc484651be119cc1221 /tests/get_logs.sh
parent59002ded8609d3d9951d0205dbcaad5a8ef17f2d (diff)
downloadkolla-ansible-f8e1b8f47f6f0b1d342f8b23aa993a59c04e22b5.tar.gz
kolla-ansible-f8e1b8f47f6f0b1d342f8b23aa993a59c04e22b5.zip
CI: cephadm: copy cephadm log
Change-Id: I186651e2ad05a76a606444ee673b73e171456312
Diffstat (limited to 'tests/get_logs.sh')
-rw-r--r--tests/get_logs.sh13
1 files changed, 8 insertions, 5 deletions
diff --git a/tests/get_logs.sh b/tests/get_logs.sh
index 319c41991..0cb270073 100644
--- a/tests/get_logs.sh
+++ b/tests/get_logs.sh
@@ -88,11 +88,14 @@ copy_logs() {
dbus-send --system --print-reply --dest=org.freedesktop.DBus /org/freedesktop/DBus org.freedesktop.DBus.ListNames > ${LOG_DIR}/system_logs/dbus-services.txt
# cephadm related logs
- mkdir -p ${LOG_DIR}/ceph
- sudo cp /etc/ceph/ceph.conf ${LOG_DIR}/ceph
- sudo cp /var/run/ceph/*/cluster.yml ${LOG_DIR}/ceph/cluster.yml
- sudo cephadm shell -- ceph --connect-timeout 5 -s > ${LOG_DIR}/ceph/ceph_s.txt
- sudo cephadm shell -- ceph --connect-timeout 5 osd tree > ${LOG_DIR}/ceph/ceph_osd_tree.txt
+ if [ `command -v cephadm` ]; then
+ mkdir -p ${LOG_DIR}/ceph
+ sudo cp /etc/ceph/ceph.conf ${LOG_DIR}/ceph
+ sudo cp /var/run/ceph/*/cluster.yml ${LOG_DIR}/ceph/cluster.yml
+ sudo cp /var/log/ceph/cephadm.log* ${LOG_DIR}/ceph/
+ sudo cephadm shell -- ceph --connect-timeout 5 -s > ${LOG_DIR}/ceph/ceph_s.txt
+ sudo cephadm shell -- ceph --connect-timeout 5 osd tree > ${LOG_DIR}/ceph/ceph_osd_tree.txt
+ fi
# bifrost related logs
if [[ $(docker ps --filter name=bifrost_deploy --format "{{.Names}}") ]]; then