-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[config] Fix 'config reload -l' command to get filename by default (#…
…1611) Fix #7433 Right now config reload -l is getting failed due to an error. I guess the problem is here in sonic-utilities repo. If user does not provide filename with config reload -l, command = "{} -j {} -v DEVICE_METADATA.localhost.hwsku".format(SONIC_CFGGEN_PATH, filename) will not provide cfg_hwsku i.e. hwsku parameter as it should which will later cause problem here command = "{} -H -k {} --write-to-db".format(SONIC_CFGGEN_PATH, cfg_hwsku) as hwsku is not available around that time. that's why we notice errors like No such file or directory: 'None' as pasted in this issue. - How I did it To Fix the issue, moved the part where the code gets cfg_hwsku command = "{} -j {} -v DEVICE_METADATA.localhost.hwsku".format(SONIC_CFGGEN_PATH, file) to the same location it needed as we get filename by default. - How to verify it 'sudo config reload -l' Added test cases. Signed-off-by: Sangita Maity <samaity@linkedin.com>
- Loading branch information
Sangita Maity
authored
Dec 23, 2021
1 parent
ed2fa69
commit 1a2a9a3
Showing
4 changed files
with
221 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{ | ||
"DEVICE_METADATA": { | ||
"localhost": { | ||
"docker_routing_config_mode": "split", | ||
"hostname": "sonic", | ||
"hwsku": "Seastone-DX010-25-50", | ||
"mac": "00:e0:ec:89:6e:48", | ||
"platform": "x86_64-cel_seastone-r0", | ||
"type": "ToRRouter" | ||
} | ||
}, | ||
"VLAN_MEMBER": { | ||
"Vlan1000|Ethernet0": { | ||
"tagging_mode": "untagged" | ||
}, | ||
"Vlan1000|Ethernet4": { | ||
"tagging_mode": "untagged" | ||
}, | ||
"Vlan1000|Ethernet8": { | ||
"tagging_mode": "untagged" | ||
} | ||
}, | ||
"VLAN": { | ||
"Vlan1000": { | ||
"vlanid": "1000", | ||
"dhcp_servers": [ | ||
"192.0.0.1", | ||
"192.0.0.2", | ||
"192.0.0.3", | ||
"192.0.0.4" | ||
] | ||
} | ||
}, | ||
"PORT": { | ||
"Ethernet0": { | ||
"alias": "Eth1", | ||
"lanes": "65, 66, 67, 68", | ||
"description": "Ethernet0 100G link", | ||
"speed": "100000" | ||
}, | ||
"Ethernet4": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/4", | ||
"description": "Servers0:eth0", | ||
"index": "1", | ||
"lanes": "29,30,31,32", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000" | ||
}, | ||
"Ethernet8": { | ||
"admin_status": "up", | ||
"alias": "fortyGigE0/8", | ||
"description": "Servers1:eth0", | ||
"index": "2", | ||
"lanes": "33,34,35,36", | ||
"mtu": "9100", | ||
"pfc_asym": "off", | ||
"speed": "40000" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ | ||
"DEVICE_METADATA": { | ||
"localhost": { | ||
"buffer_model": "traditional", | ||
"default_bgp_status": "up", | ||
"default_pfcwd_status": "disable" | ||
} | ||
}, | ||
"CRM": { | ||
"Config": { | ||
"polling_interval": "300", | ||
"ipv4_route_threshold_type": "percentage", | ||
"ipv4_route_low_threshold": "70", | ||
"ipv4_route_high_threshold": "85", | ||
"ipv6_route_threshold_type": "percentage", | ||
"ipv6_route_low_threshold": "70", | ||
"ipv6_route_high_threshold": "85", | ||
"ipv4_nexthop_threshold_type": "percentage", | ||
"ipv4_nexthop_low_threshold": "70", | ||
"ipv4_nexthop_high_threshold": "85", | ||
"ipv6_nexthop_threshold_type": "percentage", | ||
"ipv6_nexthop_low_threshold": "70", | ||
"ipv6_nexthop_high_threshold": "85", | ||
"ipv4_neighbor_threshold_type": "percentage", | ||
"ipv4_neighbor_low_threshold": "70", | ||
"ipv4_neighbor_high_threshold": "85", | ||
"ipv6_neighbor_threshold_type": "percentage", | ||
"ipv6_neighbor_low_threshold": "70", | ||
"ipv6_neighbor_high_threshold": "85", | ||
"nexthop_group_member_threshold_type": "percentage", | ||
"nexthop_group_member_low_threshold": "70", | ||
"nexthop_group_member_high_threshold": "85", | ||
"nexthop_group_threshold_type": "percentage", | ||
"nexthop_group_low_threshold": "70", | ||
"nexthop_group_high_threshold": "85", | ||
"acl_table_threshold_type": "percentage", | ||
"acl_table_low_threshold": "70", | ||
"acl_table_high_threshold": "85", | ||
"acl_group_threshold_type": "percentage", | ||
"acl_group_low_threshold": "70", | ||
"acl_group_high_threshold": "85", | ||
"acl_entry_threshold_type": "percentage", | ||
"acl_entry_low_threshold": "70", | ||
"acl_entry_high_threshold": "85", | ||
"acl_counter_threshold_type": "percentage", | ||
"acl_counter_low_threshold": "70", | ||
"acl_counter_high_threshold": "85", | ||
"fdb_entry_threshold_type": "percentage", | ||
"fdb_entry_low_threshold": "70", | ||
"fdb_entry_high_threshold": "85", | ||
"snat_entry_threshold_type": "percentage", | ||
"snat_entry_low_threshold": "70", | ||
"snat_entry_high_threshold": "85", | ||
"dnat_entry_threshold_type": "percentage", | ||
"dnat_entry_low_threshold": "70", | ||
"dnat_entry_high_threshold": "85", | ||
"ipmc_entry_threshold_type": "percentage", | ||
"ipmc_entry_low_threshold": "70", | ||
"ipmc_entry_high_threshold": "85", | ||
"mpls_inseg_threshold_type": "percentage", | ||
"mpls_inseg_low_threshold": "70", | ||
"mpls_inseg_high_threshold": "85", | ||
"mpls_nexthop_threshold_type": "percentage", | ||
"mpls_nexthop_low_threshold": "70", | ||
"mpls_nexthop_high_threshold": "85" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters