We have a host dedicated to slurmdbd and mysql (Ubuntu 24.04, Slurm 24.11.4, mysql 8.0.45). A couple days ago unattended-upgrades upgraded the MySQL package which triggered a restart of mysql.service which looks to have caused some errors in slurmdbd. I don't think those errors were permanent, everything looks to be running as per usual currently.
Enough backstory- the question is should we configure the slurmdbd systemd unit to stop slurmdbd before mysql is stopped? Currently there are minimal dependencies built into the unit:
After=network-online.target remote-fs.target munge.service mysql.service mysqld.service mariadb.service sssd.service Wants=network-online.target
But nothing to tell systemd to take down slurmdbd when the mysql unit is stopped. Is there *any* reason we'd want slurmdbd running if mysql wasn't? Are there any problems I'd cause by creating such a dependency?
I do plan to exclude mysql from future unattended upgrading, but I'd also like to keep our systemd units sensible.
Thanks - Michael
If you run `systemctl show ${YourDbServiceName}` , do you see "slurmdbd.service" in the "Before" definition? I inherited my Cluster, so IDK if the previous admin modified that.
``` Before=slurmdbd.service multi-user.target shutdown.target After=network.target systemd-journald.socket var-tmp.mount tmp.mount syslog.target system.slice -.mount basic.target ```
Hi
I see it in mine as well:
Before=multi-user.target slurmdbd.service shutdown.target
it's not defined in either unit so I think it's being inserted by systemd as part of the "After" requirement in the slurmdbd unit. From my (limited) grasp of systemd, I don't think the "Before" ensures that slurmdbd would be stopped if mysql stops, just that it's start command is issued before slurmdbd's start command
-- Michael
On Thu, Feb 5, 2026 at 9:43 AM Ron Gould via slurm-users < slurm-users@lists.schedmd.com> wrote:
If you run `systemctl show ${YourDbServiceName}` , do you see "slurmdbd.service" in the "Before" definition? I inherited my Cluster, so IDK if the previous admin modified that.
Before=slurmdbd.service multi-user.target shutdown.target After=network.target systemd-journald.socket var-tmp.mount tmp.mount syslog.target system.slice -.mount basic.target-- slurm-users mailing list -- slurm-users@lists.schedmd.com To unsubscribe send an email to slurm-users-leave@lists.schedmd.com
On 2/5/26 11:12 am, Michael Gutteridge via slurm-users wrote:
We have a host dedicated to slurmdbd and mysql (Ubuntu 24.04, Slurm 24.11.4, mysql 8.0.45). A couple days ago unattended-upgrades upgraded the MySQL package which triggered a restart of mysql.service which looks to have caused some errors in slurmdbd. I don't think those errors were permanent, everything looks to be running as per usual currently.
You can try running "sacctmgr show runaway" to see if there are job updates that are missing from slurmdbd - but be aware that can trigger long running transactions if there are issues and you have a large database - and those will happen if it tells you there are issues and you say "n" to making changes - it just needs to roll them back after.
All the best, Chris