Description
On Broadcom DNX (VOQ) platforms, show queue watermark all and
show queue persistent-watermark all fail with a hard error:
admin@sonic:~$ show queue watermark all
Object map is empty!
(exit code 1)
These platforms type their queues as UC/MC and do not expose
SAI_QUEUE_TYPE_ALL queues, so the q_shared_all object map built from
COUNTERS_QUEUE_NAME_MAP is empty. watermarkstat treats an empty object
map for q_shared_all as a fatal error.
show queue watermark unicast works fine and reports real values, so this
is specifically the all aggregation that is broken on these platforms.
Steps to reproduce
- On a Broadcom DNX / VOQ platform (e.g. Q3D / Jericho family):
show queue watermark all
show queue persistent-watermark all
Expected behavior
Either emit a friendly message and exit 0 (consistent with the
q_shared_multi behavior added in #2408), e.g.:
Object map from the COUNTERS_DB is empty because queue type ALL is not configured in the CONFIG_DB!
…or otherwise degrade gracefully rather than erroring out.
Actual behavior
Object map is empty! printed to stderr, command exits 1.
Root cause
In scripts/watermarkstat, build_header() only special-cases the empty
object map for q_shared_multi; every other type (including q_shared_all)
falls through to sys.exit(1):
if len(header_idx_set) == 0:
if counter_type != 'q_shared_multi':
print("Object map is empty!", file=sys.stderr)
sys.exit(1)
else:
print("Object map from the COUNTERS_DB is empty because the multicast queues are not configured in the CONFIG_DB!")
sys.exit(0)
Suggested fix: extend the graceful branch to also cover q_shared_all.
Affected commands
show queue watermark all
show queue persistent-watermark all
Platform / version
- ASIC: Broadcom DNX (VOQ), e.g. Qumran3D (BCM8887X)
- Reproduced on a 202511-based image
Related
Description
On Broadcom DNX (VOQ) platforms,
show queue watermark allandshow queue persistent-watermark allfail with a hard error:(exit code 1)
These platforms type their queues as UC/MC and do not expose
SAI_QUEUE_TYPE_ALLqueues, so theq_shared_allobject map built fromCOUNTERS_QUEUE_NAME_MAPis empty.watermarkstattreats an empty objectmap for
q_shared_allas a fatal error.show queue watermark unicastworks fine and reports real values, so thisis specifically the
allaggregation that is broken on these platforms.Steps to reproduce
show queue watermark allshow queue persistent-watermark allExpected behavior
Either emit a friendly message and exit 0 (consistent with the
q_shared_multibehavior added in #2408), e.g.:…or otherwise degrade gracefully rather than erroring out.
Actual behavior
Object map is empty!printed to stderr, command exits 1.Root cause
In
scripts/watermarkstat,build_header()only special-cases the emptyobject map for
q_shared_multi; every other type (includingq_shared_all)falls through to
sys.exit(1):Suggested fix: extend the graceful branch to also cover
q_shared_all.Affected commands
show queue watermark allshow queue persistent-watermark allPlatform / version
Related
q_shared_multi(precedent for the fix)allparameter toshow/clear queue watermarkcommand #1149 — original PR adding theallparameter