Skip to content

Commit

Permalink
[config] Restart telemetry service upon config (re)load (#992)
Browse files Browse the repository at this point in the history
Add telemetry service to the list of services to stop/reset-failed/restart during config load/reload operations.
  • Loading branch information
jleveque authored Jul 21, 2020
1 parent 82dfe50 commit 995cf39
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,8 +548,10 @@ def _get_disabled_services_list():


def _stop_services():
# This list is order-dependent. Please add services in the order they should be stopped
# on Mellanox platform pmon is stopped by syncd
services_to_stop = [
'telemetry',
'restapi',
'swss',
'lldp',
Expand All @@ -566,30 +568,33 @@ def _stop_services():


def _reset_failed_services():
# This list is order-independent. Please keep list in alphabetical order
services_to_reset = [
'bgp',
'dhcp_relay',
'hostcfgd',
'hostname-config',
'interfaces-config',
'lldp',
'nat',
'ntp-config',
'pmon',
'radv',
'restapi',
'rsyslog-config',
'sflow',
'snmp',
'swss',
'syncd',
'teamd',
'nat',
'sflow',
'restapi'
'telemetry'
]

execute_systemctl(services_to_reset, SYSTEMCTL_ACTION_RESET_FAILED)


def _restart_services():
# This list is order-dependent. Please add services in the order they should be started
# on Mellanox platform pmon is started by syncd
services_to_restart = [
'hostname-config',
Expand All @@ -603,7 +608,8 @@ def _restart_services():
'hostcfgd',
'nat',
'sflow',
'restapi'
'restapi',
'telemetry'
]

disable_services = _get_disabled_services_list()
Expand Down

0 comments on commit 995cf39

Please sign in to comment.