Bug 232397 - ctld does not depend on sysctl.conf being evaluated
Summary: ctld does not depend on sysctl.conf being evaluated
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 11.2-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-18 17:47 UTC by Mahmoud Al-Qudsi
Modified: 2021-01-13 05:28 UTC (History)
1 user (show)

See Also:


Attachments
Add dependancy on NETWORKING (316 bytes, patch)
2021-01-01 21:09 UTC, Jeremy Faulkner
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Mahmoud Al-Qudsi 2018-10-18 17:47:55 UTC
The ctld service does not wait for sysctl.conf to be evaluated before running. 

Unfortunately, the drivers for some popular cards require sysctl configuration in sysctl.conf (not possible in loader.conf) to bring them up in the correct mode (e.g. mlx4/mlx4en to set the card in ip instead of ib mode), meaning that when ctld starts up, it fails immediately because it can't listen on the requested address.

I'm unsure how to modify /etc/rc.d/ctld to enact a dependency on sysctl.conf's evaluation; for my purposes I ended up hacking the ctld service itself to unconditionally execute the sysctls I need set prior to actually processing the service start command.
Comment 1 Jeremy Faulkner 2021-01-01 21:09:36 UTC
Created attachment 221173 [details]
Add dependancy on NETWORKING

If the ctl.conf specifies an IP address then ctld won't start. Adding a requirement on NETWORKING will solve my issue, and your example. What other sysctl's were you using?
Comment 2 Jeremy Faulkner 2021-01-13 01:20:55 UTC
NETWORKING requires netif which requires sysctl
Comment 3 Mahmoud Al-Qudsi 2021-01-13 05:28:23 UTC
Yup. This should do the trick.