Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Not a Bug
-
10.2.29, 10.1.43, 10.3.20, 10.4.11
Description
The postin script used by our RPM packages only starts and enables the systemd service if migrated-from-my.cnf-settings.conf does not exist. See this block of code:
if [ -f /usr/lib/systemd/system/mariadb.service -a -x /usr/bin/systemctl ]; then |
systemd_conf=/etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf |
if [ -x %{_bindir}/mariadb-service-convert -a ! -f "${systemd_conf}" ]; then |
# Either fresh install or upgrade non-systemd -> systemd |
mkdir -p /etc/systemd/system/mariadb.service.d |
%{_bindir}/mariadb-service-convert > "${systemd_conf}" |
# Make sure old possibly non-systemd instance is down |
if [ $1 = 2 ]; then |
SYSTEMCTL_SKIP_REDIRECT=1 %{_sysconfdir}/init.d/mysql stop >/dev/null 2>&1 || : |
systemctl start mariadb >/dev/null 2>&1 || : |
fi |
systemctl enable mariadb.service >/dev/null 2>&1 || : |
fi |
fi |
https://github.com/MariaDB/server/blob/mariadb-10.1.43/support-files/rpm/server-postin.sh#L1
I don't think systemctl start mariadb and systemctl enable mariadb should be dependent on whether migrated-from-my.cnf-settings.conf exists or not. I think these commands should be executed on all systemd systems during installations.
Attachments
Issue Links
- causes
-
MDEV-25240 minor upgrade does not perform server restart
-
- Closed
-
Activity
Field | Original Value | New Value |
---|---|---|
Labels | rpm systemd |
Description |
The {{postin}} script used by our RPM packages only starts and enables the systemd service if {{migrated-from-my.cnf-settings.conf}} does not exist. See this block of code:
{code} if [ -f /usr/lib/systemd/system/mariadb.service -a -x /usr/bin/systemctl ]; then systemd_conf=/etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf if [ -x %{_bindir}/mariadb-service-convert -a ! -f "${systemd_conf}" ]; then # Either fresh install or upgrade non-systemd -> systemd mkdir -p /etc/systemd/system/mariadb.service.d %{_bindir}/mariadb-service-convert > "${systemd_conf}" # Make sure old possibly non-systemd instance is down if [ $1 = 2 ]; then SYSTEMCTL_SKIP_REDIRECT=1 %{_sysconfdir}/init.d/mysql stop >/dev/null 2>&1 || : systemctl start mariadb >/dev/null 2>&1 || : fi systemctl enable mariadb.service >/dev/null 2>&1 || : fi fi {code} https://github.com/MariaDB/server/blob/mariadb-10.1.43/support-files/rpm/server-postin.sh#L1 I don't think {{systemctl start mariadb}} and {{systemctl enable mariadb}} should be dependent on whether {{migrated-from-my.cnf-settings.conf}} exists or not. I think these commands should be executed on all systemd systems during installations. |
The {{postin}} script used by our RPM packages only starts and enables the systemd service if {{migrated-from-my.cnf-settings.conf}} does not exist. See this block of code:
{code:bash} if [ -f /usr/lib/systemd/system/mariadb.service -a -x /usr/bin/systemctl ]; then systemd_conf=/etc/systemd/system/mariadb.service.d/migrated-from-my.cnf-settings.conf if [ -x %{_bindir}/mariadb-service-convert -a ! -f "${systemd_conf}" ]; then # Either fresh install or upgrade non-systemd -> systemd mkdir -p /etc/systemd/system/mariadb.service.d %{_bindir}/mariadb-service-convert > "${systemd_conf}" # Make sure old possibly non-systemd instance is down if [ $1 = 2 ]; then SYSTEMCTL_SKIP_REDIRECT=1 %{_sysconfdir}/init.d/mysql stop >/dev/null 2>&1 || : systemctl start mariadb >/dev/null 2>&1 || : fi systemctl enable mariadb.service >/dev/null 2>&1 || : fi fi {code} https://github.com/MariaDB/server/blob/mariadb-10.1.43/support-files/rpm/server-postin.sh#L1 I don't think {{systemctl start mariadb}} and {{systemctl enable mariadb}} should be dependent on whether {{migrated-from-my.cnf-settings.conf}} exists or not. I think these commands should be executed on all systemd systems during installations. |
Assignee | Sergei Golubchik [ serg ] | Oleksandr Byelkin [ sanja ] |
Fix Version/s | 10.1 [ 16100 ] |
Assignee | Oleksandr Byelkin [ sanja ] | Alexey Bychko [ abychko ] |
Link |
This issue causes |
Fix Version/s | N/A [ 14700 ] | |
Fix Version/s | 10.2 [ 14601 ] | |
Fix Version/s | 10.3 [ 22126 ] | |
Fix Version/s | 10.4 [ 22408 ] | |
Resolution | Not a Bug [ 6 ] | |
Status | Open [ 1 ] | Closed [ 6 ] |
Workflow | MariaDB v3 [ 102591 ] | MariaDB v4 [ 157131 ] |
Zendesk Related Tickets | 139023 |