Commit 0af7918 1 parent ed82e02 commit 0af7918 Copy full SHA for 0af7918
File tree 2 files changed +7
-4
lines changed
dockers/docker-fpm-frr/frr/supervisord
src/sonic-bgpcfgd/bgpcfgd
2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -206,7 +206,7 @@ dependent_startup_wait_for=bgpd:running
206
206
207
207
{% endif %}
208
208
209
- {% if DEVICE_METADATA . localhost . switch_type is defined and DEVICE_METADATA . localhost . switch_type == "dpu " %}
209
+ {% if FEATURE is defined and FEATURE . software_bfd is defined and FEATURE . software_bfd . state is defined and FEATURE . software_bfd . state == "enabled " %}
210
210
[program:bfdmon]
211
211
command=/usr/local/bin/bfdmon
212
212
priority=6
Original file line number Diff line number Diff line change 5
5
import threading
6
6
import traceback
7
7
8
+ from swsscommon .swsscommon import ConfigDBConnector
8
9
from swsscommon import swsscommon
9
10
from sonic_py_common import device_info
10
11
@@ -88,9 +89,11 @@ def do_work():
88
89
if device_info .is_chassis ():
89
90
managers .append (ChassisAppDbMgr (common_objs , "CHASSIS_APP_DB" , "BGP_DEVICE_GLOBAL" ))
90
91
91
- switch_type = device_info .get_localhost_info ("switch_type" )
92
- if switch_type and switch_type == "dpu" :
93
- log_notice ("switch type is dpu, starting bfd manager" )
92
+ config_db = ConfigDBConnector ()
93
+ config_db .connect ()
94
+ features = config_db .get_table ('FEATURE' )
95
+ if 'software_bfd' in features and 'state' in features ['software_bfd' ] and features ['software_bfd' ]['state' ] == 'enabled' :
96
+ log_notice ("software_bfd feature is enabled, starting bfd manager" )
94
97
managers .append (BfdMgr (common_objs , "STATE_DB" , swsscommon .STATE_BFD_SOFTWARE_SESSION_TABLE_NAME ))
95
98
96
99
runner = Runner (common_objs ['cfg_mgr' ])
You can’t perform that action at this time.
0 commit comments