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>
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))