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
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions syncd/scripts/syncd_init_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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.

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.

if [ "$SYNC_MODE" == "enable" ]; then
CMD_ARGS+=" -s"
fi

case "$(cat /proc/cmdline)" in
*SONIC_BOOT_TYPE=fastfast*)
if [ -e /var/warmboot/warm-starting ]; then
Expand Down