Skip to content

Commit

Permalink
Preserve copp tables through DB migration (sonic-net#2524)
Browse files Browse the repository at this point in the history
This PR should be merged together with sonic-net/sonic-swss#2548 and is required to 202205 and 202211.
This PR implements [fastboot] Preserve CoPP table HLD to improve fastboot flow (sonic-net/SONiC#1107).

- What I did
Preserve COPP table contents through DB migration. (Mellanox only)

- How I did it
Skipped deleting of COPP tables in DB migrator.

- How to verify it
Observe COPP table contents are preserved right after reboot.
  • Loading branch information
arfeigin authored and isabelmsft committed Mar 23, 2023
1 parent c236b83 commit 68a11e7
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion scripts/db_migrator.py
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,12 @@ def common_migration_ops(self):
new_cfg = {**init_cfg, **curr_cfg}
self.configDB.set_entry(init_cfg_table, key, new_cfg)

self.migrate_copp_table()
# Avoiding copp table migration is platform specific at the moment as I understood this might cause issues for some
# vendors, probably Broadcom. This change can be checked with any specific vendor and if this works fine the platform
# condition can be modified and extend. If no vendor has an issue with not clearing copp tables the condition can be
# removed together with calling to migrate_copp_table function.
if self.asic_type != "mellanox":
self.migrate_copp_table()
if self.asic_type == "broadcom" and 'Force10-S6100' in self.hwsku:
self.migrate_mgmt_ports_on_s6100()
else:
Expand Down

0 comments on commit 68a11e7

Please sign in to comment.