Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1520577 - systemd unit file for mariadb server should include alias for mysqld.service
Summary: systemd unit file for mariadb server should include alias for mysqld.service
Keywords:
Status: CLOSED CANTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: mariadb
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Michal Schorm
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks: 1520905
TreeView+ depends on / blocked
 
Reported: 2017-12-04 18:38 UTC by Garri
Modified: 2018-05-14 09:29 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 1520905 (view as bug list)
Environment:
Last Closed: 2018-05-14 09:29:49 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Garri 2017-12-04 18:38:40 UTC
Dear Red Hat developers,

As MariaDB is positioned as drop-in replacement for MySQL community server, the distributed systemd unit file for mariadb-server should include alias for mysqld.service. It would allow third party units to depend on single MySQL service and ignore the details of specific MySQL service implementation.

Furthermore, upstream MariaDB project distributes systemd unit file with two aliases: mysql.service and mysqld.service. [1] 

Thanks.


[1] https://mariadb.com/kb/en/library/systemd/

Comment 2 Michal Schorm 2017-12-05 12:48:17 UTC
Hello,

That looks like a good idea
It will make it more convenient and as a bonus we will close up with upstream.

This issue doesn't seem to hurry, so I'll start this change in Fedora first.

Comment 3 Honza Horak 2017-12-05 15:43:47 UTC
I don't think this is a good idea -- we deliberately stopped shipping mysqld name of the service when we worked on RHEL-7 package, to not be mistaken with MySQL. Also, upstream ships mariadb.service now for RHEL-7 and Fedora (at least for version 10.2).

Comment 4 Garri 2017-12-05 18:24:54 UTC
(In reply to Honza Horak from comment #3)
> I don't think this is a good idea -- we deliberately stopped shipping mysqld
> name of the service when we worked on RHEL-7 package, to not be mistaken
> with MySQL.

If possible, please specify what issues may arise by installing extra alias (mysqld.service) for the service (mariadb.service). Thanks.


> Also, upstream ships mariadb.service now for RHEL-7 and Fedora
> (at least for version 10.2).

The report is not about unit file name, but about additional aliases. For example, the upstream version MariaDB-10.2.11-centos7-x86_64-server.rpm installs following aliases:

$ grep -A 3 mariadb.service 
[Install]
WantedBy=multi-user.target
Alias=mysql.service
Alias=mysqld.service

Comment 5 Michal Schorm 2017-12-11 10:35:13 UTC
The fix was added into Fedora Rawhide, mariadb-10.2.11-1.fc28 release.

Once this bugzilla gets approved by Product Management (and few others), it will find its way to the RHEL.

--

A date of next MariaDB update in RHEL is not yet known.
I consider this an easy fix on your side too, however if you are really in hurry and you would like to see this feature in RHEL sooner, you should consider creating a customer ticket.

Comment 7 Michal Schorm 2018-01-29 10:59:21 UTC
I'm afraid I found a blocker.

https://jira.mariadb.org/browse/MDEV-14944

Wihtout systemd rebase to like - today's version - or backporting the patch atleast it won't ever work properly and I'd consider that as no-go, as I won't like to ship broken software intentionaly.

What's your opinion, Honza?

Comment 8 Honza Horak 2018-02-19 07:42:38 UTC
I think we may just recommend to override system's services by adding drop-in files into /etc/systemd/... as recommended in:

https://jira.mariadb.org/browse/MDEV-14944?focusedCommentId=106454&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-106454

...which mentions: "Distro's installing links in /etc/systemd/system/ seems the wrong place to do it. Seems like this was meant to be user configurable space only."

Garri, does this solution fix your use case?

Comment 9 Garri 2018-02-20 19:10:13 UTC
(In reply to Honza Horak from comment #8)
> Garri, does this solution fix your use case?

Yes, it fixes my use case from end user side.

I just looked for a way to supply universal unit files by software developers not relying on specific MySQL implementation.

Comment 10 Michal Schorm 2018-05-14 09:29:49 UTC
Summary:
 * Can't be fixed in RHEL without systemd v237 or later.
 * The systemd v>=237 is present in Fedora 28+ and the feature was added there.


Thank you for the report.
This feature is likely to be seen in new RH products based on systemd v>=237.


Note You need to log in before you can comment on or make changes to this bug.