-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Description
Description
If host system's FD limit is considered too large by the FRR, it reports warning like:
FD Limit set: 1048576 is stupidly large. Is this what you intended? Consider using --limit-fds also limiting size to 100000
While other daemons have access to --limit-fds
option, vtysh
does not support it. Therefore the only way to get rid of this warning is to reconfigure system's FD limit.
Version
10.2 (built from current `master`)
How to reproduce
# set ulimit above threshold
ulimit -Sn 100001
# launch vtysh
vtysh
Expected behavior
vtysh starts without warning because FD limit is applicable only to daemons. Alternatively vtysh
provides option to set FD limit and get rid of the warning message.
Actual behavior
Message
FD Limit set: 1048576 is stupidly large. Is this what you intended? Consider using --limit-fds also limiting size to 100000
is displayed
Additional context
I'm happy to help with fixing this, though I'm not that familiar with the codebase so I'm not sure what would be the proper approach here. i have couple of thoughts
Perhaps a helper function frr_is_daemon
in libfrr.c
that returns True
if di != NULL
could be added and then used here
Lines 557 to 562 in 975e1a3
if (rv->fd_limit > STUPIDLY_LARGE_FD_SIZE) { | |
zlog_warn("FD Limit set: %u is stupidly large. Is this what you intended? Consider using --limit-fds also limiting size to %u", | |
rv->fd_limit, STUPIDLY_LARGE_FD_SIZE); | |
rv->fd_limit = STUPIDLY_LARGE_FD_SIZE; | |
} |
to show this message only for daemons?
Implementing --limit-fds
for vtysh
?
Getting rid of the message altogether since the FRR sets the FD limit to STUPIDLY_LARGE_FD_SIZE
anyway even without the --limit-fds
option.
Checklist
- I have searched the open issues for this bug.
- I have not included sensitive information in this report.