Bug 1561258 - grub2-mkconfig on node produce incorrect grub2.cfg if a local VG is present
Summary: grub2-mkconfig on node produce incorrect grub2.cfg if a local VG is present
Alias: None
Product: Red Hat Enterprise Virtualization Manager
Classification: Red Hat
Component: ovirt-node-ng
Version: 4.1.10
Hardware: x86_64
OS: Linux
Target Milestone: ovirt-4.2.3
: ---
Assignee: Ryan Barry
QA Contact: jiachen zhang
: 1583675 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2018-03-28 00:36 UTC by Germano Veit Michel
Modified: 2020-08-03 15:35 UTC (History)
12 users (show)

Fixed In Version: imgbased-1.0.12
Doc Type: Bug Fix
Doc Text:
To properly set boot flags if grub2-mkconfig is run, or a new kernel is installed, Red Hat Virtualization Host (RHVH) ships with a custom grub generator. This generator uses a list of all local LVM volume groups to create boot arguments, but systems with local storage domains on separate volume groups are currently present in the list, which could result in incorrect flags being in the grub.conf file. This update enables RHVH grub generators to explicitly look for the RHVH volume group, and ignore others.
Clone Of:
Last Closed: 2018-05-15 17:57:47 UTC
oVirt Team: Node
Target Upstream Version:
lsvaty: testing_plan_complete-

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1515338 0 unspecified CLOSED grub2-probe sends messages to stderr about LVM disks being unfound 2021-02-22 00:41:40 UTC
Red Hat Product Errata RHSA-2018:1524 0 None None None 2018-05-15 17:58:58 UTC
oVirt gerrit 89576 0 master MERGED grub2-mkconfig: make 09_node smarter about the VG 2020-02-21 04:36:20 UTC
oVirt gerrit 90420 0 ovirt-4.2 MERGED grub2-mkconfig: make 09_node smarter about the VG 2020-02-21 04:36:21 UTC

Internal Links: 1515338

Description Germano Veit Michel 2018-03-28 00:36:04 UTC
Description of problem:

While attempting to run grub2-mkconfig on RHVH, the produced configuration file is incorrect if the host contains another local VG other than rhvh.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Have vm local storage on the host. For example:

# vgs
  VG        #PV #LV #SN Attr   VSize    VFree  
  rhvh        1  10   0 wz--n-  <74.00g <13.84g
  vg_vmpool   1   1   0 wz--n- 1020.00m 508.00m

# grep vmpool /etc/fstab 
/dev/mapper/vg_vmpool-lv_vmpool /data xfs defaults 0 0

2. Install a hotfix kernel
rpm -Uvh kernel-1.2.3
cp /boot/*1.2.3* /boot/$(imgbase layer --current)
grub2-mkconfig -o /etc/grub2.cfg (or /etc/grub2-efi.cfg if EFI)

Actual results:
grub2.cfg contains incorrect info. It appended both vg names:

Expected results:

Comment 2 Ryan Barry 2018-03-28 01:58:11 UTC
This is definitely not related to a new kernel

Comment 3 jiachen zhang 2018-04-04 02:46:43 UTC
I can reproduce this bug successfully, and the key step as follow:
To creat a vg in kickstart:

### Partitioning ###
#ignoredisk --drives=sda
clearpart --all
bootloader --location=mbr
reqpart --add-boot
part pv.01 --ondisk=/dev/sda --size=300000
part pv.02 --ondisk=/dev/sda --size=100000
volgroup rhvh pv.01 --reserved-percent=2
volgroup test pv.02
logvol swap --fstype=swap --name=swap --vgname=rhvh --recommended
logvol none --name=pool --vgname=rhvh --thinpool --size=200000 --grow
logvol / --fstype=ext4 --name=root --vgname=rhvh --thin --poolname=pool --size=100000 --grow
logvol /var --fstype=ext4 --name=var --vgname=rhvh --thin --poolname=pool --size=20000
logvol /data --fstype=xfs --name=data --vgname=test --size=50000

then we will have two vg.

Then find the suitable kernal to update it.

Comment 5 jiachen zhang 2018-05-09 09:01:40 UTC
Test this bug with the version redhat-virtualization-host-4.2-20180507.0
Original Kernel: kernel-3.10.0-862-2.3
After run the command "rpm -Uvh", upgraded the kernel to kernel-3.10.0-862
Follow the steps I got the correct results.
So the bug has been fixed successfully.

Comment 8 errata-xmlrpc 2018-05-15 17:57:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Comment 9 Ryan Barry 2018-05-29 13:42:27 UTC
*** Bug 1583675 has been marked as a duplicate of this bug. ***

Comment 10 Franta Kust 2019-05-16 13:05:54 UTC
BZ<2>Jira Resync

Comment 11 Daniel Gur 2019-08-28 13:13:09 UTC

Comment 12 Daniel Gur 2019-08-28 13:17:22 UTC

Note You need to log in before you can comment on or make changes to this bug.