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

[Mellanox] [202311] Add CMIS Host Management Files to 'show techsupport' Dumps #5

Open
wants to merge 71 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
b317250
[sflow][db_migrator] Egress Sflow support (#3020)
rajkumar38 Nov 28, 2023
b5daf5d
[dhcp_relay] Fix dhcp_relay counter display issue (#3054)
yaqiangz Nov 29, 2023
71514ea
Revert "Run yang validation in unit test (#3025)" (#3055)
yxieca Nov 30, 2023
1b1402f
[hash]: Add ECMP/LAG hash algorithm CLI (#3036)
nazariig Dec 1, 2023
fba4bf0
[202311][db_migrator] add db migrator version space for 202305/202311…
yxieca Dec 21, 2023
72b6c04
Support disable/enable syslog rate limit feature (#3072)
Junchao-Mellanox Dec 25, 2023
cb0fd42
[202311] Collect module EEPROM data in dump (#3009) (#3124)
Junchao-Mellanox Jan 18, 2024
7a242ee
[202311] Support reading/writing module EEPROM data by page and offse…
Junchao-Mellanox Jan 19, 2024
e70b054
[202311] Revert bgp suppress fib pending (#3109)
stepanblyschak Jan 24, 2024
e9ae14d
Support golden config in db migrator (#3076)
ganglyu Dec 22, 2023
9c1d489
Fix database initialization for db_migrator (#3100)
ganglyu Dec 25, 2023
be6224a
[202311] Migrate GNMI table (#3138)
ganglyu Feb 1, 2024
f4b5ef2
Add all SKUs to the generic config update list (#3131)
stephenxs Jan 25, 2024
8862c11
Modify teamd retry count script to base BGP status on default BGP sta…
saiarcot895 Dec 14, 2023
1515edc
[db_migrator]Remove route migration (#3068)
dgsudharsan Dec 15, 2023
555ecf6
[chassis]: Support show ip bgp summary to display without error when …
arlakshm Jan 5, 2024
88c027f
[Techsupport]Adding more FRR and BGP dumps (#3118)
dgsudharsan Jan 12, 2024
fbd6c91
Disable Key Validation feature during sonic-installation for Cisco Pl…
selvipal Jan 11, 2024
2046e66
Reduce generate_dump mem usage for cores (#3052)
davidm-arista Dec 8, 2023
31a6584
Fix `sudo config load_mgmt_config` fails with error "File /var/run/dh…
maipbui Feb 6, 2024
54595c1
[202311]Fix the sfputil treats page number as decimal instead of hexa…
dgsudharsan Feb 9, 2024
b212576
[chassis] fix show bgp summary when no neighbors are present on one A…
arlakshm Feb 8, 2024
c711b06
[Mellanox buffer migrator] Do not touch the buffer model on generic S…
stephenxs Feb 5, 2024
02ae33f
Modify transceiver PM CLI to handle N/A value for DOM threshold (#3174)
mihirpat1 Feb 28, 2024
b2bea12
CLI enhancements to revtrieve data from TRANSCEIVER_FIRMWARE_INFO tab…
mihirpat1 Feb 28, 2024
9d5daca
CLI to skip polling for periodic information for a port in DomInfoUpd…
mihirpat1 Mar 7, 2024
c68f4b1
Skip the validation of action in acl-loader if capability table in ST…
bingwang-ms Mar 11, 2024
3236fbf
[show] Update show run all to cover all asic config in multiasic (#31…
mssonicbld Mar 21, 2024
943a684
Update port2alias (#3217)
abdosi Mar 20, 2024
a58b78c
[config] Add YANG alerting for override (#3188)
wen587 Mar 8, 2024
db36df2
[Bug] Fix fw_setenv illegel character issue (#3201)
xumia Mar 9, 2024
f4ef768
[fast/warm-reboot] Put ERR message in syslog when a failure is seen (…
vaibhavhd Mar 2, 2024
5bfc3b4
[Techsupport]Handle SAI kv pair if present in sai common profile (#3196)
dgsudharsan Mar 13, 2024
86f3de5
[ipintutil]Handle exception in show ip interfaces command (#3182)
dgsudharsan Mar 18, 2024
fb4a090
[config] Add Table hard dependency check (#3159)
wen587 Mar 7, 2024
faffd73
Modify "show interface transceiver status" CLI to show SW cmis state …
mihirpat1 Mar 25, 2024
a056e9d
[dualtor_neighbor_check] Fix the script not exists issue (#3244)
lolyu Apr 1, 2024
ea42cb9
[show] multi-asic show running test residue (#3198)
wen587 Mar 8, 2024
3db0245
[generate_dump] call hw-management-generate-dump.sh in collect_cisco_…
gvlaemyn Apr 2, 2024
21f69fb
[graceful reboot] Add watchdog, add execution of pre_reboot_hook, fix…
vadymhlushko-mlnx Apr 12, 2024
d52dc8e
Display target firmware version through CLI (#3274)
mihirpat1 Apr 25, 2024
4eb04c3
Add vlan validation in config interface ip add command (#3155)
matiAlfaro Feb 29, 2024
515e78e
[fast/warm-reboot] Retain TRANSCEIVER_INFO tables on fast/warm-reboot…
stepanblyschak Apr 19, 2024
265c9b3
[Mellanox] Support new platform SN5400 in generic configuration updat…
DavidZagury Apr 18, 2024
60a0db8
[chassis][midplane] Add notification to Supervisor when LC is gracefu…
mlok-nokia May 15, 2024
2d557ff
Update sonic-utilities to support new SKU Mellanox-SN5600-O128 (#3236)
stephenxs Apr 29, 2024
3e1ae91
Migrate AAA table in db_migrator (#3284)
liuh-80 Apr 29, 2024
34f01f9
Migrate AAA table per-command authorization in db_migrator (#3296)
liuh-80 May 15, 2024
673da6b
[cherry-pick][202311] Show running config when bgp is down (#3315)
wen587 May 21, 2024
804e053
[sonic-package-manager] remove leftovers from featured on uninstall (…
stepanblyschak May 22, 2024
ce699c4
[build] Fix base OS compilation issue caused by incompatibility betwe…
oleksandrivantsiv May 28, 2024
f35453e
Backup STATE_DB PORT_TABLE|Ethernet during warm-reboot (#3111)
mihirpat1 May 30, 2024
735891c
[Mellanpx] Update SDK Sniffer default folder (#3276)
dprital May 7, 2024
0af03e7
[Mellanox] Update sonic-utilities to support new SKU Mellanox-SN5600-…
DavidZagury May 22, 2024
68f89d6
[DPB]Fixing return code of breakout command on failure (#3357)
dgsudharsan Jun 10, 2024
ea9497a
[consutil] Fix consule CLI and enhance unittest (#3360)
lizhijianrd Jun 9, 2024
06fcbc7
Update TRANSCEIVER_FIRMWARE_INFO table for all targets in sfputil (#3…
mihirpat1 Jun 18, 2024
2d7c6cd
Fix double hex to decimal conversion (#3267)
yuazhe Apr 19, 2024
4f7825a
Improve load_mingraph to wait eth0 restart before exit (#3365) (#3372)
liuh-80 Jun 21, 2024
604081f
[fast-reboot] Backup database after syncd/swss stopped (#3342)
stepanblyschak Jun 24, 2024
f478420
[pbh]: Fix show PBH counters when cache is partial (#3356)
nazariig Jun 27, 2024
2bc1ef6
[DPB]Fix return code in case of failure (#3389)
dgsudharsan Jul 1, 2024
b32eb6c
fix show techsupport date issue (#3437)
ganglyu Jul 23, 2024
c29f0c6
[sfputil] Add loopback sub-command for debugging and module diagnosti…
xinyulin Jul 31, 2024
d472aaa
Add the definition of `log` in `script decode-syseeprom` (#3383)
yutongzhang-microsoft Jun 21, 2024
3bdaca0
[Mellanox] Add support for Mellanox-SN4700-O32 and Mellanox-SN4700-V6…
ayurkiv-nvda Aug 13, 2024
e972771
Added CMIS host management-related files to the show techsupport dumps
tshalvi Aug 22, 2024
9f12af7
Refactor: move variable declarations to function start, update comman…
tshalvi Aug 25, 2024
98a8dbf
Moved logic from collect_mellanox_dfw_dumps() to collect_mellanox() a…
tshalvi Aug 26, 2024
e6c8c00
Update file path for sai.profile
tshalvi Aug 26, 2024
6a27b47
Variable renaming
tshalvi Aug 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 17 additions & 11 deletions acl_loader/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -413,17 +413,17 @@ def parse_acl_json(filename):
raise AclLoaderException("Invalid input file %s" % filename)
return yang_acl

def load_rules_from_file(self, filename):
def load_rules_from_file(self, filename, skip_action_validation=False):
"""
Load file with ACL rules configuration in openconfig ACL format. Convert rules
to Config DB schema.
:param filename: File in openconfig ACL format
:return:
"""
self.yang_acl = AclLoader.parse_acl_json(filename)
self.convert_rules()
self.convert_rules(skip_action_validation)

def convert_action(self, table_name, rule_idx, rule):
def convert_action(self, table_name, rule_idx, rule, skip_validation=False):
rule_props = {}

if rule.actions.config.forwarding_action == "ACCEPT":
Expand Down Expand Up @@ -452,13 +452,13 @@ def convert_action(self, table_name, rule_idx, rule):
raise AclLoaderException("Unknown rule action {} in table {}, rule {}".format(
rule.actions.config.forwarding_action, table_name, rule_idx))

if not self.validate_actions(table_name, rule_props):
if not self.validate_actions(table_name, rule_props, skip_validation):
raise AclLoaderException("Rule action {} is not supported in table {}, rule {}".format(
rule.actions.config.forwarding_action, table_name, rule_idx))

return rule_props

def validate_actions(self, table_name, action_props):
def validate_actions(self, table_name, action_props, skip_validation=False):
if self.is_table_control_plane(table_name):
return True

Expand All @@ -481,6 +481,11 @@ def validate_actions(self, table_name, action_props):
else:
aclcapability = self.statedb.get_all(self.statedb.STATE_DB, "{}|{}".format(self.ACL_STAGE_CAPABILITY_TABLE, stage.upper()))
switchcapability = self.statedb.get_all(self.statedb.STATE_DB, "{}|switch".format(self.SWITCH_CAPABILITY_TABLE))
# In the load_minigraph path, it's possible that the STATE_DB entry haven't pop up because orchagent is stopped
# before loading acl.json. So we skip the validation if any table is empty
if skip_validation and (not aclcapability or not switchcapability):
warning("Skipped action validation as capability table is not present in STATE_DB")
return True
for action_key in dict(action_props):
action_list_key = self.ACL_ACTIONS_CAPABILITY_FIELD
if action_list_key not in aclcapability:
Expand Down Expand Up @@ -699,7 +704,7 @@ def validate_rule_fields(self, rule_props):
if ("ICMPV6_TYPE" in rule_props or "ICMPV6_CODE" in rule_props) and protocol != 58:
raise AclLoaderException("IP_PROTOCOL={} is not ICMPV6, but ICMPV6 fields were provided".format(protocol))

def convert_rule_to_db_schema(self, table_name, rule):
def convert_rule_to_db_schema(self, table_name, rule, skip_action_validation=False):
"""
Convert rules format from openconfig ACL to Config DB schema
:param table_name: ACL table name to which rule belong
Expand Down Expand Up @@ -729,7 +734,7 @@ def convert_rule_to_db_schema(self, table_name, rule):
elif self.is_table_l3(table_name):
rule_props["ETHER_TYPE"] = str(self.ethertype_map["ETHERTYPE_IPV4"])

deep_update(rule_props, self.convert_action(table_name, rule_idx, rule))
deep_update(rule_props, self.convert_action(table_name, rule_idx, rule, skip_action_validation))
deep_update(rule_props, self.convert_l2(table_name, rule_idx, rule))
deep_update(rule_props, self.convert_ip(table_name, rule_idx, rule))
deep_update(rule_props, self.convert_icmp(table_name, rule_idx, rule))
Expand Down Expand Up @@ -761,7 +766,7 @@ def deny_rule(self, table_name):
return {} # Don't add default deny rule if table is not [L3, L3V6]
return rule_data

def convert_rules(self):
def convert_rules(self, skip_aciton_validation=False):
"""
Convert rules in openconfig ACL format to Config DB schema
:return:
Expand All @@ -780,7 +785,7 @@ def convert_rules(self):
for acl_entry_name in acl_set.acl_entries.acl_entry:
acl_entry = acl_set.acl_entries.acl_entry[acl_entry_name]
try:
rule = self.convert_rule_to_db_schema(table_name, acl_entry)
rule = self.convert_rule_to_db_schema(table_name, acl_entry, skip_aciton_validation)
deep_update(self.rules_info, rule)
except AclLoaderException as ex:
error("Error processing rule %s: %s. Skipped." % (acl_entry_name, ex))
Expand Down Expand Up @@ -1149,8 +1154,9 @@ def update(ctx):
@click.option('--session_name', type=click.STRING, required=False)
@click.option('--mirror_stage', type=click.Choice(["ingress", "egress"]), default="ingress")
@click.option('--max_priority', type=click.INT, required=False)
@click.option('--skip_action_validation', is_flag=True, default=False, help="Skip action validation")
@click.pass_context
def full(ctx, filename, table_name, session_name, mirror_stage, max_priority):
def full(ctx, filename, table_name, session_name, mirror_stage, max_priority, skip_action_validation):
"""
Full update of ACL rules configuration.
If a table_name is provided, the operation will be restricted in the specified table.
Expand All @@ -1168,7 +1174,7 @@ def full(ctx, filename, table_name, session_name, mirror_stage, max_priority):
if max_priority:
acl_loader.set_max_priority(max_priority)

acl_loader.load_rules_from_file(filename)
acl_loader.load_rules_from_file(filename, skip_action_validation)
acl_loader.full_update()


Expand Down
7 changes: 7 additions & 0 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,13 @@ stages:
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-bullseye:$(BUILD_BRANCH)

steps:
- script: |
set -ex
sudo apt-get update
sudo apt-get install -y python3-pip
sudo pip3 install requests==2.31.0
displayName: "Install dependencies"

- script: |
sourceBranch=$(Build.SourceBranchName)
if [[ "$(Build.Reason)" == "PullRequest" ]];then
Expand Down
Loading