Skip to content

Commit

Permalink
Issue 5864 - Server fails to start after reboot because it's unable t…
Browse files Browse the repository at this point in the history
…o access nsslapd-rundir

Bug Description:
Sometimes after reboot dirsrv service fails to start:

EMERG - main - Unable to access nsslapd-rundir: No such file or directory
EMERG - main - Ensure that user "dirsrv" has read and write permissions on /run/dirsrv
EMERG - main - Shutting down.

We rely on systemd-tmpfiles for /run/dirsrv creation. But dirsrv service
doesn't explicitly wait for systemd-tmpfiles-setup.service to start.
This creates a race condition.

Fix Description:
dirsrv service should start only after systemd-tmpfiles-setup.service is finished,
add it as a dependency via `After=` and `Wants=`.

Fixes: #5864

Reviwed-by: @Firstyear (Thanks!)
  • Loading branch information
vashirov committed Jul 27, 2023
1 parent d2fe1b1 commit b6d160d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wrappers/systemd.template.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
[Unit]
Description=@capbrand@ Directory Server %i.
PartOf=@systemdgroupname@
After=chronyd.service ntpd.service network-online.target
After=chronyd.service ntpd.service network-online.target systemd-tmpfiles-setup.service
Before=radiusd.service
Wants=systemd-tmpfiles-setup.service

[Service]
Type=notify
Expand Down

0 comments on commit b6d160d

Please sign in to comment.