FS#66778 - [389-ds-base] fails to start after reboot due to lockfile error

Attached to Project: Arch Linux
Opened by Tolga Cakir (tolga9009) - Monday, 25 May 2020, 17:18 GMT
Last edited by freswa (frederik) - Tuesday, 26 May 2020, 01:21 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
After installing 389-ds-base and creating an instance using "dscreate interactive", dirsrv@ldap.service enables, runs and works fine. However, after a reboot, dirsrv@ldap.service fails to start due to the following error:
ns-slapd[161]: Error - Problem accessing the lockfile /var/lock/dirsrv/slapd-ldap/lock

According to upstream, this is caused by /var/lock/ beeing symlinked to /run/lock and thus beeing deleted upon reboot.

Output of systemd-tmpfiles-setup:
systemd[1]: Starting Create Volatile Files and Directories...
systemd-tmpfiles[21]: /usr/lib/tmpfiles.d/dirsrv-ldap.conf:1: Line references path below legacy directory /var/run/, updating /var/run/dirsrv → /run/dirsrv; please update the tmpfiles.d/ drop-in file accordingly.
systemd-tmpfiles[21]: Failed to validate path /var/lock/dirsrv: No such file or directory
systemd-tmpfiles[21]: Failed to validate path /var/lock/dirsrv/slapd-ldap: No such file or directory
systemd[1]: Finished Create Volatile Files and Directories.


Additional info:
* 389-ds-base 1.4.4.2-3
* dirsrv@ldap.service log has been attached
* there are multiple bug reports at Fedora / RedHat, some of them 8+ years ago. Most related and recent seems to be: https://pagure.io/389-ds-base/issue/49854. I'm not sure, if this is an upstream or packaging issue.


Steps to reproduce:
1. "pacman -S 389-ds-base"
2. "dscreate interactive"
3. dirsrv@.service runs fine
4. Reboot
5. dirsrv@.service fails to start
This task depends upon

Closed by  freswa (frederik)
Tuesday, 26 May 2020, 01:21 GMT
Reason for closing:  Fixed
Additional comments about closing:  1.4.4.2-5
Comment by Tolga Cakir (tolga9009) - Monday, 25 May 2020, 17:37 GMT
Adding the following line to 389-ds-base.tmpfiles (https://git.archlinux.org/svntogit/packages.git/tree/trunk/389-ds-base.tmpfiles?h=packages/389-ds-base) fixes the issue:

d /run/lock/dirsrv/ 0770 dirsrv dirsrv -

As a temporary workaround, I have done this in /etc/tmpfiles.d/.

Cheers,
Tolga
Comment by Sven-Hendrik Haase (Svenstaro) - Tuesday, 26 May 2020, 00:37 GMT
Thanks for the workaround. I actually consider the workaround a proper fix unless I'm missing anything. Check rel -5.
Comment by Tolga Cakir (tolga9009) - Tuesday, 26 May 2020, 01:20 GMT
Thank you, it works now!

Loading...