Skip to content

With ZMQ enabled between fpmsyncd to orchagent, default routes are se…#3979

Merged
prsunny merged 5 commits intosonic-net:masterfrom
venkit-nexthop:master
Nov 12, 2025
Merged

With ZMQ enabled between fpmsyncd to orchagent, default routes are se…#3979
prsunny merged 5 commits intosonic-net:masterfrom
venkit-nexthop:master

Conversation

@venkit-nexthop
Copy link
Copy Markdown
Contributor

@venkit-nexthop venkit-nexthop commented Nov 8, 2025

The following issues are resolved in this PR:

  1. When ZMQ is enabled, default routes are set to DROP even when there is a valid default route present.

Issue# #3978

  1. ZMQ configuration does not work when mgmt VRF is configured

#3985

What I did
Fixed orchagent to be able to handle DEL+SET. This was the root cause for the default route being set to DROP.
Fix fpmsyncd to not send DEL+SET and instead only send a SET for routes. This is achieved by including all the fields, even the ones not present, with a default empty value.
This is more efficient now.

Why I did it
Recently ZMQ was enabled in sonic-mgmt (refer to sonic-net/sonic-mgmt@111e635). fpmsyncd sends a DEL+SET for every route. This was coalesced by the producerStateTable infra. But with ZMQ enabled, this coalescing does not happen. As a result, orchagent gets a DEL+SET for every route. This works well normally. But for default routes, there is a bug in orchagent, where it adds a DROP action when it receives the DEL. But when the subsequent SET is received, it does not reset it to FORWARD action. This is due to a bug in its checking code.

How I verified it
The default route is set to the correct FORWARD entry.

Details if related

…t to DROP

Issue# #3978

Recently ZMQ was enabled in sonic-mgmt (refer to sonic-net/sonic-mgmt@111e635).
fpmsyncd sends a DEL+SET for every route. This was coalesced by the producerStateTable infra. But with ZMQ enabled, this coalescing does not happen. As a result, orchagent gets a DEL+SET for every route. This works well normally. But for default routes, there is a bug in orchagent, where it adds a DROP action when it receives the DEL. But when the subsequent SET is received, it does not reset it to FORWARD action. This is due to a bug in its checking code.
@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@venkit-nexthop
Copy link
Copy Markdown
Contributor Author

tagging @xwjiang-ms

@venkit-nexthop
Copy link
Copy Markdown
Contributor Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run Azure.sonic-swss

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@xwjiang-ms
Copy link
Copy Markdown

Created test PR: sonic-net/sonic-buildimage#24484

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@venkit-nexthop
Copy link
Copy Markdown
Contributor Author

/azpw run Azure.sonic-swss

@mssonicbld
Copy link
Copy Markdown
Collaborator

/AzurePipelines run Azure.sonic-swss

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

@mssonicbld
Copy link
Copy Markdown
Collaborator

/azp run

@azure-pipelines
Copy link
Copy Markdown

Azure Pipelines successfully started running 1 pipeline(s).

Copy link
Copy Markdown
Collaborator

@prsunny prsunny left a comment

Choose a reason for hiding this comment

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

approving to unblock the test failures. @dgsudharsan for viz

@prsunny prsunny merged commit 5054495 into sonic-net:master Nov 12, 2025
8 of 11 checks passed
balanokia pushed a commit to balanokia/sonic-swss that referenced this pull request Nov 17, 2025
sonic-net#3979)

* With ZMQ enabled between fpmsyncd to orchagent, default routes are set to DROP

Issue# sonic-net#3978

Recently ZMQ was enabled in sonic-mgmt (refer to sonic-net/sonic-mgmt@111e635).
fpmsyncd sends a DEL+SET for every route. This was coalesced by the producerStateTable infra. But with ZMQ enabled, this coalescing does not happen. As a result, orchagent gets a DEL+SET for every route. This works well normally. But for default routes, there is a bug in orchagent, where it adds a DROP action when it receives the DEL. But when the subsequent SET is received, it does not reset it to FORWARD action. This is due to a bug in its checking code.

* ZMQ configuration does not work when mgmt VRF is configured
YairRaviv pushed a commit to YairRaviv/sonic-swss that referenced this pull request Nov 22, 2025
sonic-net#3979)

* With ZMQ enabled between fpmsyncd to orchagent, default routes are set to DROP

Issue# sonic-net#3978

Recently ZMQ was enabled in sonic-mgmt (refer to sonic-net/sonic-mgmt@111e635).
fpmsyncd sends a DEL+SET for every route. This was coalesced by the producerStateTable infra. But with ZMQ enabled, this coalescing does not happen. As a result, orchagent gets a DEL+SET for every route. This works well normally. But for default routes, there is a bug in orchagent, where it adds a DROP action when it receives the DEL. But when the subsequent SET is received, it does not reset it to FORWARD action. This is due to a bug in its checking code.

* ZMQ configuration does not work when mgmt VRF is configured
yijingyan2 added a commit to yijingyan2/sonic-swss that referenced this pull request Dec 2, 2025
sonic-net#3979)

* With ZMQ enabled between fpmsyncd to orchagent, default routes are set to DROP

Issue# sonic-net#3978

Recently ZMQ was enabled in sonic-mgmt (refer to sonic-net/sonic-mgmt@111e635).
fpmsyncd sends a DEL+SET for every route. This was coalesced by the producerStateTable infra. But with ZMQ enabled, this coalescing does not happen. As a result, orchagent gets a DEL+SET for every route. This works well normally. But for default routes, there is a bug in orchagent, where it adds a DROP action when it receives the DEL. But when the subsequent SET is received, it does not reset it to FORWARD action. This is due to a bug in its checking code.

