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

[watermarkstat] Add new warning message for the 'q_shared_multi' counters #9

Closed
wants to merge 1 commit into from

Conversation

vadymhlushko-mlnx
Copy link
Owner

@vadymhlushko-mlnx vadymhlushko-mlnx commented Sep 28, 2022

Signed-off-by: Vadym Hlushko [email protected]

What I did

Add a new warning message for the 'q_shared_multi' counter and not perform the exit with error code (1) because of the new implementation sonic-swss/pull/2432 from now on there is a valid case if there are no multicast counters inside the COUNTERS_DB.

In order for multicast counters to be presented in COUNTERS_DB the appropriate queues should be configured inside the CONFIG_DB (e.g "BUFFER_QUEUE|Ethernet14|7-8")

How I did it

Change the watermarkstat script

How to verify it

Run the sonic-mgmt/tests/iface_namingmode/test_iface_namingmode.py

Previous command output (if the output of a command-line utility has changed)

root@sonic:/home/admin# show queue watermark multicast
Object map is empty!

New command output (if the output of a command-line utility has changed)

root@sonic:/home/admin# show queue watermark multicast
Object map from COUNTERS_DB is empty, because multicast queues are not configured in CONFIG_DB!

@@ -201,7 +201,7 @@ class Watermarkstat(object):

return pg_index

def build_header(self, wm_type):
def build_header(self, wm_type, key):
Copy link
Owner Author

Choose a reason for hiding this comment

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

key -> counter_type_key

print("Object map is empty!", file=sys.stderr)
sys.exit(1)
else:
print("Object map from COUNTERS_DB is empty, because counters are not configured in CONFIG_DB!")
Copy link
Owner Author

Choose a reason for hiding this comment

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

because counters are not configured in CONFIG_DB! -> because multicast queues are not configured in CONFIG_DB

@@ -220,8 +220,12 @@ class Watermarkstat(object):
min_idx = element_idx

if min_idx == sys.maxsize:
print("Object map is empty!", file=sys.stderr)
sys.exit(1)
if key not in ['q_shared_multi', 'q_shared_all']:
Copy link
Owner Author

Choose a reason for hiding this comment

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

delete q_shared_all

@vadymhlushko-mlnx vadymhlushko-mlnx changed the title [watermarkstat] Add new warning message for the 'q_shared_multi', 'q_shared_all' [watermarkstat] Add new warning message for the 'q_shared_multi' counters Sep 28, 2022
…ters in case if they not in COUNTES_DB

Signed-off-by: Vadym Hlushko <[email protected]>
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.

1 participant