From 67030ad1aa8539d094d4228cfbe5904fcfc375d1 Mon Sep 17 00:00:00 2001 From: Pavol Loffay Date: Mon, 27 May 2019 16:48:23 +0200 Subject: [PATCH] Do not fail es-cleaner if there are no jaeger indices Signed-off-by: Pavol Loffay --- plugin/storage/es/esCleaner.py | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/storage/es/esCleaner.py b/plugin/storage/es/esCleaner.py index da3aaa8a665..050cb7a41cd 100755 --- a/plugin/storage/es/esCleaner.py +++ b/plugin/storage/es/esCleaner.py @@ -59,6 +59,7 @@ def main(): def filter_main_indices(ilo, prefix): ilo.filter_by_regex(kind='prefix', value=prefix + "jaeger") + empty_list(ilo, "No indices to delete") # This excludes archive index as we use source='name' # source `creation_date` would include archive index ilo.filter_by_age(source='name', direction='older', timestring='%Y-%m-%d', unit='days', unit_count=int(sys.argv[1]))