syslog-ng: late start on boot prevents dnsmasq from starting
Nobody has claimed this yet.
- Dominant language
- Makefile
- Stars
- 4.6k
- Forks
- 4k
- Avg merge
- 3d 12h
- Merged PRs (30d)
- 134
Description
Maintainer: @BKPepe
Environment: armv7l, InHand Networks VG710, OpenWrt 22.03.0-rc4
Description:
/etc/rc.d/S19dnsmasq tries to mount /dev/log in jail but fails because /dev/log doesn't exist yet because /etc/rc.d/S50syslog-ng hasn't been run yet. The end result is that dnsmasq is not running:
~# ps aux | grep '[d]nsmasq'
~#
The issue can be easily reproduced even without syslog-ng installed:
~# mv /dev/log /dev/log.bak
~# /sbin/ujail -t 5 -n test-ujail -l -- /bin/echo hi; echo $?
jail: stat(/dev/log) failed: No such file or directory
jail: mount_all() failed
jail: failed to build jail fs
jail: jail (9738) exited with exit: 1
1
I wonder if other users of OpenWRT also have this problem? I haven't seen any bug reports but it looks quite serious so I'm wondering. Would it be a bad idea to start syslog-ng earlier, S12 as with logd should be ok, in my test even S18 (so one less that S19 for dnsmasq) was enough?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with /etc/rc.d/S19dnsmasq and /etc/rc.d/S50syslog-ng, then reproduce the failure using the provided /sbin/ujail command after moving /dev/log. Check the boot ordering and verify that dnsmasq starts successfully when /dev/log is available before its jail is built.
Written by the indexing model from the issue text.
Assessment
- Domain
- operating-systems
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100