confd: reduce dhcp client logging overhead by 70%

Adjust DHCP client retry behavior:

 -t 3  (was -t 10) : Maximum discovery attempts per cycle
 -T 5  (was -T 3)  : Seconds to wait between attempts
 -A 30 (was -A 10) : Seconds to wait after all attempts fail

Before: 10 attempts × 3 seconds = 30 seconds of rapid trying, then 10
        second pause = 40 second total cycle

After: 3 attempts × 5 seconds = 15 seconds of trying, then 30 second
       pause = 45 second total cycle

=> 70% fewer log messages during active attempts, with longer quiet
       periods between cycles.

Fixes #1100

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2025-09-15 18:07:50 +02:00
parent 400691af85
commit f41ff6d3e7
+1 -1
View File
@@ -256,7 +256,7 @@ static void add(const char *ifname, struct lyd_node *cfg)
fprintf(fp, "# Generated by Infix confd\n");
fprintf(fp, "metric=%s\n", metric);
fprintf(fp, "service <!> name:dhcp-client :%s <net/%s/running> \\\n"
" [2345] udhcpc -f -p /run/dhcp-client-%s.pid -t 10 -T 3 -A 10 %s -S -R \\\n"
" [2345] udhcpc -f -p /run/dhcp-client-%s.pid -t 3 -T 5 -A 30 %s -S -R \\\n"
" %s%s \\\n"
" -i %s %s %s \\\n"
" -- DHCP client @%s\n",