Skip to content

Commit 6ced42c

Browse files
committed
Revert "[config] Enable/disable container monitoring when starting/stopping the services. (#1471)"
This reverts commit 4a78c01.
1 parent e1c52a0 commit 6ced42c

File tree

2 files changed

+1
-9
lines changed

2 files changed

+1
-9
lines changed

config/main.py

-6
Original file line numberDiff line numberDiff line change
@@ -669,9 +669,6 @@ def _get_disabled_services_list(config_db):
669669

670670

671671
def _stop_services():
672-
click.echo("Disabling container monitoring ...")
673-
clicommon.run_command("sudo monit unmonitor container_checker")
674-
675672
click.echo("Stopping SONiC target ...")
676673
clicommon.run_command("sudo systemctl stop sonic.target")
677674

@@ -695,9 +692,6 @@ def _restart_services():
695692
click.echo("Reloading Monit configuration ...")
696693
clicommon.run_command("sudo monit reload")
697694

698-
click.echo("Enabling container monitoring ...")
699-
clicommon.run_command("sudo monit monitor container_checker")
700-
701695

702696
def interface_is_in_vlan(vlan_member_table, interface_name):
703697
""" Check if an interface is in a vlan """

tests/config_test.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,12 @@
1212
from utilities_common.db import Db
1313

1414
load_minigraph_command_output="""\
15-
Disabling container monitoring ...
1615
Stopping SONiC target ...
1716
Running command: /usr/local/bin/sonic-cfggen -H -m --write-to-db
1817
Running command: pfcwd start_default
1918
Running command: config qos reload --no-dynamic-buffer
2019
Restarting SONiC target ...
2120
Reloading Monit configuration ...
22-
Enabling container monitoring ...
2321
Please note setting loaded from minigraph will be lost after system reboot. To preserve setting, run `config save`.
2422
"""
2523

@@ -51,7 +49,7 @@ def test_load_minigraph(self, get_cmd_module, setup_single_broadcom_asic):
5149
traceback.print_tb(result.exc_info[2])
5250
assert result.exit_code == 0
5351
assert "\n".join([l.rstrip() for l in result.output.split('\n')]) == load_minigraph_command_output
54-
assert mock_run_command.call_count == 9
52+
assert mock_run_command.call_count == 7
5553

5654
@classmethod
5755
def teardown_class(cls):

0 commit comments

Comments
 (0)