RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
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.