Skip to content

Commit 92b30c2

Browse files
authored
[config]: add syslog messages to config load_minigraph/reload (sonic-net#843)
add stoping/restarting services messages in syslog Signed-off-by: Guohan Lu <[email protected]>
1 parent 4389ffe commit 92b30c2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

config/main.py

+4
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@ def reload(filename, yes, load_sysinfo):
612612
cfg_hwsku = cfg_hwsku.strip()
613613

614614
#Stop services before config push
615+
log_info("'reload' stopping services...")
615616
_stop_services()
616617
config_db = ConfigDBConnector()
617618
config_db.connect()
@@ -637,6 +638,7 @@ def reload(filename, yes, load_sysinfo):
637638
# We first run "systemctl reset-failed" to remove the "failed"
638639
# status from all services before we attempt to restart them
639640
_reset_failed_services()
641+
log_info("'reload' restarting services...")
640642
_restart_services()
641643

642644
@config.command()
@@ -681,6 +683,7 @@ def load_minigraph():
681683
device_type = device_type.strip()
682684

683685
#Stop services before config push
686+
log_info("'load_minigraph' stopping services...")
684687
_stop_services()
685688

686689
config_db = ConfigDBConnector()
@@ -708,6 +711,7 @@ def load_minigraph():
708711
# status from all services before we attempt to restart them
709712
_reset_failed_services()
710713
#FIXME: After config DB daemon is implemented, we'll no longer need to restart every service.
714+
log_info("'load_minigraph' restarting services...")
711715
_restart_services()
712716
click.echo("Please note setting loaded from minigraph will be lost after system reboot. To preserve setting, run `config save`.")
713717

0 commit comments

Comments
 (0)