PIDFile specified in systemd unit file but pid-file not in my.cnf

Bug #1872195 reported by Rowan Wookey
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-8.0 (Ubuntu)
Fix Released
Low
Lena Voytek

Bug Description

PIDFile=/run/mysqld/mysqld.pid

Is in /lib/systemd/system/mysql.service

However pid-file=/run/mysqld/mysqld.pid is missing from any file in /etc/mysql

Suggest either removing PIDFile from mysql.service or adding pid-file=/run/mysqld/mysqld.pid to /etc/mysql/mysql.conf.d/mysqld.cnf

This is effecting Focal Beta.

Related branches

Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

I've confirmed that installing mysql-server on Focal, the PIDFile as specified in /lib/systemd/system/mysql.service is not created, although the containing directory /run/mysqld is created. So this should be fixed, but I don't currently see any reason to prioritise it given that Focal is currently in feature freeze.

Please could you explain how this bug affects you, so that we can decide if this needs fixing in Focal or if it can wait until the next release?

Changed in mysql-8.0 (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Revision history for this message
Rowan Wookey (rwky) wrote :

In my case I was using monit to monitor the process via the pidfile but it wasn't created so I had to edit my.cnf

Correct me if I'm wrong but focal is in beta and beta is for finding and fixing bugs, so shouldn't this be fixed?

It's not a critical issue but it's one line in a conf file so it's pretty trivial.

Revision history for this message
Robie Basak (racb) wrote :

Thanks - I think I understand your situation now.

Given that systemd doesn't need the PIDFile in this case, I think I favour removing it from the service file. Users who want to monitor for a pidfile rather than the systemd service could edit my.cnf as you have done.

It is a one line change, but might introduce other regressions, so I'm reluctant to make this change now in Focal unless it is bundled with some other necessary change, given that as far as I understand it won't make any difference to users whether this change lands in Focal or not. It's a bunch of work to prepare, test and land an update. Either way you'd still need to edit my.cnf for your use case.

Revision history for this message
Rowan Wookey (rwky) wrote :

I'm fine with removing the PIDFile that'd save some confusion. If you slate it for fixing in 20.10 I'm happy to test before 20.10 reaches feature freeze.

Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
I'm coming by trying to close or revive cases that were dormant for too long.
This clearly is one of them.

The change is still the same, I assume it was just falling through the cracks.
Since the change is easy I've filed [1] to make it easier and more likely to be picked up.

[1]: https://salsa.debian.org/mariadb-team/mysql/-/merge_requests/63

Revision history for this message
Lena Voytek (lvoytek) wrote :

Now that its been merged in debian, I'll get this into kinetic soon as I work to get the two back in sync

Changed in mysql-8.0 (Ubuntu):
assignee: nobody → Lena Voytek (lvoytek)
status: Triaged → In Progress
Lena Voytek (lvoytek)
Changed in mysql-8.0 (Ubuntu):
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.