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

Add synchronous switch controlled by CONFIG_DB #652

Merged
merged 1 commit into from
Aug 24, 2020

Conversation

shi-su
Copy link
Contributor

@shi-su shi-su commented Aug 21, 2020

-What I did
Let syncd check CONFIG_DB for whether to enable synchronous mode and initialize with the mode selected.

-Why I did it
To allow master control of synchronous mode and allow configuring the mode for orchagent and syncd.

-How I did it
Let syncd check the mode in CONFIG_DB in syncd_init_common.sh

-How I verified it
Test locally with a virtual switch.

-Details if related
Related to #sonic-net/sonic-buildimage/pull/5237

@@ -24,6 +24,12 @@ fi
# Use temporary view between init and apply
CMD_ARGS+=" -u"

# Set synchronous mode if it is enabled in CONFIG_DB
SYNC_MODE=$(sonic-cfggen -d -v DEVICE_METADATA.localhost.synchronous_mode)
Copy link
Contributor

Choose a reason for hiding this comment

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

synchronous_mode [](start = 57, length = 16)

Did you test when the field is missing, as in old image?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it will receive an empty thing and skip changing CMD_ARGS. Basically, it will do async mode.

@@ -24,6 +24,12 @@ fi
# Use temporary view between init and apply
CMD_ARGS+=" -u"

# Set synchronous mode if it is enabled in CONFIG_DB
SYNC_MODE=$(sonic-cfggen -d -v DEVICE_METADATA.localhost.synchronous_mode)
Copy link
Contributor

Choose a reason for hiding this comment

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

synchronous_mode [](start = 57, length = 16)

Also change https://github.com/Azure/SONiC/wiki/Configuration#device-metadata?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added it to the page.

@shi-su shi-su merged commit c4a86b3 into sonic-net:master Aug 24, 2020
pettershao-ragilenetworks pushed a commit to pettershao-ragilenetworks/sonic-sairedis that referenced this pull request Nov 18, 2022
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.

2 participants