From: Ilya Dryomov Date: Thu, 4 Dec 2014 06:49:56 +0000 (+0300) Subject: kernel: fix commit hash matching in need_to_install() X-Git-Tag: 1.1.0~1061^2~16^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=10d7f9095fbb42747f832aea129a9cc73d9ebe24;p=teuthology.git kernel: fix commit hash matching in need_to_install() We don't need to install a new kernel if the "want" (version) commit hash and the "have" (cur_sha1) commit hash match but the former is shorter than the latter. Signed-off-by: Ilya Dryomov --- diff --git a/teuthology/task/kernel.py b/teuthology/task/kernel.py index e67fe35e5..c28412974 100644 --- a/teuthology/task/kernel.py +++ b/teuthology/task/kernel.py @@ -166,7 +166,7 @@ def need_to_install(ctx, role, version): cur_sha1 = cur_sha1[0:dloc] log.debug('extracting sha1, {ver} -> {sha1}'.format( ver=cur_version, sha1=cur_sha1)) - if version.startswith(cur_sha1): + if cur_sha1.startswith(version): log.debug('extracted sha1 matches, do not need to install') ret = False else: