Change severity of log messages for cases where docker container was stopped during service checker operation (#11188)

#### Why I did it
There might be a case where service checker periodic operation determined that specific container is running but when it tries to perform an operation on it, it was already closed by the user. This is a valid flow and we should not log an error message, informative warning is enough. 

#### How I did it
I reduce log severity.

#### How to verify it
I verified it manually.
This commit is contained in:
Lior Avramov 2022-06-23 00:54:14 +03:00 committed by Judy Joseph
parent 5188fdee0c
commit fd67b535be

View File

@ -144,11 +144,11 @@ class ServiceChecker(HealthChecker):
# Get container volumn folder
container_folder = self._get_container_folder(container)
if not container_folder:
logger.log_error('Failed to get container folder for {}'.format(container_folder))
logger.log_warning('Could not find MergedDir of container {}, was container stopped?'.format(container))
return
if not os.path.exists(container_folder):
logger.log_error('Container folder does not exist: {}'.format(container_folder))
logger.log_warning('MergedDir {} of container {} not found in filesystem, was container stopped?'.format(container_folder, container))
return
# Get critical_processes file path