Skip to content

Commit

Permalink
prevent an invalid state from crashing the remotehosts.py remote_imag…
Browse files Browse the repository at this point in the history
…e_manager
  • Loading branch information
k-rister committed Jul 29, 2024
1 parent 3d83846 commit b478192
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions endpoints/remotehosts/remotehosts.py
Original file line number Diff line number Diff line change
Expand Up @@ -2100,6 +2100,10 @@ def remote_image_manager(thread_name, remote_name, connection, image_max_cache_s
thread_logger(thread_name, "images[rickshaw]:\n%s" % (endpoints.dump_json(images["rickshaw"])), remote_name = remote_name, log_prefix = log_prefix)
thread_logger(thread_name, "images[podman]:\n%s" % (endpoints.dump_json(images["podman"])), remote_name = remote_name, log_prefix = log_prefix)

if len(images["rickshaw"]) == 0 or len(images["podman"]) == 0:
thread_logger(thread_name, "Invalid state, exiting image manager", remote_name = remote_name, log_prefix = log_prefix)
return

cache_size = 0

if cache_size < image_max_cache_size:
Expand Down

0 comments on commit b478192

Please sign in to comment.