-
Notifications
You must be signed in to change notification settings - Fork 23
infra: add GR_EVENT_IFACE_REMOVE event #418
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
Conversation
📝 WalkthroughWalkthroughThe enum gr_event_iface_t adds GR_EVENT_IFACE_REMOVE at value 0x0004, shifting subsequent iface event values. Code references to GR_EVENT_IFACE_PRE_REMOVE were replaced with GR_EVENT_IFACE_REMOVE across multiple modules (zebra dataplane grout, infra iface serializer, CLI printer, control plane, iface lifecycle, and IPv6 router advertisement). Event subscription lists, serializers, printers, and handlers were updated to include and handle the new REMOVE event; textual mapping now distinguishes PRE_REMOVE ("pre del") and REMOVE ("del") where applicable. Pre-merge checks❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
📜 Recent review detailsConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (5)
🧰 Additional context used📓 Path-based instructions (1)**/*.{c,h}⚙️ CodeRabbit configuration file
Files:
🧠 Learnings (1)📓 Common learnings🔇 Additional comments (4)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
93e14aa to
23c7187
Compare
| GR_EVENT_IFACE_POST_RECONFIG = EVENT_TYPE(GR_INFRA_MODULE, 0x0004), | ||
| GR_EVENT_IFACE_STATUS_UP = EVENT_TYPE(GR_INFRA_MODULE, 0x0005), | ||
| GR_EVENT_IFACE_STATUS_DOWN = EVENT_TYPE(GR_INFRA_MODULE, 0x0006), | ||
| GR_EVENT_IFACE_REMOVE = EVENT_TYPE(GR_INFRA_MODULE, 0x0004), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use 0x0007 for GR_EVENT_IFACE_REMOVE to preserve ABI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no need: we don't guarantee any ABI compatibility, and the 2 customers (grcli and frr plugin) of this API are built as part of grout.
There is in fact a check on connection which rejects it if a wrong client tries to connect to grout.
aharivel
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Similar to IFACE_POST_ADD / IFACE_ADD. As we don't order the event registration, on interface removal, we end up removing the control plane netdevice before the removing the ip addresses. While this is harmless, Grout still logs a warning: WARN: GROUT: iface6_addr_del: delete addr fe80::c613:8fff:fe4f:6a22 on linux has failed (Cannot assign requested address) WARN: GROUT: iface6_addr_del: delete addr 2345::1 on linux has failed (Cannot assign requested address) INFO: GROUT: iface_port_fini: port 0 destroyed WARN: GROUT: iface6_addr_del: delete addr fe80::de61:40ff:fe84:1655 on linux has failed (Cannot assign requested address) WARN: GROUT: iface6_addr_del: delete addr 2346::1 on linux has failed (Cannot assign requested address) INFO: GROUT: iface_port_fini: port 1 destroyed Add a new event "GR_EVENT_IFACE_REMOVE" which should be consumed externally, while the "PRE_REMOVE" event is consumed internally. Update FRR plugin as well. Signed-off-by: Christophe Fontaine <cfontain@redhat.com> Reviewed-by: Anthony Harivel <aharivel@redhat.com>
23c7187 to
a959363
Compare
Similar to IFACE_POST_ADD / IFACE_ADD. As we don't order the event registration, on interface removal, we end up removing the control plane netdevice before the removing the ip addresses. While this is harmless, Grout still logs a warning:
WARN: GROUT: iface6_addr_del: delete addr fe80::c613:8fff:fe4f:6a22 on linux has failed (Cannot assign requested address)
WARN: GROUT: iface6_addr_del: delete addr 2345::1 on linux has failed (Cannot assign requested address)
INFO: GROUT: iface_port_fini: port 0 destroyed
WARN: GROUT: iface6_addr_del: delete addr fe80::de61:40ff:fe84:1655 on linux has failed (Cannot assign requested address)
WARN: GROUT: iface6_addr_del: delete addr 2346::1 on linux has failed (Cannot assign requested address)
INFO: GROUT: iface_port_fini: port 1 destroyed
Add a new event "GR_EVENT_IFACE_REMOVE" which should be consummed externally, while the "PRE_REMOVE" event is consummed internally.
Update FRR plugin as well.
Summary by CodeRabbit
Bug Fixes
User Interface
✏️ Tip: You can customize this high-level summary in your review settings.