* ZMQ configuration does not work when mgmt VRF is configured
Pterosaur pushed a commit to Janetxxx/sonic-swss that referenced this pull request Jan 6, 2026
sonic-net#3979)

* With ZMQ enabled between fpmsyncd to orchagent, default routes are set to DROP

Issue# sonic-net#3978

Recently ZMQ was enabled in sonic-mgmt (refer to sonic-net/sonic-mgmt@111e635).
fpmsyncd sends a DEL+SET for every route. This was coalesced by the producerStateTable infra. But with ZMQ enabled, this coalescing does not happen. As a result, orchagent gets a DEL+SET for every route. This works well normally. But for default routes, there is a bug in orchagent, where it adds a DROP action when it receives the DEL. But when the subsequent SET is received, it does not reset it to FORWARD action. This is due to a bug in its checking code.

* ZMQ configuration does not work when mgmt VRF is configured
yehjunying pushed a commit to yehjunying/sonic-swss that referenced this pull request Jan 16, 2026
sonic-net#3979)

* With ZMQ enabled between fpmsyncd to orchagent, default routes are set to DROP

Issue# sonic-net#3978

Recently ZMQ was enabled in sonic-mgmt (refer to sonic-net/sonic-mgmt@111e635).
fpmsyncd sends a DEL+SET for every route. This was coalesced by the producerStateTable infra. But with ZMQ enabled, this coalescing does not happen. As a result, orchagent gets a DEL+SET for every route. This works well normally. But for default routes, there is a bug in orchagent, where it adds a DROP action when it receives the DEL. But when the subsequent SET is received, it does not reset it to FORWARD action. This is due to a bug in its checking code.

* ZMQ configuration does not work when mgmt VRF is configured
venkit-nexthop added a commit to venkit-nexthop/sonic-swss that referenced this pull request Jan 16, 2026
Refer to sonic-net/sonic-buildimage#19638 The previous PR (sonic-net#3979)
inadvertantly caused the above issue.
This commit fixes that by connecting to zmq from fpmsyncd using the vrf
as well (if one is configured)

Signed-off-by: Venkit Kasiviswanathan <venkit@nexthop.ai>
theasianpianist pushed a commit to theasianpianist/sonic-swss that referenced this pull request Feb 4, 2026
sonic-net#3979)

* With ZMQ enabled between fpmsyncd to orchagent, default routes are set to DROP

Issue# sonic-net#3978

Recently ZMQ was enabled in sonic-mgmt (refer to sonic-net/sonic-mgmt@111e635).
fpmsyncd sends a DEL+SET for every route. This was coalesced by the producerStateTable infra. But with ZMQ enabled, this coalescing does not happen. As a result, orchagent gets a DEL+SET for every route. This works well normally. But for default routes, there is a bug in orchagent, where it adds a DROP action when it receives the DEL. But when the subsequent SET is received, it does not reset it to FORWARD action. This is due to a bug in its checking code.

* ZMQ configuration does not work when mgmt VRF is configured

Signed-off-by: Lawrence Lee <lawlee@microsoft.com>
baorliu pushed a commit to baorliu/sonic-swss that referenced this pull request Feb 23, 2026
sonic-net#3979)

* With ZMQ enabled between fpmsyncd to orchagent, default routes are set to DROP

Issue# sonic-net#3978

Recently ZMQ was enabled in sonic-mgmt (refer to sonic-net/sonic-mgmt@111e635).
fpmsyncd sends a DEL+SET for every route. This was coalesced by the producerStateTable infra. But with ZMQ enabled, this coalescing does not happen. As a result, orchagent gets a DEL+SET for every route. This works well normally. But for default routes, there is a bug in orchagent, where it adds a DROP action when it receives the DEL. But when the subsequent SET is received, it does not reset it to FORWARD action. This is due to a bug in its checking code.

* ZMQ configuration does not work when mgmt VRF is configured

Signed-off-by: Baorong Liu <96146196+baorliu@users.noreply.github.com>
prsunny pushed a commit that referenced this pull request Feb 24, 2026
* Make fpmsyncd use the mgmt vrf to bind to zmq when configured.

Refer to sonic-net/sonic-buildimage#19638 The previous PR (#3979)
inadvertantly caused the above issue.
This commit fixes that by connecting to zmq from fpmsyncd using the vrf
as well (if one is configured)

What I did
Fix for sonic-net/sonic-buildimage#25397
Improve performance in fpmsyncd by writing only the non-empty fields into redis. This is done only when zmq is not enabled.

Why I did it
To improve performance when ZMQ is not enabled in the northbound direction.
ksravani-hcl pushed a commit to ksravani-hcl/sonic-swss that referenced this pull request Feb 27, 2026
…t#4219)

* Make fpmsyncd use the mgmt vrf to bind to zmq when configured.

Refer to sonic-net/sonic-buildimage#19638 The previous PR (sonic-net#3979)
inadvertantly caused the above issue.
This commit fixes that by connecting to zmq from fpmsyncd using the vrf
as well (if one is configured)

What I did
Fix for sonic-net/sonic-buildimage#25397
Improve performance in fpmsyncd by writing only the non-empty fields into redis. This is done only when zmq is not enabled.

Why I did it
To improve performance when ZMQ is not enabled in the northbound direction.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants