Skip to content

[202311] Add multi ASIC support for syslog rate limit feature#3275

Closed
Junchao-Mellanox wants to merge 1 commit intosonic-net:202311from
Junchao-Mellanox:202311-cp-3235
Closed

[202311] Add multi ASIC support for syslog rate limit feature#3275
Junchao-Mellanox wants to merge 1 commit intosonic-net:202311from
Junchao-Mellanox:202311-cp-3235

Conversation

@Junchao-Mellanox
Copy link
Copy Markdown
Collaborator

@Junchao-Mellanox Junchao-Mellanox commented Apr 18, 2024

Backport PR to 202311: #3235
Build dependency: sonic-net/sonic-buildimage#18682

What I did

Add multi ASIC support for syslog rate limit feature

How I did it

  1. show syslog rate-limit-container add a new option namespace
  2. config syslog rate-limit-container add a new option namespace
  3. config syslog rate-limit-feature enable add a new option namespace and a new argument service_name
  4. config syslog rate-limit-feature disable add a new option namespace and a new argument service_name

How to verify it

Manual test

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

show syslog rate-limit-container help:

show syslog rate-limit-container --help
Usage: show syslog rate-limit-container [OPTIONS] <service_name>

  Show syslog rate limit configuration for containers

Options:
  -h, -?, --help  Show this message and exit.

config syslog rate-limit-container help

sudo config syslog rate-limit-container --help
Usage: config syslog rate-limit-container [OPTIONS] SERVICE_NAME

  Configure syslog rate limit for containers

Options:
  -i, --interval INTEGER RANGE  Configures syslog rate limit interval in
                                seconds for specified containers
  -b, --burst INTEGER RANGE     Configures syslog rate limit burst in number
                                of messages for specified containers
  -h, -?, --help                Show this message and exit.

config syslog rate-limit-feature enable help

sudo config syslog rate-limit-feature enable --help
Usage: config syslog rate-limit-feature enable [OPTIONS]

  Enable syslog rate limit feature

Options:
  -?, -h, --help  Show this message and exit.

config syslog rate-limit-feature disable help

sudo config syslog rate-limit-feature disable --help
Usage: config syslog rate-limit-feature disable [OPTIONS]

  Disable syslog rate limit feature

Options:
  -h, -?, --help  Show this message and exit.

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

show syslog rate-limit-container help:

show syslog rate-limit-container --help
Usage: show syslog rate-limit-container [OPTIONS] <service_name>

  Show syslog rate limit configuration for containers

Options:
  -n, --namespace [asic0|asic1|asic2|asic3|default]
                                  Namespace name or all
  -h, -?, --help                  Show this message and exit.

[new] show all config in multi ASIC platforms:

show syslog rate-limit-container 
SERVICE         INTERVAL    BURST
--------------  ----------  -------
database        500         40000
dhcp_relay      300         20000
eventd          300         20000
gnmi            300         20000
lldp            300         20000
mgmt-framework  300         20000
mux             300         20000
nat             300         20000
pmon            50          50000
radv            300         20000
sflow           300         20000
snmp            300         20000


Namespace asic0:
SERVICE    INTERVAL    BURST
---------  ----------  -------
bgp        50          50000
database   500         40000
gbsyncd    300         20000
macsec     300         20000
swss       300         20000
syncd      300         20000
teamd      300         20000


Namespace asic1:
SERVICE    INTERVAL    BURST
---------  ----------  -------
bgp        50          50000
database   50          50000
gbsyncd    300         20000
macsec     300         20000
swss       300         20000
syncd      300         20000
teamd      300         20000


Namespace asic2:
SERVICE    INTERVAL    BURST
---------  ----------  -------
bgp        50          50000
database   50          50000
gbsyncd    300         20000
macsec     300         20000
swss       300         20000
syncd      300         20000
teamd      300         20000


Namespace asic3:
SERVICE    INTERVAL    BURST
---------  ----------  -------
bgp        50          50000
database   50          50000
gbsyncd    300         20000
macsec     300         20000
swss       300         20000
syncd      300         20000
teamd      300         20000

[new] show global namespace configuration:

show syslog rate-limit-container -n default
SERVICE         INTERVAL    BURST
--------------  ----------  -------
database        500         40000
dhcp_relay      300         20000
eventd          300         20000
gnmi            300         20000
lldp            300         20000
mgmt-framework  300         20000
mux             300         20000
nat             300         20000
pmon            50          50000
radv            300         20000
sflow           300         20000
snmp            300         20000

[new] show configuration for a given namespace:

show syslog rate-limit-container -n asic0
Namespace asic0:
SERVICE    INTERVAL    BURST
---------  ----------  -------
bgp        50          50000
database   500         40000
gbsyncd    300         20000
macsec     300         20000
swss       300         20000
syncd      300         20000
teamd      300         20000

config syslog rate-limit-container help:

sudo config syslog rate-limit-container --help
Usage: config syslog rate-limit-container [OPTIONS] SERVICE_NAME

  Configure syslog rate limit for containers

Options:
  -i, --interval INTEGER RANGE    Configures syslog rate limit interval in
                                  seconds for specified containers
  -b, --burst INTEGER RANGE       Configures syslog rate limit burst in number
                                  of messages for specified containers
  -n, --namespace [asic0|asic1|asic2|asic3|default]
                                  Namespace name or all
  -h, -?, --help                  Show this message and exit.

sudo config syslog rate-limit-feature enable help

sudo config syslog rate-limit-feature enable --help
Usage: config syslog rate-limit-feature enable [OPTIONS] [SERVICE_NAME]

  Enable syslog rate limit feature

Options:
  -n, --namespace [asic0|asic1|asic2|asic3|default]
                                  Namespace name or all
  -h, -?, --help                  Show this message and exit.

sudo config syslog rate-limit-feature disable help

sudo config syslog rate-limit-feature disable --help
Usage: config syslog rate-limit-feature disable [OPTIONS] [SERVICE_NAME]

  Disable syslog rate limit feature

Options:
  -n, --namespace [asic0|asic1|asic2|asic3|default]
                                  Namespace name or all
  -h, -?, --help                  Show this message and exit.

* Add multi ASIC support for syslog rate limit feature

* Update command ref
@yxieca
Copy link
Copy Markdown
Contributor

yxieca commented Apr 18, 2024

@Junchao-Mellanox we should not back port feature to 202311. This feature will be picked up by 202405 branch.

@keboliu
Copy link
Copy Markdown
Collaborator

keboliu commented Apr 21, 2024

@Junchao-Mellanox we should not back port feature to 202311. This feature will be picked up by 202405 branch.

Hi @yxieca in the 202311 branch, the syslog rate limit feature has an issue supporting multi ASIC scenarios, these set of PRs is to fix the issue, I suggest to cherry-pick 202311, but it's your call.

@Junchao-Mellanox
Copy link
Copy Markdown
Collaborator Author

Close as we are not going to take this to 202311

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.

3 participants