Skip to content

Commit

Permalink
Stop/Start restapi server upon config reload (sonic-net#911)
Browse files Browse the repository at this point in the history
  • Loading branch information
sumukhatv committed May 13, 2020
1 parent c0f5884 commit 7e52ef9
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -545,6 +545,7 @@ def _abort_if_false(ctx, param, value):
def _stop_services():
# on Mellanox platform pmon is stopped by syncd
services_to_stop = [
'restapi',
'swss',
'lldp',
'pmon',
Expand Down Expand Up @@ -575,7 +576,8 @@ def _reset_failed_services():
'syncd',
'teamd',
'nat',
'sflow'
'sflow',
'restapi'
]
execute_systemctl(services_to_reset, SYSTEMCTL_ACTION_RESET_FAILED)

Expand All @@ -595,6 +597,7 @@ def _restart_services():
'hostcfgd',
'nat',
'sflow',
'restapi'
]

if asic_type == 'mellanox' and 'pmon' in services_to_restart:
Expand Down

0 comments on commit 7e52ef9

Please sign in to comment.