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

[enable_counters] Set default values only on the first start #7735

Merged

Conversation

ayurkiv-nvda
Copy link
Contributor

@ayurkiv-nvda ayurkiv-nvda commented May 27, 2021

Why I did it

after "config reload" or "docker swss restart" all counterpoll counters were enabled even if they were disabled before

How I did it

check if entry already exist before set default values

How to verify it

disable few counters

counterpoll pg-drop disable
counterpoll port disable

Save and reload

config save
config reload

Which release branch to backport (provide reason below if selected)

  • 201811
  • 201911
  • 202006
  • 202012

Description for the changelog

A picture of a cute animal (not mandatory but encouraged)

@ayurkiv-nvda ayurkiv-nvda changed the title Set default values only on the first start [enable_counters] Set default values only on the first start May 27, 2021
@bingwang-ms bingwang-ms merged commit 0c2521b into sonic-net:master Jun 9, 2021
carl-nokia pushed a commit to carl-nokia/sonic-buildimage that referenced this pull request Aug 7, 2021
neethajohn pushed a commit that referenced this pull request Jun 22, 2022
…rst start (#10935)

Signed-off-by: Andriy Yurkiv <[email protected]>

Backport form master
Appropriate PR on master: #7735
Appropriate PR on master #6444

Why I did it
PG drop counters should be enabled by default (merge from master)
After "config reload" or "docker swss restart" all counters were enabled even if they were disabled before

How I did it
1)Add PG drop counter enable option to dockers/docker-orchagent/enable_counters.py
2) Check if entry already exist before set default values

How to verify it
- install image and run counterpoll show CLI command and then you will see PG_STAT_DROP enabled
- Disable few counters
    counterpoll pg-drop disable
    counterpoll port disable
- Save and reload
   config save
   config reload
- Check enable status
@ayurkiv-nvda ayurkiv-nvda deleted the reload_countrepoll_azure branch May 30, 2023 21:51
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.

4 participants