]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
need_to_install_distro(): return newest version
authorZack Cerza <zack@redhat.com>
Tue, 16 Jun 2015 15:25:26 +0000 (09:25 -0600)
committerZack Cerza <zack@redhat.com>
Tue, 16 Jun 2015 16:10:43 +0000 (10:10 -0600)
Signed-off-by: Zack Cerza <zack@redhat.com>
teuthology/task/kernel.py

index 710ae971c4ddce4dd7645b64a5753ae8a1fc9374..0c4054c38deaa3b4e421559b6c219a057e19b671 100644 (file)
@@ -617,8 +617,10 @@ def need_to_install_distro(remote):
     """
     Installing kernels on rpm won't setup grub/boot into them.  This installs
     the newest kernel package and checks its version and compares against
-    current (uname -r) and returns true if newest != current.  Similar check
-    for deb.
+    the running kernel (uname -r).  Similar check for deb.
+
+    :returns: False if running the newest distro kernel. Returns the version of
+              the newest if it is not running.
     """
     package_type = remote.os.package_type
     output, err_mess = StringIO(), StringIO()
@@ -670,7 +672,7 @@ def need_to_install_distro(remote):
     log.info(
         'Not newest distro kernel. Curent: {cur} Expected: {new}'.format(
             cur=current, new=newest))
-    return True
+    return newest
 
 
 def maybe_generate_initrd_rpm(remote, path, version):