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

pimd: Fix PIM MLAG Update Peer Zebra Status Upon Local MLAG Connectio… #15918

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

routingrocks
Copy link
Contributor

…n Restoration

Issue:
In scenarios where the local MLAG connection is down, we currently halt processing peer MLAG messages. However, upon restoration of the local connection,
we fail to update the peer Zebra status accordingly.

Consider the case where the peer is up and sends FRR status messages to the local node. If CLAGd restarts on the local node while FRR is running, the local CLAGd assumes the peer is still down even when it's up.

Fix:
Update the peer Zebra status once the local MLAG connection is restored

Testing: UT

Ticket: #

Signed-off-by: Rajesh Varatharaj [email protected]

@frrbot frrbot bot added the pim label May 3, 2024
@routingrocks routingrocks marked this pull request as draft May 3, 2024 20:56
…n Restoration

Issue:
In scenarios where the local MLAG connection is down, we currently halt processing
peer MLAG messages. However, upon restoration of the local connection,
 we fail to update the peer Zebra status accordingly.

Consider the case where the peer is up and sends FRR status messages to the local node.
If CLAGd restarts on the local node while FRR is running,
the local CLAGd assumes the peer is still down even when it's up.

Fix:
Update the peer Zebra status once the local MLAG connection is restored

Testing: UT

Ticket: #
Signed-off-by: Rajesh Varatharaj <[email protected]>
@routingrocks routingrocks force-pushed the rvaratharaj/pim_mlag_state_fix branch from 2e85117 to b45ff52 Compare May 3, 2024 23:44
@github-actions github-actions bot added size/M and removed size/S labels May 3, 2024
@routingrocks routingrocks marked this pull request as ready for review May 3, 2024 23:46
Copy link
Member

@ton31337 ton31337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also styling from frrbot.

return 0;
}


Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Drop this change.

@@ -575,7 +587,6 @@ static void pim_mlag_process_mlagd_state_change(struct mlag_status msg)
return;
}
++router->mlag_stats.msg.mlag_status_updates;

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop this change.

zlog_debug(
"%s: update Mlag flag with PIM_MLAGF_PEER_ZEBRA_UP",
__func__);
router->mlag_flags |= PIM_MLAGF_PEER_ZEBRA_UP;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use SET_FLAG()?

@@ -552,6 +552,18 @@ static inline void pim_mlag_vxlan_state_update(void)


/********************API to process PIM MLAG Data ************************/
static void pim_mlag_peer_zebra_flag_set(void)
{
if (router->mlag_flags & PIM_MLAGF_PEER_CONN_UP) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use CHECK_FLAG()?

static void pim_mlag_peer_zebra_flag_set(void)
{
if (router->mlag_flags & PIM_MLAGF_PEER_CONN_UP) {
if (!(router->mlag_flags & PIM_MLAGF_PEER_ZEBRA_UP)) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we use CHECK_FLAG()?

@@ -552,6 +552,18 @@ static inline void pim_mlag_vxlan_state_update(void)


/********************API to process PIM MLAG Data ************************/
static void pim_mlag_peer_zebra_flag_set(void)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The naming is ambiguous... It says flag set, but it's not clear what flag. IMO the naming should be clear.

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.

None yet

2 participants