Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1749901

Summary: During the whole disk image process, and when using the portal's repositories, grub2-efi-modules is installed with wrong arch
Product: Red Hat OpenStack Reporter: David Vallee Delisle <dvd>
Component: diskimage-builderAssignee: Bob Fournier <bfournie>
Status: CLOSED CURRENTRELEASE QA Contact: Arik Chernetsky <achernet>
Severity: high Docs Contact:
Priority: high    
Version: 13.0 (Queens)CC: amcleod, bfournie, emacchi, mburns, rolando.manaog
Target Milestone: z9Keywords: TestOnly, Triaged, ZStream
Target Release: 13.0 (Queens)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: diskimage-builder-2.16.0-5.el7ost Doc Type: Bug Fix
Doc Text:
Previously, there was an issue when building whole disk images because the wrong grub packages were included in the images. As a result, the whole disk image building process failed with a grub2-install error: `"/usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist"` With this update, the whole disk image building process includes the correct grub packages and you can build whole disk images successfully.
Story Points: ---
Clone Of:
: 1754514 (view as bug list) Environment:
Last Closed: 2019-11-08 11:47:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1754514    

Description David Vallee Delisle 2019-09-06 17:38:50 UTC
Description of problem:
During the whole disk image process, and when using the portal's repositories, grub2-efi-modules is installed with wrong arch. 

We get grub2-efi-aa64-modules instead of grub2-efi-x64-modules and this causes grub2-install to fail because "/usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist"

Apparently, the aa64 version of grub2-efi-modules is in the rhel-7-server-optional-rpms repo for some reason.

Steps to Reproduce:
1. Follow whole-disk-image process
2. Use portal registration
3. Enable rhel-7-server-optional-rpms repo as recommended in the procedure


Actual results:
See Additional info [1].

Expected results:
We should have the right arch

Workaround:
On the undercloud, as root:
~~~
sed -i.orig 's/grub2-efi-modules/grub2-efi-x64-modules/g' /usr/{share/diskimage-builder,lib/python2.7/site-packages/diskimage_builder}/elements/{bootloader,grub2}/pkg-map
~~~

Additional info:

[1]
~~~
2019-09-04 20:43:10.444 | + yum -v -y install grub2-tools grub2-efi grub2-efi-modules
2019-09-04 20:43:10.599 | Not loading "rhnplugin" plugin, as it is disabled
2019-09-04 20:43:10.891 | Loading "product-id" plugin
2019-09-04 20:43:10.893 | Loading "search-disabled-repos" plugin
2019-09-04 20:43:10.901 | Loading "subscription-manager" plugin
2019-09-04 20:43:10.910 | Updating Subscription Management repositories.
2019-09-04 20:43:13.538 | Config time: 2.946
2019-09-04 20:43:13.545 | Yum version: 3.4.3
2019-09-04 20:43:14.068 | rpmdb time: 0.000
2019-09-04 20:43:14.074 | Setting up Package Sacks
2019-09-04 20:43:14.101 | pkgsack time: 0.027
2019-09-04 20:43:15.131 | Obs Init time: 0.777
2019-09-04 20:43:15.135 | Package 1:grub2-tools-2.02-0.80.el7.x86_64 already installed and latest version
2019-09-04 20:43:15.412 | Package grub2-efi is obsoleted by grub2-efi-x64, trying to install 1:grub2-efi-x64-2.02-0.80.el7.x86_64 instead
2019-09-04 20:43:15.676 | Package grub2-efi-modules is obsoleted by grub2-efi-aa64-modules, trying to install 1:grub2-efi-aa64-modules-2.02-0.80.el7.noarch instead
2019-09-04 20:43:15.676 | Resolving Dependencies
2019-09-04 20:43:15.678 | --> Running transaction check
2019-09-04 20:43:15.678 | ---> Package grub2-efi-aa64-modules.noarch 1:2.02-0.80.el7 will be installed
2019-09-04 20:43:15.678 | Checking deps for grub2-efi-aa64-modules.noarch 1:2.02-0.80.el7 - u
2019-09-04 20:43:15.679 | looking for ('grub2-common', 'EQ', ('1', '2.02', '0.80.el7')) as a requirement of grub2-efi-aa64-modules.noarch 1:2.02-0.80.el7 - u
2019-09-04 20:43:15.682 | ---> Package grub2-efi-x64.x86_64 1:2.02-0.80.el7 will be installed
2019-09-04 20:43:15.682 | Checking deps for grub2-efi-x64.x86_64 1:2.02-0.80.el7 - u
2019-09-04 20:43:15.682 | looking for ('grub2-common', 'EQ', ('1', '2.02', '0.80.el7')) as a requirement of grub2-efi-x64.x86_64 1:2.02-0.80.el7 - u
2019-09-04 20:43:15.682 | looking for ('grub2-tools', 'EQ', ('1', '2.02', '0.80.el7')) as a requirement of grub2-efi-x64.x86_64 1:2.02-0.80.el7 - u
2019-09-04 20:43:15.682 | looking for ('grub2-tools-extra', 'EQ', ('1', '2.02', '0.80.el7')) as a requirement of grub2-efi-x64.x86_64 1:2.02-0.80.el7 - u
2019-09-04 20:43:15.682 | looking for ('grub2-tools-minimal', 'GE', ('1', '2.02', '0.80.el7')) as a requirement of grub2-efi-x64.x86_64 1:2.02-0.80.el7 - u
[...]
2019-09-04 20:43:24.733 | + /usr/sbin/grub2-install '--modules=part_msdos part_gpt lvm' --removable --target=x86_64-efi /dev/loop0
2019-09-04 20:43:24.741 | /usr/sbin/grub2-install: error: /usr/lib/grub/x86_64-efi/modinfo.sh doesn't exist. Please specify --target or --directory.
~~~

Comment 1 Bob Fournier 2019-09-12 16:20:22 UTC
Which version if diskimage-builder is being used?  This may be related to https://bugzilla.redhat.com/show_bug.cgi?id=1716672.

Comment 2 Rolando Manaog 2019-09-12 18:53:34 UTC
This is the version of the diskimage-builder from the Openstack 13 repos

# yum info diskimage-builder
Loaded plugins: enabled_repos_upload, package_upload, product-id, search-disabled-repos, subscription-manager Installed Packages
Name        : diskimage-builder
Arch        : noarch
Version     : 2.16.0
Release     : 4.el7ost
Size        : 1.5 M
Repo        : installed
From repo   : rhel-7-server-openstack-13-rpms
Summary     : Image building tools for OpenStack
URL         : https://launchpad.net/diskimage-builder
License     : ASL 2.0
Description : Components of TripleO that are responsible for building disk images.

Comment 10 Alex McLeod 2019-10-31 11:29:11 UTC
If this bug requires doc text for errata release, please set the 'Doc Type' and provide draft text according to the template in the 'Doc Text' field. The documentation team will review, edit, and approve the text.

If this bug does not require doc text, please set the 'requires_doc_text' flag to -.

Comment 12 Bob Fournier 2019-11-04 18:10:09 UTC
Verified that the correct version of grub2-efi for x64 is now being installed:

Package grub2-efi is obsoleted by grub2-efi-x64, trying to install 1:grub2-efi-x64-2.02-0.80.el7.x86_64 instead
Resolving Dependencies
--> Running transaction check
---> Package grub2-efi-x64.x86_64 1:2.02-0.80.el7 will be installed

Comment 14 Lon Hohberger 2019-11-08 11:47:39 UTC
According to our records, this should be resolved by diskimage-builder-2.16.0-5.el7ost.  This build is available now.