-
Notifications
You must be signed in to change notification settings - Fork 102
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add debug logging for system state changes #175
base: master
Are you sure you want to change the base?
Conversation
Add logging for reading and writing to system files including /proc
@agowa338 This is adding an awful lot of debug to dhcpcd and it has plenty already. What specifically are we trying to debug here? You must have had a reason to do this. I'm happy to take the code in that adjusts comments in the headers and any other non debug related improvements in a separate PR. |
this looks like a level of detail where you might as well use DTrace for (or eBPF on Linux these days?) |
The reason was that dhcpcd was changing system configuration that I had explicitely defined otherwise (and it doing so caused service disruptions). So I wasted excessive time trying to understand why sysctl is not applying it. I ran everything with debug output, but dhcpcd didn't log anything, so I was assuming that it didn't change anything and wasted a lot of time trying to debug and find what application actually touched it... |
What sysctls are we talking about here that would cause a service distruption? dhcpcd will change the following IPv6 related tunables:
You can stop dhcpcd from doing this by disabling IPv6 or IPv6RS support in dhcpcd. Otherwise I'm not sure what else dhcpcd would stamp on and cause a problem? |
It has been a while, but if I recall correctly, it was an interaction between multiple settings (at least accept_ra and forwarding) that caused the disruption. The system was used to run containers (I.E. forwarding was enabled). But dhcpcd set accept_ra to 1 (or 0, don't know anymore), whereas I had set it to 2 within a startup task explicitly. Other systems on the same lan were advertising their internal container/vm/vpn/... networks, so that traffic to them was routed directly instead of to the gateway (which filtered it). And disabling dhcpcd was not an option, because I needed it to get me a prefix using DHCP-PD... |
Add logging for reading and writing to system files including /proc