Giuseppe Lavagetto has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/249388

Change subject: service_checker: correctly return an error in case of timeouts
......................................................................

service_checker: correctly return an error in case of timeouts

Bug: T116739
Change-Id: I16f32e57bfa6da0ff583080fc115f92faad2e413
---
M modules/service/files/checker.py
1 file changed, 4 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/operations/puppet 
refs/changes/88/249388/1

diff --git a/modules/service/files/checker.py b/modules/service/files/checker.py
index 79aa527..d9a3aff 100755
--- a/modules/service/files/checker.py
+++ b/modules/service/files/checker.py
@@ -265,8 +265,10 @@
                 method=self.method
             )
         except CheckServiceError as e:
-            return ('CRITICAL', "Could not fetch url {}: {}".format(
-                url, e))
+            self.status = 'CRITICAL'
+            self.msg = "Could not fetch url {}: {}".format(
+                url, e)
+            return
 
         # Response status
         if r.status != self.resp_status:

-- 
To view, visit https://gerrit.wikimedia.org/r/249388
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I16f32e57bfa6da0ff583080fc115f92faad2e413
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Giuseppe Lavagetto <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to