Commit 3ac0721a authored by Nirbhay Choubey's avatar Nirbhay Choubey

MDEV-10507: MariaDB 10.1 + wsrep fails to start under systemd post-reboot

/var/run/mysqld must be created before wsrep recovery.
parent 294961cc
...@@ -59,6 +59,8 @@ ProtectHome=true ...@@ -59,6 +59,8 @@ ProtectHome=true
# Execute pre and post scripts as root, otherwise it does it as User= # Execute pre and post scripts as root, otherwise it does it as User=
PermissionsStartOnly=true PermissionsStartOnly=true
@SYSTEMD_EXECSTARTPRE@
# Perform automatic wsrep recovery. When server is started without wsrep, # Perform automatic wsrep recovery. When server is started without wsrep,
# galera_recovery simply returns an empty string. In any case, however, # galera_recovery simply returns an empty string. In any case, however,
# the script is not expected to return with a non-zero status. # the script is not expected to return with a non-zero status.
...@@ -77,7 +79,6 @@ ExecStartPre=/bin/sh -c "[ ! -e /usr/bin/galera_recovery ] && VAR= || \ ...@@ -77,7 +79,6 @@ ExecStartPre=/bin/sh -c "[ ! -e /usr/bin/galera_recovery ] && VAR= || \
# Use the [service] section and Environment="MYSQLD_OPTS=...". # Use the [service] section and Environment="MYSQLD_OPTS=...".
# This isn't a replacement for my.cnf. # This isn't a replacement for my.cnf.
# _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster # _WSREP_NEW_CLUSTER is for the exclusive use of the script galera_new_cluster
@SYSTEMD_EXECSTARTPRE@
ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION ExecStart=/usr/sbin/mysqld $MYSQLD_OPTS $_WSREP_NEW_CLUSTER $_WSREP_START_POSITION
@SYSTEMD_EXECSTARTPOST@ @SYSTEMD_EXECSTARTPOST@
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment