]> git.apps.os.sepia.ceph.com Git - teuthology.git/commitdiff
task/kernel: fix grub2 detection
authorSage Weil <sage@redhat.com>
Wed, 11 Dec 2019 17:23:20 +0000 (17:23 +0000)
committerSage Weil <sage@redhat.com>
Thu, 12 Dec 2019 18:55:52 +0000 (12:55 -0600)
grub2 rpm doesn't exist... el8 has

grub2-tools-extra-2.02-66.el8.x86_64
grub2-pc-modules-2.02-66.el8.noarch
grub2-tools-2.02-66.el8.x86_64
grub2-pc-2.02-66.el8.x86_64
grubby-8.40-34.el8.x86_64
grub2-common-2.02-66.el8.noarch
grub2-tools-minimal-2.02-66.el8.x86_64

and el7 has

grub2-tools-minimal-2.02-0.76.el7.centos.x86_64
grub2-pc-2.02-0.76.el7.centos.x86_64
grub2-common-2.02-0.76.el7.centos.noarch
grub2-tools-extra-2.02-0.76.el7.centos.x86_64
grubby-8.28-25.el7.x86_64
grub2-pc-modules-2.02-0.76.el7.centos.noarch
grub2-tools-2.02-0.76.el7.centos.x86_64
grub2-2.02-0.76.el7.centos.x86_64

The difference seems to be that el7 *also* has a /boot/grub directory. Let's
hope this change doesn't break it!

Signed-off-by: Sage Weil <sage@redhat.com>
teuthology/task/kernel.py

index 967744bf375a6e8b16725751ea3dc65370a9c25f..8cd596d474ad15fe1675ae9fb180530816cbe344 100644 (file)
@@ -871,7 +871,7 @@ def update_grub_rpm(remote, newversion):
     grub='grub2'
     # Check if grub2 is isntalled
     try:
-        remote.run(args=['sudo', 'rpm', '-qi', 'grub2'])
+        remote.run(args=['sudo', 'rpm', '-qi', 'grub2-tools'])
     except Exception:
         grub = 'legacy'
     log.info('Updating Grub Version: {grub}'.format(grub=grub))