Skip to content
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

lib: mgmtd: fix too early daemon detach of mgmtd (backport #16451) #16459

Merged
merged 1 commit into from
Jul 25, 2024

Conversation

mergify[bot]
Copy link

@mergify mergify bot commented Jul 24, 2024

Correct FRR startup counts on a daemon's vty socket to be open when the parent process exits. The parent process waits for frr_check_detach() to be called by the child before exiting. The problem is when the FRR_MANUAL_VTY_START flag is set the vty socket was not opened but frr_check_detach() was called anyway.

Instead add a bool option for frr_check_detach() to be called when the socket is opened with frr_vty_serv_start(), and do so when "manually" calling said function (i.e., when FRR_MANUAL_VTY_START is set).

The FRR_MANUAL_VTY_START flag is only set by mgmtd. The reason we wait to open the vty socket is so that mgmtd can parse the various daemon specific config files it has taken over, after the event loop has started, but before we receive any possible new config from vtysh.

fixes #16362


This is an automatic backport of pull request #16451 done by Mergify.

Correct FRR startup counts on a daemon's vty socket to be open when the
parent process exits. The parent process waits for `frr_check_detach()`
to be called by the child before exiting. The problem is when the
`FRR_MANUAL_VTY_START` flag is set the vty socket was not opened but
`frr_check_detach()` was called anyway.

Instead add a bool option for `frr_check_detach()` to be called when the
socket is opened with `frr_vty_serv_start()`, and do so when "manually"
calling said function (i.e., when FRR_MANUAL_VTY_START is set).

The `FRR_MANUAL_VTY_START` flag is only set by mgmtd. The reason we
wait to open the vty socket is so that mgmtd can parse the various
daemon specific config files it has taken over, after the event loop has
started, but before we receive any possible new config from `vtysh`.

fixes #16362

Signed-off-by: Christian Hopps <[email protected]>
(cherry picked from commit be9a6fc)
@ton31337 ton31337 merged commit 4a582da into stable/10.0 Jul 25, 2024
14 checks passed
@ton31337 ton31337 deleted the mergify/bp/stable/10.0/pr-16451 branch July 25, 2024 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants