From 1a8428577950e788d6286113ed9aed1eed206ad1 Mon Sep 17 00:00:00 2001 From: Arx Cruz Date: Mon, 11 Nov 2013 10:17:00 -0200 Subject: [PATCH] Fedora/RHEL DB updates for devstack_gate.sh If you're using Fedora or Red Hat in your jenkins server, It will always fail when check the database, because on Fedora, the path for postgres and mysql directories are different from Ubuntu. This will check which distro are being used and check the right path. Change-Id: Ib1df1c9be92ce5a506caa5b36b69dfab32d9a99f --- devstack-vm-gate.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/devstack-vm-gate.sh b/devstack-vm-gate.sh index 0765995f..c253915f 100755 --- a/devstack-vm-gate.sh +++ b/devstack-vm-gate.sh @@ -232,13 +232,21 @@ else sudo -H -u stack ./stack.sh # provide a check that the right db was running + # the path are different for fedora and red hat. + if [ -f /usr/bin/yum ]; then + POSTGRES_LOG_PATH="-d /var/lib/pgsql" + MYSQL_LOG_PATH="-f /var/lib/mysqld.log" + else + POSTGRES_LOG_PATH="-d /var/log/postgresql" + MYSQL_LOG_PATH="-d /var/log/mysql" + fi if [ "$DEVSTACK_GATE_POSTGRES" -eq "1" ]; then - if [ ! -d /var/log/postgresql ]; then + if [ ! $POSTGRES_LOG_PATH ]; then echo "Postgresql should have been used, but there are no logs" exit 1 fi else - if [ ! -d /var/log/mysql ]; then + if [ ! $MYSQL_LOG_PATH ]; then echo "Mysql should have been used, but there are no logs" exit 1 fi