From 9d7405ccdb59f1bed3cb710fe7a2786baa60c51e Mon Sep 17 00:00:00 2001 From: Nicolas Wavrant Date: Wed, 22 Feb 2017 15:12:54 +0100 Subject: [PATCH] checkfeedaspromise: returns more information on failure --- slapos/checkfeedaspromise.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/slapos/checkfeedaspromise.py b/slapos/checkfeedaspromise.py index 5cc8662..2270f75 100644 --- a/slapos/checkfeedaspromise.py +++ b/slapos/checkfeedaspromise.py @@ -72,7 +72,8 @@ def checkFeedAsPromise(feed, option): return '' if ko_pattern_found: - return 'KO pattern found' + return ("At least one of the failure patterns (%s) " + "has been found in the last status (%s)" % (option.ko_pattern_list, candidate_string)) if not ok_pattern_found: if publication_age < time_buffer: @@ -80,10 +81,10 @@ def checkFeedAsPromise(feed, option): return '' else: # If time-buffer is out, we are in stalled state - return 'Stalled situation : Nothing happened since %s' % publication_date + return 'Stalled situation : Last update (%s) happened on %s' % (candidate_string, publication_date) # If not ok, and not stalled, what can have possibly happen ? - return 'Something went wrong' + return 'Something went wrong, check promise code' def main(): -- 2.25.1