-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Add Orchagent ZMQ table feature flag: orch_dash_zmq_enabled and orch_route_zmq_enabled. #22451
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
base: master
Are you sure you want to change the base?
Conversation
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw ms_conflict |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw run ms_conflict |
/AzurePipelines run ms_conflict |
No pipelines are associated with this pull request. |
/azpw ms_conflict |
/azp run Azure.sonic-buildimage |
Azure Pipelines successfully started running 1 pipeline(s). |
/azpw ms_conflict |
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, @prabhataravind for viz
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.
This feature is configurable by "orch_route_zmq_enabled" in ConfigDB. |
@@ -300,6 +300,18 @@ module sonic-device_metadata { | |||
description "Set source of anchor route"; | |||
} | |||
|
|||
leaf orch_dash_zmq_enabled { | |||
type boolean; | |||
description "Enable ZMQ feature on APPL_DB DASH tables."; |
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.
Now that you have a dedicated flag for dash orchs to use zmq, can we deprecate the current '-q' option with zmq_server_address that is currently passed to orchagent in smartswitch to enable zmq b/w gnmi and orchagent and use this instead? Why not have a consistent way to enable zmq b/w orchagent and all other components like gnmi, fpmsyncd etc..?
Ref: #16661
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.
On current image, orchagent only enable ZMQ on Dash tables, so use -q option to control the ZMQ feature is enough.
However, we plan to improve route performance by enable ZMQ between fpmsyncd and orchagent.
Then there will be 2 features on orchagent share same ZMQ address, so using -q to control the Dash ZMQ feature is not enough.
For Dash, we plan to migrate to enable/disable with the 'orch_dash_zmq_enabled' feature flag. There will be another PR in orchagent to make Dash enable/disable ZMQ with this flag.
And for improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag.
But the -q option will keep, because the ZMQ address is generated according to the mgmt_ip and eth0-midplane interface status.
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.
okay, please link all relevant zmq PRs together for convenience when you get a chance.
@qiluo-msft will the def
@qiluo-msft I see the yang model specifies a default value of false for these. As long as config_db will have this disabled by default, it should be ok but it will be useful to understand what is the end-end gain if orchagent<->syncd interface is still using redis. |
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.
Discussed offline
* Improve swss to support ZMQ Why I did it swssconfig does not support ZMQ How I did it Improve swss to support ZMQ swssconfig will load orchagent ZMQ table list from CONFIG_DB, and create ZMQ channel according to the config: sonic-net/sonic-buildimage#22451
Add Orchagent ZMQ table feature flag: orch_dash_zmq_enabled and orch_route_zmq_enabled
Why I did it
On current image, orchagent only enable ZMQ on Dash tables, so use -q option to control the ZMQ feature is enough.
However, we plan to improve route performance by enable ZMQ between fpmsyncd and orchagent. sonic-net/SONiC#1659
Then there will be 2 features on orchagent share same ZMQ address, so using -q to control the Dash ZMQ feature is not enough.
For Dash, we plan to migrate to enable/disable with the 'orch_dash_zmq_enabled' feature flag. There will be another PR in orchagent to make Dash enable/disable ZMQ with this flag.
And for improve route performance by enable ZMQ between fpmsyncd and orchagent, it will be controlled by the 'orch_route_zmq_enabled' flag.
Work item tracking
How I did it
Add orch_dash_zmq_enabled and orch_route_zmq_enabled field to DEVICE_METADATA table in config_db.
orch_dash_zmq_enabled:
Control enable/disable ZMQ on Dash feature.
orch_route_zmq_enabled:
Control enable/disable ZMQ between fpmsyncd and orchagent for improve route performance.
How to verify it
Pass all test case.
Manually verified orch_zmq_tables.conf can generate correctly according to CONFIG_DB
admin@vlab-01:
$ sonic-db-cli CONFIG_DB hset "DEVICE_METADATA|localhost" "orch_route_zmq_enabled" "true"$ sonic-db-cli CONFIG_DB hset "DEVICE_METADATA|localhost" "orch_dash_zmq_enabled" "true"1
admin@vlab-01:
1
admin@vlab-01:
$ sudo config save -y$ sudo config reload -yRunning command: /usr/local/bin/sonic-cfggen -d --print-data > /etc/sonic/config_db.json
admin@vlab-01:
Acquired lock on /etc/sonic/reload.lock
Disabling container and routeCheck monitoring ...
Stopping SONiC target ...
Running command: /usr/local/bin/sonic-cfggen -j /etc/sonic/init_cfg.json -j /etc/sonic/config_db.json --write-to-db
Running command: /usr/local/bin/db_migrator.py -o migrate
Running command: /usr/local/bin/sonic-cfggen -d -y /etc/sonic/sonic_version.yml -t /usr/share/sonic/templates/sonic-environment.j2,/etc/sonic/sonic-environment
Restarting SONiC target ...
Enabling container and routeCheck monitoring ...
Reloading Monit configuration ...
Reinitializing monit daemon
Released lock on /etc/sonic/reload.lock
admin@vlab-01:~$ docker exec -it swss bash
root@sonic:/# cat /etc/swss/orch_zmq_tables.conf
DASH_VNET_TABLE
DASH_QOS_TABLE
DASH_ENI_TABLE
DASH_ACL_IN_TABLE
DASH_ACL_OUT_TABLE
DASH_ACL_GROUP_TABLE
DASH_ACL_RULE_TABLE
DASH_HA_SET_TABLE
DASH_HA_SCOPE_TABLE
DASH_PREFIX_TAG_TABLE
DASH_ROUTING_TYPE_TABLE
DASH_APPLIANCE_TABLE
DASH_ROUTE_TABLE
DASH_ROUTE_RULE_TABLE
DASH_VNET_MAPPING_TABLE
DASH_ENI_ROUTE_TABLE
DASH_ROUTE_GROUP_TABLE
DASH_TUNNEL_TABLE
DASH_PA_VALIDATION_TABLE
DASH_METER_POLICY_TABLE
DASH_METER_RULE_TABLE
DASH_ROUTING_APPLIANCE_TABLE
DASH_ENI_FORWARD_TABLE
ROUTE_TABLE
LABEL_ROUTE_TABLE
Which release branch to backport (provide reason below if selected)
Tested branch (Please provide the tested image version)
Description for the changelog
Add Orchagent ZMQ table feature flag: orch_dash_zmq_enabled and orch_route_zmq_enabled
Link to config_db schema for YANG module changes
A picture of a cute animal (not mandatory but encouraged)