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 authored and abdosi committed Aug 3, 2020
1 parent a2c4c30 commit bae3f05
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 bae3f05

Please sign in to comment.