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

zebra: be more careful removing 'installed' flag from nhgs #14515

Merged
merged 1 commit into from
Oct 10, 2023

Conversation

mjstapp
Copy link
Contributor

@mjstapp mjstapp commented Sep 29, 2023

When interface addresses change, we examine nhgs associated with the interface in case they need to be reinstalled. As part of that, we may need to reinstall ecmp nhgs that use the interface being examined - but not always. Currently, changes to addresses on an interface may incorrectly mark nexthop-groups as 'uninstalled' incorrectly, and zebra won't correct that by itself. For example, run zebra and sharpd, and configure a nexthop-group with two nexthops:

mjs-ubu22(config)# nexthop-group nh1
mjs-ubu22(config-nh-group)# nexthop 2.2.2.22 ANNIE onlink 
mjs-ubu22(config-nh-group)# nexthop 2.2.2.23 ANNIE onlink 
mjs-ubu22(config-nh-group)# end

And the output of the nhg will be as expected:

ID: 68 (sharp)
     RefCnt: 2
     Uptime: 00:00:05
     VRF: default
     Valid, Installed
     Interface Index: 3
           via 2.2.2.23, ANNIE (vrf default) onlink, weight 1
     Dependents: (185483868)
ID: 69 (sharp)
     RefCnt: 2
     Uptime: 00:00:05
     VRF: default
     Valid, Installed
     Interface Index: 3
           via 2.2.2.22, ANNIE (vrf default) onlink, weight 1
     Dependents: (185483868)
[...]
ID: 185483868 (sharp)
     RefCnt: 1
     Uptime: 00:00:05
     VRF: default
     Valid, Installed
     Depends: (68) (69)
           via 2.2.2.22, ANNIE (vrf default) onlink, weight 1
           via 2.2.2.23, ANNIE (vrf default) onlink, weight 1

Then add an ipv6 address to the interface - this will trigger change processing that marks sharpd's NHG "uninstalled":

mjs-ubu22(config)# int ANNIE 
mjs-ubu22(config-if)# ip address 2222::2222/64
mjs-ubu22(config-if)# do sho nexthop-group rib 
[...]
ID: 68 (sharp)
     RefCnt: 2
     Uptime: 00:00:44
     VRF: default
     Valid, Installed
     Interface Index: 3
           via 2.2.2.23, ANNIE (vrf default) onlink, weight 1
     Dependents: (185483868)
ID: 69 (sharp)
     RefCnt: 2
     Uptime: 00:00:44
     VRF: default
     Valid, Installed
     Interface Index: 3
           via 2.2.2.22, ANNIE (vrf default) onlink, weight 1
     Dependents: (185483868)
[...]
ID: 185483868 (sharp)
     RefCnt: 1
     Uptime: 00:00:44
     VRF: default
     Valid
     Depends: (68) (69)
           via 2.2.2.22, ANNIE (vrf default) onlink, weight 1
           via 2.2.2.23, ANNIE (vrf default) onlink, weight 1

When interface addresses change, we examine nhgs associated
with the interface in case they need to be reinstalled. As
part of that, we may need to reinstall ecmp nhgs that use the
interface being examined - but not always.

Signed-off-by: Mark Stapp <[email protected]>
@NetDEF-CI
Copy link
Collaborator

Continuous Integration Result: SUCCESSFUL

Congratulations, this patch passed basic tests

Tested-by: NetDEF / OpenSourceRouting.org CI System

CI System Testrun URL: https://ci1.netdef.org/browse/FRR-PULLREQ2-14412/

This is a comment from an automated CI system.
For questions and feedback in regards to this CI system, please feel free to email
Martin Winter - mwinter (at) opensourcerouting.org.

@ton31337 ton31337 added this to the 9.1 milestone Oct 2, 2023
@donaldsharp
Copy link
Member

Can I get an example of when this is wrong? And how this fixes this?

@mjstapp
Copy link
Contributor Author

mjstapp commented Oct 3, 2023

Heh, yeah, sorry: hate it when people open mystery PRs with no context!
I've updated the description with a config example and show output.

Can I get an example of when this is wrong? And how this fixes this?

Copy link
Member

@riw777 riw777 left a comment

Choose a reason for hiding this comment

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

looks good

@riw777
Copy link
Member

riw777 commented Oct 3, 2023

Is this possibly also related to #14102?

@donaldsharp
Copy link
Member

I hate to be this way but can we add this analysis to the commit message itself?

@mjstapp
Copy link
Contributor Author

mjstapp commented Oct 4, 2023

heh - sure, of course - but I do think (after our discussion during the weekly meeting on Tuesday this week) that we should wait a bit to hear from Chirag who has some insight into the event-handling that led to the current version of the code. it may be that we need a more complete solution to the problem of lost/elided OS events...

I hate to be this way but can we add this analysis to the commit message itself?

@chiragshah6 chiragshah6 merged commit 0ddda5c into FRRouting:master Oct 10, 2023
7 checks passed
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.

6 participants