Skip to content

Commit a6c3f58

Browse files
Zuulopenstack-gerrit
authored andcommitted
Merge "On SUSE-based systems, check whether we have mariadb or mysql service"
2 parents 5920637 + bc2a88d commit a6c3f58

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

lib/databases/mysql

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,13 @@ MYSQL_DRIVER=${MYSQL_DRIVER:-PyMySQL}
1616
register_database mysql
1717

1818
MYSQL_SERVICE_NAME=mysql
19-
if is_suse || is_fedora && ! is_oraclelinux; then
19+
if is_fedora && ! is_oraclelinux; then
20+
MYSQL_SERVICE_NAME=mariadb
21+
elif is_suse && systemctl list-unit-files | grep -q 'mariadb\.service'; then
22+
# Older mariadb packages on SLES 12 provided mysql.service. The
23+
# newer ones on SLES 12 and 15 use mariadb.service; they also
24+
# provide a mysql.service symlink for backwards-compatibility, but
25+
# let's not rely on that.
2026
MYSQL_SERVICE_NAME=mariadb
2127
fi
2228

0 commit comments

Comments
 (0)