Project

General

Profile

Actions

Bug #58011

closed

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

Added by Dan Mick over 1 year ago. Updated 8 months ago.

Status:
Resolved
Priority:
Normal
Assignee:
Category:
-
% 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:

Actions #1

Updated by Dan Mick over 1 year ago

  • Source set to Development
Actions #2

Updated by Zack Cerza 8 months ago

  • Status changed from New to Resolved
Actions #3

Updated by Dan Mick 8 months ago

  • Assignee set to Zack Cerza
Actions

Also available in: Atom PDF