Skip to content

Commit 995cf39

Browse files
authored
[config] Restart telemetry service upon config (re)load (sonic-net#992)
Add telemetry service to the list of services to stop/reset-failed/restart during config load/reload operations.
1 parent 82dfe50 commit 995cf39

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

config/main.py

+10-4
Original file line numberDiff line numberDiff line change
@@ -548,8 +548,10 @@ def _get_disabled_services_list():
548548

549549

550550
def _stop_services():
551+
# This list is order-dependent. Please add services in the order they should be stopped
551552
# on Mellanox platform pmon is stopped by syncd
552553
services_to_stop = [
554+
'telemetry',
553555
'restapi',
554556
'swss',
555557
'lldp',
@@ -566,30 +568,33 @@ def _stop_services():
566568

567569

568570
def _reset_failed_services():
571+
# This list is order-independent. Please keep list in alphabetical order
569572
services_to_reset = [
570573
'bgp',
571574
'dhcp_relay',
572575
'hostcfgd',
573576
'hostname-config',
574577
'interfaces-config',
575578
'lldp',
579+
'nat',
576580
'ntp-config',
577581
'pmon',
578582
'radv',
583+
'restapi',
579584
'rsyslog-config',
585+
'sflow',
580586
'snmp',
581587
'swss',
582588
'syncd',
583589
'teamd',
584-
'nat',
585-
'sflow',
586-
'restapi'
590+
'telemetry'
587591
]
588592

589593
execute_systemctl(services_to_reset, SYSTEMCTL_ACTION_RESET_FAILED)
590594

591595

592596
def _restart_services():
597+
# This list is order-dependent. Please add services in the order they should be started
593598
# on Mellanox platform pmon is started by syncd
594599
services_to_restart = [
595600
'hostname-config',
@@ -603,7 +608,8 @@ def _restart_services():
603608
'hostcfgd',
604609
'nat',
605610
'sflow',
606-
'restapi'
611+
'restapi',
612+
'telemetry'
607613
]
608614

609615
disable_services = _get_disabled_services_list()

0 commit comments

Comments
 (0)