Skip to content

Commit

Permalink
Fixed continuous log message of telemetry docker image not present. (s…
Browse files Browse the repository at this point in the history
…onic-net#21647)

Fixes: sonic-net#19352.

Sequence when we upgrade using config db from older Image that has Telemetry docker feature enabled.

Older Image has Telemetry docker image and telemetry feature is enable
Newer Image does not have Telemetry docker image but feature is enable [because of old image config db]
Container checker will check for telemetry image and log the invalid error message periodically.
How I fixed:
As mentioned in this PR sonic-net#18529 in newer image it is expected to have Telemetry feature in enable state but with no docker image. [Basically feature is implicitly disable] . So I have removed the print message as not needed.

Signed-off-by: Abhishek Dosi <abdosi@microsoft.com>
  • Loading branch information
abdosi authored Feb 7, 2025
1 parent ff21fc1 commit 3fe020a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions files/image_config/monit/container_checker
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ def check_docker_image(image_name):
DOCKER_CLIENT.images.get(image_name)
return True
except (docker.errors.ImageNotFound, docker.errors.APIError) as err:
print("Failed to get image '{}'. Error: '{}'".format(image_name, err))
return False

def get_expected_running_containers():
Expand Down Expand Up @@ -79,7 +78,7 @@ def get_expected_running_containers():
# if gnmi container image is present, check gnmi container instead of telemetry
ret = check_docker_image("docker-sonic-gnmi")
if not ret:
print("Ignoring telemetry container check on image which has no corresponding docker image")
print("Ignoring telemetry container check on image which has no corresponding telemetry or gnmi docker image")
else:
container_list.append("gnmi")
continue
Expand Down

0 comments on commit 3fe020a

Please sign in to comment.