Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 572788

Summary: dev-db/mariadb & dev-db/mysql-init-scripts: install conflicting systemd units
Product: Gentoo Linux Reporter: Michał Górny <mgorny>
Component: Current packagesAssignee: Gentoo Linux MySQL bugs team <mysql-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: systemd
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---

Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-01-24 18:09:47 UTC
# qlist mariadb | grep systemd
/usr/lib/systemd/system/mariadb@.service
/usr/lib/systemd/system/mariadb.service
/usr/lib/systemd/system/mariadb@bootstrap.service.d/use_galera_new_cluster.conf
/usr/include/mysql/private/my_systemd.h
/usr/share/mysql/systemd/mariadb@.service
/usr/share/mysql/systemd/mariadb.service
/usr/share/mysql/systemd/use_galera_new_cluster.conf

(also note duplicate install)

# qlist mysql-init-scripts | grep systemd
/usr/lib/systemd/system/mysqld@.service
/usr/lib/systemd/system/mysqld.service


So I end up with at least two conflicting scripts to start mariadb. Both lack Conflicts= entry, so I can end up trying to start both ;-P.
Comment 1 Brian Evans (RETIRED) gentoo-dev 2016-01-24 19:47:21 UTC
MariaDB now includes notify support so that script should be preferred over the mysql-init-scripts one.

I'll look into the Conflicts= but know little about systemd.  Perhaps I'll just modify mysql-init-scripts with it or do I need to do both?
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2016-01-24 20:24:36 UTC
Adding it to one of them should be enough.
Comment 3 Brian Evans (RETIRED) gentoo-dev 2016-01-30 02:36:30 UTC
Fixed with dev-db/mysql-init-scripts-2.1_rc1

The instanced version must be done by the user as there is no universal way to Conflicts all iterations of an instanced service.

Those using mariadb should prefer mariadb.service to have better notification support and not some script checking startup status.  This is particularly nice for Galera cluster replication.