]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
lock.py: remove dead code trying to deal with locks 489/head
authorDan Mick <dan.mick@redhat.com>
Tue, 12 May 2015 01:18:04 +0000 (18:18 -0700)
committerDan Mick <dan.mick@redhat.com>
Wed, 13 May 2015 05:42:10 +0000 (22:42 -0700)
Without this, lock.py keeps trying to get at the key in
case it might need it later...but there's nothing that even
uses that information left, so it just causes a delay.

Signed-off-by: Dan Mick <dan.mick@redhat.com>
teuthology/lock.py

index 1eafbd61050d90c6d19c86453b99af26d0b29412..53d2f2b1f345e5719402d0191d6b75a0ff6ccc0b 100644 (file)
@@ -13,7 +13,6 @@ import teuthology
 from . import misc
 from . import provision
 from .config import config
-from .contextutil import safe_while
 from .lockstatus import get_status
 
 log = logging.getLogger(__name__)
@@ -537,17 +536,6 @@ def find_stale_locks(owner=None):
 
 def update_lock(name, description=None, status=None, ssh_pub_key=None):
     name = misc.canonicalize_hostname(name, user=None)
-    # Only do VM specific things (key lookup) if we are not
-    # Just updating the status (like marking down).
-    if not status:
-        status_info = get_status(name)
-        if status_info['is_vm']:
-            with safe_while(sleep=1, tries=15, _raise=False,
-                            action='ssh-keyscan') as proceed:
-                while proceed():
-                    ssh_key = ssh_keyscan([name])
-                    if ssh_key:
-                        break
     updated = {}
     if description is not None:
         updated['description'] = description