]> git-server-git.apps.pok.os.sepia.ceph.com Git - teuthology.git/commitdiff
kernel: fix commit hash matching in need_to_install() 376/head
authorIlya Dryomov <idryomov@redhat.com>
Thu, 4 Dec 2014 06:49:56 +0000 (09:49 +0300)
committerIlya Dryomov <idryomov@redhat.com>
Thu, 4 Dec 2014 08:02:52 +0000 (11:02 +0300)
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 <idryomov@redhat.com>
teuthology/task/kernel.py

index e67fe35e500757b1598a342563fd5bbb81037529..c28412974b07adc252c1142fdb6f0e3c61a8dc24 100644 (file)
@@ -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: