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

[CRM] CRM utility doesn't validate input value for threshold configuration #2931

Open
oleksandrivantsiv opened this issue Jul 27, 2023 · 0 comments

Comments

@oleksandrivantsiv
Copy link
Collaborator

Description

CRM utility doesn't validate input value for threshold configuration. It allows configuring the following:

  • More than for 100% high and low thresholds
  • Low threshold bigger than a high threshold

Steps to reproduce the issue

  1. Set any threshold type to "percentage"
    # crm config thresholds ipv4 route type percentage
  2. Configure a high threshold with a value bigger than 100%
    # crm config thresholds ipv4 route high 500
  3. Configure a low threshold with a value bigger than the high threshold:
    # crm config thresholds ipv4 route low 600

Describe the results you received

CRM utility allows configuring thresholds with incorrect values:

# crm show thresholds ipv4 route

Resource Name    Threshold Type      Low Threshold    High Threshold
---------------  ----------------  ---------------  ----------------
ipv4_route       percentage                    600               500

Describe the results you expected

CRM utility should not allow configuring thresholds with the incorrect value

Additional information you deem important (e.g. issue happens only occasionally)

Output of show version

# show version

SONiC Software Version: SONiC.master.504-9129a7bf0_Internal
SONiC OS Version: 11
Distribution: Debian 11.7
Kernel: 5.10.0-18-2-amd64
Build commit: 9129a7bf0
Build date: Sun Jul 23 07:09:02 UTC 2023
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

No branches or pull requests

1 participant