Conversation
|
Azure Pipelines: There may be pipelines that require an authorized user to comment /azp run to run. |
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Hi, there are workflow run(s) waiting for approval, you may be first-time contributor. I will notify maintainers to help approve once PR is approved. Thanks! ---Powered by SONiC BuildBot
|
|
@gs1571, can you please add UT for this change? |
364126b to
a0019e1
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
@anarasimhan-upscale, added a focused DVS regression test for the reported scenario. The test creates an IPv6 link-local neighbor while This is covered in the DVS suite because the behavior depends on Linux |
| { | ||
| for (const auto &field : kfvFieldsValues(entry)) | ||
| { | ||
| if (fvField(field) == "ipv6_use_link_local_only" && fvValue(field) == "enable") |
There was a problem hiding this comment.
this treats every SET whose current row still has ipv6_use_link_local_only=enable as an enable event. SubscriberStateTable returns the full row, so an MTU/VRF update on an already-enabled interface schedules another full kernel dump
There was a problem hiding this comment.
@anarasimhan-upscale, thank you for pointing this out.
I updated the implementation to track the observed interface state:
- The initial
SubscriberStateTablesnapshot initializes the state without scheduling a replay. - A replay is scheduled only on a disabled-to-enabled transition.
- Unrelated full-row
SETupdates on an already enabled interface no longer trigger another kernel dump. - Disable and delete events clear the state, allowing a later re-enable to schedule a new replay.
I also added focused unit tests covering the initial snapshot, repeated full-row updates, pending replay handling, disable/delete and re-enable transitions, and ignored address rows. The DVS regression test still verifies that a link-local neighbor learned before the option is enabled is replayed to APPL_DB without another neighbor event.
Could you please take another look?
a0019e1 to
c23f02b
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
@prsunny can you please help signoff on this PR? |
IPv6 link-local neighbors learned while ipv6_use_link_local_only is disabled are ignored. Enabling the option does not revisit neighbors already present in the kernel, leaving APPL_DB without their entries until another neighbor notification arrives. Subscribe to interface configuration updates and replay matching kernel neighbors through the existing onMsg path. Initialize the observed interface state from the SubscriberStateTable snapshot and schedule a replay only on a disabled-to-enabled transition, so unrelated full-row updates on an already enabled interface do not trigger another kernel dump. Collect the snapshot on a separate Netlink socket so live notifications remain queued on the original socket. Retry failed snapshots at most once per second and preserve normal neighbor filtering and warm-restart handling. Add focused unit coverage for initial state, repeated full-row updates, retries, disable and delete transitions, re-enable, and address rows. Keep the DVS regression test for replaying an existing kernel neighbor without a new neighbor event. Signed-off-by: Grigorii Solovev <gs1571@gmail.com>
c23f02b to
78ae666
Compare
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
What I did
Updated
neighsyncdto replay existing IPv6 link-local neighbors whenipv6_use_link_local_onlyis enabled on an interface.The replay uses a separate Netlink socket and passes matching neighbors through
the existing
onMsg()processing path. This preserves the current filtering,warm-restart behavior, and processing of live neighbor notifications.
Why I did it
The issue occurs in the following sequence:
ipv6_use_link_local_onlyis disabled.neighsyncdreceives the neighbor event but intentionally ignores it becausethe option is disabled.
As a result, the neighbor remains present in the Linux neighbor table but is
missing from
APPL_DB. Objects that depend on this neighbor, such as aninterface-qualified IPv6 next hop, remain unresolved until another neighbor
event is generated by traffic, a state transition, or manual neighbor
recreation.
The primary goal of this PR is to make enabling
ipv6_use_link_local_onlyreconcile the already existing kernel neighbor state.The configuration change must take effect without requiring new traffic or
manual neighbor deletion.
How I verified it
Reproduced the scenario with an IPv6 link-local neighbor created before enabling
ipv6_use_link_local_only.Before the change:
APPL_DB;After the change:
neighbor discovery traffic;
APPL_DB;socket.
Details if related
The implementation subscribes to
INTERFACE,PORTCHANNEL_INTERFACE, andVLAN_INTERFACEconfiguration updates.Only IPv6 link-local neighbors on interfaces where the option has just been
enabled are replayed. Address-entry updates are ignored. Pending replay is
cancelled when the option is disabled or the interface is deleted. A failed
kernel snapshot is retried at most once per second.