Project

General

Profile

Bug #58011

teuthology-lock --unlock loops forever if node already unlocked

Added by Dan Mick 3 months ago. Updated 3 months ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Development
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Crash signature (v1):
Crash signature (v2):

Description

if you try to unlock an already-unlocked node, paddles returns a 403 Forbidden error "Cannot unlock an already-unlocked node", but the code in ops.py/unlock_one() does not interpret this, and loops until timeout. I hacked in a fragile test and it made the unlock fail immediately:

diff --git a/teuthology/lock/ops.py b/teuthology/lock/ops.py
index b0c7d803..8217f432 100644
--- a/teuthology/lock/ops.py
+++ b/teuthology/lock/ops.py
@@ -215,6 +215,8 @@ def unlock_one(ctx, name, user, description=None):
             # Work around https://github.com/kennethreitz/requests/issues/2364
             except requests.ConnectionError as e:
                 log.warning("Saw %s while unlocking; retrying...", str(e))
+            if response.status_code == 403 and 'already' in response.text:
+                break
     try:
         reason = response.json().get('message')
     except ValueError:

History

#1 Updated by Dan Mick 3 months ago

  • Source set to Development

Also available in: Atom PDF