[chassis][supervisor]monit container-checker failed due to unexpected "database-chassis" docker running #9042 (#9043)

Why I did it
Fixed the monit container_checker fails due to unexpected "database-chassis" docker running on Supervisor card in the VOQ chassis. fixes #9042

How I did it
Added database-chassis to the always running docker list if platform is supervisor card.

How to verify it
Execute the CLI command "sudo monit status container_checker"


Signed-off-by: mlok <marty.lok@nokia.com>
This commit is contained in:
Marty Y. Lok 2022-03-03 20:56:08 -05:00 committed by Judy Joseph
parent 043fcfd099
commit 76ee6448b5

View File

@ -20,7 +20,7 @@ import docker
import sys import sys
import swsssdk import swsssdk
from sonic_py_common import multi_asic from sonic_py_common import multi_asic, device_info
from swsscommon import swsscommon from swsscommon import swsscommon
@ -63,6 +63,8 @@ def get_expected_running_containers():
always_running_containers.add(container_name + str(asic_id)) always_running_containers.add(container_name + str(asic_id))
else: else:
always_running_containers.add(container_name) always_running_containers.add(container_name)
if device_info.is_supervisor():
always_running_containers.add("database-chassis")
return expected_running_containers, always_running_containers return expected_running_containers, always_running_containers
def get_current_running_from_DB(always_running_containers): def get_current_running_from_DB(always_running_containers):