Skip to content

Commit

Permalink
fix log collector - check if it has containerStatuses
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvallevy2 committed Aug 4, 2020
1 parent a445545 commit c7afebf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion log_collector/log_collector.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@ def get_redis_enterprise_debug_info(namespace, output_dir):

pod_names = []
for pod in rs_pods:
if all(container_status['ready'] for container_status in pod['status']['containerStatuses']):
if 'containerStatuses' in pod['status'] and all(
container_status['ready'] for container_status in pod['status']['containerStatuses']):
pod_names.append(pod['metadata']['name'])
if not pod_names:
logger.warning("Cannot find a ready redis enterprise pod, will use a non-ready pod")
Expand Down

0 comments on commit c7afebf

Please sign in to comment.