summaryrefslogtreecommitdiff
path: root/support-files
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-09-23 17:35:29 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-09-23 17:35:29 +0300
commit5a92ccbaea1bb3973e23846a741f5694a1e687bd (patch)
treeaafc504552502b48b79cadcb06b2b5c7eba4f374 /support-files
parentc997af7d1f432dfca922958453f0e2313287f1eb (diff)
parentc016ea660ede8b7ff75f8ca65f73e2958262263a (diff)
downloadmariadb-git-5a92ccbaea1bb3973e23846a741f5694a1e687bd.tar.gz
Merge 10.3 into 10.4
Disable MDEV-20576 assertions until MDEV-20595 has been fixed.
Diffstat (limited to 'support-files')
-rw-r--r--support-files/mariadb.service.in27
-rw-r--r--support-files/mariadb@.service.in17
-rw-r--r--support-files/use_galera_new_cluster.conf3
3 files changed, 37 insertions, 10 deletions
diff --git a/support-files/mariadb.service.in b/support-files/mariadb.service.in
index b6332ea5075..b1371fafa71 100644
--- a/support-files/mariadb.service.in
+++ b/support-files/mariadb.service.in
@@ -1,16 +1,22 @@
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades. If you want to customize, the
+# best way is to create a file "/etc/systemd/system/mariadb.service",
+# containing
+# .include /usr/lib/systemd/system/mariadb.service
+# ...make your changes here...
+# or create a file "/etc/systemd/system/mariadb.service.d/foo.conf",
+# which doesn't need to include ".include" call and which will be parsed
+# after the file mariadb.service itself is parsed.
#
-# /etc/systemd/system/mariadb.service
+# For more info about custom unit files, see systemd.unit(5) or
+# https://mariadb.com/kb/en/mariadb/systemd/
+#
+# Copyright notice:
#
# This file is free software; you can redistribute it and/or modify it
# under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation; either version 2.1 of the License, or
# (at your option) any later version.
-#
-# Thanks to:
-# Daniel Black
-# Erkan Yanar
-# David Strauss
-# and probably others
[Unit]
Description=MariaDB @VERSION@ database server
@@ -85,12 +91,15 @@ ExecStartPre=/bin/sh -c "[ ! -e @bindir@/galera_recovery ] && VAR= || \
# Use the [Service] section and Environment="MYSQLD_OPTS=...".
# This isn't a replacement for my.cnf.
# _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster
-ExecStart=@sbindir@/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION
-@SYSTEMD_EXECSTARTPOST@
+# Note: we set --basedir to prevent probes that might trigger SELinux alarms,
+# per bug https://bugzilla.redhat.com/show_bug.cgi?id=547485
+ExecStart=@sbindir@/mysqld $MYSQLD_OPTS --basedir=@prefix@ $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION
# Unset _WSREP_START_POSITION environment variable.
ExecStartPost=/bin/sh -c "systemctl unset-environment _WSREP_START_POSITION"
+@SYSTEMD_EXECSTARTPOST@
+
KillSignal=SIGTERM
# Don't want to see an automated SIGKILL ever
diff --git a/support-files/mariadb@.service.in b/support-files/mariadb@.service.in
index 326d8e52b3c..c66f5a776eb 100644
--- a/support-files/mariadb@.service.in
+++ b/support-files/mariadb@.service.in
@@ -6,6 +6,19 @@
# scripts are needed.
#
#
+# It's not recommended to modify this file in-place, because it will be
+# overwritten during package upgrades. If you want to customize, the
+# best way is to create a file "/etc/systemd/system/mariadb@.service",
+# containing
+# .include /usr/lib/systemd/system/mariadb@.service
+# ...make your changes here...
+# or create a file "/etc/systemd/system/mariadb@.service.d/foo.conf",
+# which doesn't need to include ".include" call and which will be parsed
+# after the file mariadb@.service itself is parsed.
+#
+# For more info about custom unit files, see systemd.unit(5) or
+# https://mariadb.com/kb/en/mariadb/systemd/
+#
# Copyright notice:
#
# This file is free software; you can redistribute it and/or modify it
@@ -131,7 +144,7 @@
# systemd.service(5)
[Unit]
-Description=MariaDB @VERSION@ database server (multi-instance)
+Description=MariaDB @VERSION@ database server (multi-instance %I)
Documentation=man:mysqld(8)
Documentation=https://mariadb.com/kb/en/library/systemd/
After=network.target
@@ -195,6 +208,8 @@ ExecStartPre=@scriptdir@/mysql_install_db $MYSQLD_MULTI_INSTANCE
# Note 1: Place $MYSQLD_OPTS at the very end for its options to take precedence.
ExecStart=@sbindir@/mysqld $MYSQLD_MULTI_INSTANCE $MYSQLD_OPTS
+@SYSTEMD_EXECSTARTPOST@
+
KillSignal=SIGTERM
# Don't want to see an automated SIGKILL ever
diff --git a/support-files/use_galera_new_cluster.conf b/support-files/use_galera_new_cluster.conf
index 90e0365ffd8..4d8ad253ce5 100644
--- a/support-files/use_galera_new_cluster.conf
+++ b/support-files/use_galera_new_cluster.conf
@@ -15,8 +15,11 @@ ConditionPathExists=
Type=oneshot
Restart=no
+ExecStartPre=
+
# Override the multi instance service for a bootstrap start instance
ExecStart=
ExecStart=/usr/bin/echo "Please use galera_new_cluster to start the mariadb service with --wsrep-new-cluster"
ExecStart=/usr/bin/false
+ExecStartPost=