[slurm-users] systemd unit ordering for dbd host

8 views
Skip to first unread message

Michael Gutteridge via slurm-users

unread,
Feb 5, 2026, 11:15:21 AMFeb 5
to Slurm User Community List

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

Ron Gould via slurm-users

unread,
Feb 5, 2026, 12:42:47 PMFeb 5
to slurm...@lists.schedmd.com
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...@lists.schedmd.com
To unsubscribe send an email to slurm-us...@lists.schedmd.com

Michael Gutteridge via slurm-users

unread,
Feb 5, 2026, 1:41:14 PMFeb 5
to slurm...@lists.schedmd.com
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


Christopher Samuel via slurm-users

unread,
Feb 5, 2026, 9:02:23 PMFeb 5
to slurm...@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
--
Chris Samuel : http://www.csamuel.org/ : Philadelphia, PA, USA
Reply all
Reply to author
Forward
0 new messages