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

[counterpoll] Disable Counter Poll When Entering Fast Reboot #1174

Conversation

tahmed-dev
Copy link
Contributor

@tahmed-dev tahmed-dev commented Oct 15, 2020

Counter polling is enabled via enable_counters script when booting
into new image and these configuration is written to config_db.
However, subsequent fast-reboot into the same image will have counter
polling enabled by default. This affect fast-reboot time. As a workaround,
we will disable counter poll when entering fast-reboot.

Fixes: sonic-net/sonic-buildimage#5107
Closes: sonic-net/sonic-buildimage#5107

singed-off-by: Tamer Ahmed tamer.ahmed@microsoft.com

- What I did
Disable counterpoll when fast rebooting

- How I did it
Added new command to the counter poll command suite and then invoked it from fast-reboot

- How to verify it
Unit test added
Verified on DUT

- Previous command output (if the output of a command-line utility has changed)
N/A
- New command output (if the output of a command-line utility has changed)
counterpoll config-db disable
counterpoll config-db enable

Counter polling is enabled via enable_counters script when booting
into new image and these configuration is written to config_db.
However, subsequent fast-reboot into the same image will have counter
polling enabled by default. This affect fast-reboot time. As a workaround,
we will disable counter poll when entering fast-reboot.

singed-off-by: Tamer Ahmed <tamer.ahmed@microsoft.com>
@liat-grozovik
Copy link
Collaborator

retest this please


# Working on Config DB
@cli.group()
def config_db():
Copy link
Contributor

Choose a reason for hiding this comment

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

This new command is basically "counterpoll disable && config save -y" ?
I wonder, why not disable counterpolling in running redis db and do config save in the fast-reboot script?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is possible as well. However I did not want to lose visibility of counters while in the reboot process had it failed in a subsequent step and so, opted for it to be done at a later step.

yxieca
yxieca previously approved these changes Oct 16, 2020
counterpoll/main.py Outdated Show resolved Hide resolved
scripts/fast-reboot Outdated Show resolved Hide resolved
@tahmed-dev tahmed-dev merged commit ca92e36 into sonic-net:master Oct 21, 2020
@abdosi
Copy link
Contributor

abdosi commented Feb 12, 2021

@tahmed-dev please create PR for 201911.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[fast-reboot] counter polling is not delayed on fast-boot
6 participants