aboutsummaryrefslogtreecommitdiff
path: root/tests/get_logs.sh
diff options
context:
space:
mode:
authorMichal Nasiadka <mnasiadka@gmail.com>2019-08-14 09:13:29 +0000
committerMichal Nasiadka <mnasiadka@gmail.com>2020-01-24 22:37:03 +0100
commitd8c15ad4e8a2235396a0f40d2fe53112d23495c5 (patch)
tree8620167ccb73ec6e4e39eb6f1f30e7159af1f812 /tests/get_logs.sh
parentcf6e157b79659f6985af8e5210f578667ba46c2f (diff)
downloadkolla-ansible-d8c15ad4e8a2235396a0f40d2fe53112d23495c5.tar.gz
kolla-ansible-d8c15ad4e8a2235396a0f40d2fe53112d23495c5.zip
CI: Add Ceph-Ansible jobs
* Adding zuul centos-source/ubuntu-source ceph-ansible jobs * Jobs will deploy all Ceph integrated OpenStack components, i.e. cinder, glance, nova * Will utilize core openstack testing script Depends-On: https://review.opendev.org/685032 Depends-On: https://review.opendev.org/698301 Implements: blueprint ceph-ansible Change-Id: I233082b46785f74014177f579aeac887a25b2ae2
Diffstat (limited to 'tests/get_logs.sh')
-rw-r--r--tests/get_logs.sh15
1 files changed, 11 insertions, 4 deletions
diff --git a/tests/get_logs.sh b/tests/get_logs.sh
index b6e450db4..58a5e8b39 100644
--- a/tests/get_logs.sh
+++ b/tests/get_logs.sh
@@ -78,13 +78,20 @@ copy_logs() {
(docker info && docker images && docker ps -a && docker network ls && docker inspect $(docker ps -aq)) > ${LOG_DIR}/system_logs/docker-info.txt
# ceph related logs
- if [[ $(docker ps --filter name=ceph_mon --format "{{.Names}}") ]]; then
- docker exec ceph_mon ceph --connect-timeout 5 -s > ${LOG_DIR}/kolla/ceph/ceph_s.txt
+ # NOTE(mnasiadka): regex to match both ceph_mon and ceph-mon-$hostname
+ for container in $(docker ps --filter name=ceph.\?mon --format "{{.Names}}"); do
+ if [ $container == "ceph_mon" ]; then
+ CEPH_LOG_DIR="${LOG_DIR}/kolla/ceph"
+ else
+ CEPH_LOG_DIR="${LOG_DIR}/ceph"
+ mkdir -p ${CEPH_LOG_DIR}
+ fi
+ docker exec ${container} ceph --connect-timeout 5 -s > ${CEPH_LOG_DIR}/ceph_s.txt
# NOTE(yoctozepto): osd df removed on purpose to avoid CI POST_FAILURE due to a possible hang:
# as of ceph mimic it hangs when MON is operational but MGR not
# its usefulness is mediocre and having POST_FAILUREs is bad
- docker exec ceph_mon ceph --connect-timeout 5 osd tree > ${LOG_DIR}/kolla/ceph/ceph_osd_tree.txt
- fi
+ docker exec ${container} ceph --connect-timeout 5 osd tree > ${CEPH_LOG_DIR}/ceph_osd_tree.txt
+ done
# bifrost related logs
if [[ $(docker ps --filter name=bifrost_deploy --format "{{.Names}}") ]]; then