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
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user