Skip to content

Commit

Permalink
[bgp] Add dependency in bgpcfgd (sonic-net#19088)
Browse files Browse the repository at this point in the history
Why I did it
These 2 dependencies were removed by sonic-net#18764 and sonic-net#18727 for decoupling hard dependency between Loopback IPv4 address and BGP.
Actually, these dependencies are to make sure existence of Loopback interface, no need to remove.

Work item tracking
Microsoft ADO (number only): 28210625
How I did it
Add dependency back

How to verify it
UT passed.
  • Loading branch information
yaqiangz committed May 28, 2024
1 parent 3debe78 commit d1875c6
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sonic-bgpcfgd/bgpcfgd/managers_bgp.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def __init__(self, common_objs, db_name, table_name, peer_type, check_neig_meta)

deps = [
("CONFIG_DB", swsscommon.CFG_DEVICE_METADATA_TABLE_NAME, "localhost/bgp_asn"),
("CONFIG_DB", swsscommon.CFG_LOOPBACK_INTERFACE_TABLE_NAME, "Loopback0"),
("CONFIG_DB", swsscommon.CFG_BGP_DEVICE_GLOBAL_TABLE_NAME, "tsa_enabled"),
("LOCAL", "local_addresses", ""),
("LOCAL", "interfaces", ""),
Expand All @@ -128,6 +129,9 @@ def __init__(self, common_objs, db_name, table_name, peer_type, check_neig_meta)
if self.check_deployment_id:
deps.append(("CONFIG_DB", swsscommon.CFG_DEVICE_METADATA_TABLE_NAME, "localhost/deployment_id"))

if self.peer_type == 'internal':
deps.append(("CONFIG_DB", swsscommon.CFG_LOOPBACK_INTERFACE_TABLE_NAME, "Loopback4096"))

super(BGPPeerMgrBase, self).__init__(
common_objs,
deps,
Expand Down

0 comments on commit d1875c6

Please sign in to comment.