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

[COPP] COPP config isn't updated after config_reload #9103

Closed
AndriiLozovyi opened this issue Oct 28, 2021 · 2 comments
Closed

[COPP] COPP config isn't updated after config_reload #9103

AndriiLozovyi opened this issue Oct 28, 2021 · 2 comments

Comments

@AndriiLozovyi
Copy link

Description

Starting from SONiC.master.43510-dirty-20211014.091725 COPP configuration doesn't updates, after changing /etc/sonic/copp_cfg.json and performing config_reload, COPP isn't updated in APP_DB and ASIC_DB. On previous image SONiC.master.43029-dirty-20211012.080803 everything is working as expected.

Steps to reproduce the issue:

  1. sudo cp /etc/sonic/copp_cfg.json /tmp/base_copp_config.json (save original copp config)
  2. sudo vi /tmp/copp_config.json
  3. Content of copp_config.json
{"COPP_GROUP": {"default": {"cbs": "600", "queue": "0", "cir": "600", "meter_type": "packets", "mode": "sr_tcm", "red_action": "drop"}, "queue1_group2": {"cbs": "600", "trap_action": "trap", "queue": "1", "cir": "600", "meter_type": "packets", "mode": "sr_tcm", "trap_priority": "1", "red_action": "drop"}, "queue1_group1": {"cbs": "600", "trap_action": "trap", "queue": "1", "cir": "600", "meter_type": "packets", "mode": "sr_tcm", "trap_priority": "1", "red_action": "drop"}, "queue4_group1": {"queue": "4", "trap_action": "trap", "trap_priority": "4"}, "queue4_group2": {"cbs": "600", "trap_action": "copy", "queue": "4", "cir": "600", "meter_type": "packets", "mode": "sr_tcm", "trap_priority": "4", "red_action": "drop"}, "queue4_group3": {"queue": "4", "trap_action": "trap", "trap_priority": "4"}, "queue2_group1": {"cir": "600", "trap_action": "trap", "genetlink_name": "psample", "queue": "2", "cbs": "600", "meter_type": "packets", "mode": "sr_tcm", "trap_priority": "1", "genetlink_mcgrp_name": "packets", "red_action": "drop"}}, "COPP_TRAP": {"arp": {"trap_ids": "arp_req,arp_resp,neigh_discovery", "trap_group": "queue4_group2"}, "lacp": {"trap_ids": "lacp", "trap_group": "queue4_group1"}, "sflow": {"trap_ids": "sample_packet", "trap_group": "queue2_group1"}, "macsec": {"trap_ids": "eapol", "trap_group": "queue4_group3"}, "bgp": {"trap_ids": "bgp,bgpv6", "trap_group": "queue4_group1"}, "dhcp_relay": {"trap_ids": "dhcp,dhcpv6", "trap_group": "queue4_group3"}, "nat": {"trap_ids": "src_nat_miss,dest_nat_miss", "trap_group": "queue1_group2"}, "udld": {"trap_ids": "udld", "trap_group": "queue4_group3"}, "ip2me": {"trap_ids": "ip2me", "trap_group": "queue1_group1"}, "lldp": {"trap_ids": "lldp", "trap_group": "queue4_group3"}}}
  1. sudo cp /tmp/copp_config.json /etc/sonic/copp_cfg.json
  2. sudo config reload -y -f
  3. dump state copp ip2me --key-map --db ASIC_DB
  4. redis-cli -n 1 hgetall 'ASIC_STATE:SAI_OBJECT_TYPE_POLICER:oid:{oid}'
  5. redis-cli -n 0 hgetall 'COPP_TABLE:queue1_group1'

Describe the results you received:

COPP config isn't updated in ASIC_DB and APP_DB
Results on SONiC.master.43510-dirty-20211014.091725

~$ redis-cli -n 1 hgetall 'ASIC_STATE:SAI_OBJECT_TYPE_POLICER:oid:{oid}'
 1) "SAI_POLICER_ATTR_CBS"
 2) "6000"
 3) "SAI_POLICER_ATTR_CIR"
 4) "6000"
 5) "SAI_POLICER_ATTR_METER_TYPE"
 6) "SAI_METER_TYPE_PACKETS"
 7) "SAI_POLICER_ATTR_MODE"
 8) "SAI_POLICER_MODE_SR_TCM"
 9) "SAI_POLICER_ATTR_RED_PACKET_ACTION"
10) "SAI_PACKET_ACTION_DROP"
~$ redis-cli -n 0 hgetall 'COPP_TABLE:queue1_group1'
 1) "cbs"
 2) "6000"
 3) "cir"
 4) "6000"
 5) "meter_type"
 6) "packets"
 7) "mode"
 8) "sr_tcm"
 9) "queue"
10) "1"
11) "red_action"
12) "drop"
13) "trap_action"
14) "trap"
15) "trap_priority"
16) "1"
17) "trap_ids"
18) "ip2me"

Describe the results you expected:

COPP config updated according to content of copp_config.json
For comparison results on SONiC.master.43029-dirty-20211012.080803

~$ redis-cli -n 1 hgetall 'ASIC_STATE:SAI_OBJECT_TYPE_POLICER:oid:{oid}'
1) "SAI_POLICER_ATTR_CBS"
2) "600"
3) "SAI_POLICER_ATTR_CIR"
4) "600"
5) "SAI_POLICER_ATTR_METER_TYPE"
6) "SAI_METER_TYPE_PACKETS"
7) "SAI_POLICER_ATTR_MODE"
8) "SAI_POLICER_MODE_SR_TCM"
9) "SAI_POLICER_ATTR_RED_PACKET_ACTION"
10) "SAI_PACKET_ACTION_DROP"
~$ redis-cli -n 0 hgetall 'COPP_TABLE:queue1_group1'
1) "cbs"
2) "600"
3) "cir"
4) "600"
5) "meter_type"
6) "packets"
7) "mode"
8) "sr_tcm"
9) "queue"
10) "1"
11) "red_action"
12) "drop"
13) "trap_action"
14) "trap"
15) "trap_priority"
16) "1"
17) "trap_ids"
18) "ip2me"

Output of show version:

SONiC Software Version: SONiC.master.43510-dirty-20211014.091725
Distribution: Debian 10.11
Kernel: 4.19.0-12-2-amd64
Build commit: b9366f3f8
Build date: Thu Oct 14 15:11:38 UTC 2021
Built by: AzDevOps@sonic-build-workers-000SG3

Platform: x86_64-arista_7170_64c
HwSKU: Arista-7170-64C

Output of show techsupport:

(paste your output here or download and attach the file here )

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

@yxieca
Copy link
Contributor

yxieca commented Oct 28, 2021

This is intended. #8969 fixed the issue where copp rules could be either rendered too earlier or not rendered after config change.

You will need to change the copp_cfg.json.j2 to apply copp changes.

@AndriiLozovyi
Copy link
Author

Thanks for answer, closing this ticket.

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

2 participants