Project

General

Profile

Actions

Bug #44236

open

Unlocking lab machines is not intuitive

Added by Nathan Cutler about 4 years ago. Updated almost 4 years ago.

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

0%

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

Description

I locked a smithi using a command like this:

teuthology-lock --machine-type smithi --lock-many 1 --os-type opensuse --os-version 15.2 --owner foo

This worked great, however:

(virtualenv) smithfarm@teuthology:~/teuthology$ teuthology-lock -a --brief | grep smithfarm
smithi183.front.sepia.ceph.com   locked smithfarm "None" 
(virtualenv) smithfarm@teuthology:~/teuthology$ teuthology-lock --unlock smithi183.front.sepia.ceph.com
2020-02-21 09:59:38,920.920 ERROR:teuthology.lock.ops:Failed to unlock: smithi183.front.sepia.ceph.com

With some help from Thomas Bechtold, I was able to unlock it by doing something like this:

$ teuthology-lock --list-targets --owner smithfarm > mine.yml
$ teuthology-nuke -t mine.yml -r -u --owner smithfarm
Actions #1

Updated by Nathan Cutler about 4 years ago

  • Subject changed from I locked a smithi, but now I cannot unlock it to Unlocking lab machines is not intuitive
  • Description updated (diff)
  • Assignee deleted (David Galloway)
Actions #2

Updated by David Galloway about 4 years ago

Are you sure smithi183 is the one that got locked by the original command?

If you're unlocking a machine that isn't locked by "you" then you need to add --owner foo like in the teuthology-lock --lock command.

I sort of agree this shouldn't be necessary (I'm sure there is a logical explanation) but I have a little helper for this.

dgalloway@p50 ~ ()$ cat ~/bin/tunlock
#!/bin/bash

teuthology-lock --unlock --owner $(teuthology-lock --brief $1 | awk '{ print $3 }') $1
Actions #3

Updated by Josh Durgin almost 4 years ago

The idea behind requiring the matching --owner is to avoid someone accidentally unlocking the wrong machine. It'd be nice if it used the same default owner as --lock though, so you would only need to specify --owner if you used --owner with --lock[-many].

Actions

Also available in: Atom PDF