File tree 2 files changed +14
-1
lines changed
src/sonic-py-common/sonic_py_common
2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change 23
23
from sonic_py_common import daemon_base
24
24
from swsscommon import swsscommon
25
25
from sonic_py_common .interface import inband_prefix , recirc_prefix
26
+ from sonic_py_common import device_info
27
+
26
28
except ImportError as err :
27
29
raise ImportError ("%s - required module not found" % str (err ))
28
30
@@ -357,7 +359,8 @@ def run_cmd(self, cmd):
357
359
358
360
def check_timeout (self , start_time ):
359
361
if time .time () - start_time > PORT_INIT_TIMEOUT :
360
- self .log_error ("Port init timeout reached ({} seconds), resuming lldpd..." .format (PORT_INIT_TIMEOUT ))
362
+ if device_info .is_frontend_port_present_in_host ():
363
+ self .log_error ("Port init timeout reached ({} seconds), resuming lldpd..." .format (PORT_INIT_TIMEOUT ))
361
364
return True
362
365
return False
363
366
Original file line number Diff line number Diff line change @@ -682,3 +682,13 @@ def is_fast_reboot_enabled():
682
682
683
683
state_db .close (state_db .STATE_DB )
684
684
return fb_enable_state
685
+
686
+
687
+ def is_frontend_port_present_in_host ():
688
+ if is_supervisor ():
689
+ return False
690
+ if is_multi_npu ():
691
+ namespace_id = os .getenv ("NAMESPACE_ID" )
692
+ if not namespace_id :
693
+ return False
694
+ return True
You can’t perform that action at this time.
0 commit comments