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: fix reset rtadv bgp interfaces when bgp leaves #18220

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

Conversation

pguibert6WIND
Copy link
Member

@pguibert6WIND pguibert6WIND commented Feb 21, 2025

zebra: fix reset rtadv bgp interfaces when bgp leaves

When BGP is requested to leave (systemctl stop bgpd), BGP may not have
the time to flush all its contexts, including the rtadv information.

Feb 21 14:32:23 dut-vm zebra[998]: [N5M5Y-J5BPG][EC 4043309121] Client 'bgp' (session id 1) encountered an error and is shutting down.
Feb 21 14:32:23 dut-vm zebra[998]: [YDZ55-W3VM6] release_daemon_table_chunks: Released 0 table chunks
Feb 21 14:32:23 dut-vm zebra[998]: [ZJPTG-6AP36] release_daemon_label_chunks: Releasing chunks for client proto bgp, instance 0, session 0
Feb 21 14:32:23 dut-vm zebra[998]: [MP8WF-MBM3F] release_daemon_label_chunks: Released 0 label chunks
Feb 21 14:32:23 dut-vm zebra[998]: [JPSA8-5KYEA] client 37 disconnected 0 bgp routes removed from the rib
Feb 21 14:32:23 dut-vm zebra[998]: [S929C-NZR3N] client 37 disconnected 0 bgp nhgs removed from the rib
Feb 21 14:32:23 dut-vm zebra[998]: [YDZ55-W3VM6] release_daemon_table_chunks: Released 0 table chunks
Feb 21 14:32:23 dut-vm zebra[998]: [KQB7H-NPVW9] /build/make-pkg/output/_packages/cp-routing/src/zebra/zebra_ptm.c:1343 fai
led to find process pid registration
Feb 21 14:32:23 dut-vm zebra[998]: [ZJPTG-6AP36] release_daemon_label_chunks: Releasing chunks for client proto bgp, instan
ce 0, session 1
Feb 21 14:32:23 dut-vm zebra[998]: [WAX6A-X2VK5] Releasing label chunk: 103 - 103
Feb 21 14:32:23 dut-vm zebra[998]: [MP8WF-MBM3F] release_daemon_label_chunks: Released 1 label chunks
Feb 21 14:32:23 dut-vm zebra[998]: [JPSA8-5KYEA] client 42 disconnected 0 bgp routes removed from the rib
Feb 21 14:32:23 dut-vm zebra[998]: [S929C-NZR3N] client 42 disconnected 0 bgp nhgs removed from the rib
Feb 21 14:32:31 dut-vm zebra[998]: [JY2SR-KEYTH] ntfp2(default:4): Tx RA, socket 9

When the BGP leave is detected by ZEBRA, one should ensure that no
interfaces have rtadvd enabled by BGP.

Signed-off-by: Philippe Guibert [email protected]

When BGP is requested to leave (systemctl stop bgpd), BGP may not have
the time to flush all its contexts, including the rtadv information.

> Feb 21 14:32:23 dut-vm zebra[998]: [N5M5Y-J5BPG][EC 4043309121] Client 'bgp' (session id 1) encountered an error and is shutting down.
> Feb 21 14:32:23 dut-vm zebra[998]: [YDZ55-W3VM6] release_daemon_table_chunks: Released 0 table chunks
> Feb 21 14:32:23 dut-vm zebra[998]: [ZJPTG-6AP36] release_daemon_label_chunks: Releasing chunks for client proto bgp, instance 0, session 0
> Feb 21 14:32:23 dut-vm zebra[998]: [MP8WF-MBM3F] release_daemon_label_chunks: Released 0 label chunks
> Feb 21 14:32:23 dut-vm zebra[998]: [JPSA8-5KYEA] client 37 disconnected 0 bgp routes removed from the rib
> Feb 21 14:32:23 dut-vm zebra[998]: [S929C-NZR3N] client 37 disconnected 0 bgp nhgs removed from the rib
> Feb 21 14:32:23 dut-vm zebra[998]: [YDZ55-W3VM6] release_daemon_table_chunks: Released 0 table chunks
> Feb 21 14:32:23 dut-vm zebra[998]: [KQB7H-NPVW9] /build/make-pkg/output/_packages/cp-routing/src/zebra/zebra_ptm.c:1343 fai
> led to find process pid registration
> Feb 21 14:32:23 dut-vm zebra[998]: [ZJPTG-6AP36] release_daemon_label_chunks: Releasing chunks for client proto bgp, instan
> ce 0, session 1
> Feb 21 14:32:23 dut-vm zebra[998]: [WAX6A-X2VK5] Releasing label chunk: 103 - 103
> Feb 21 14:32:23 dut-vm zebra[998]: [MP8WF-MBM3F] release_daemon_label_chunks: Released 1 label chunks
> Feb 21 14:32:23 dut-vm zebra[998]: [JPSA8-5KYEA] client 42 disconnected 0 bgp routes removed from the rib
> Feb 21 14:32:23 dut-vm zebra[998]: [S929C-NZR3N] client 42 disconnected 0 bgp nhgs removed from the rib
> Feb 21 14:32:31 dut-vm zebra[998]: [JY2SR-KEYTH] ntfp2(default:4): Tx RA, socket 9

When the BGP leave is detected by ZEBRA, one should ensure that no
interfaces have rtadvd enabled by BGP.

Signed-off-by: Philippe Guibert <[email protected]>
@frrbot frrbot bot added the bugfix label Feb 21, 2025
@github-actions github-actions bot added size/M and removed size/S labels Feb 21, 2025
@pguibert6WIND pguibert6WIND changed the title zebra: reset rtadv info on interface deletion zebra: fix reset rtadv bgp interfaces when bgp leaves Feb 24, 2025
@pguibert6WIND pguibert6WIND marked this pull request as draft February 24, 2025 16:16
@pguibert6WIND
Copy link
Member Author

I need to check if something in BGP does prevent from unregistering from RTADV

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.

1 participant