Bug 1754514 - (OSP-14) During the whole disk image process, and when using the portal's repositories, grub2-efi-modules is installed with wrong arch
Summary: (OSP-14) During the whole disk image process, and when using the portal's rep...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat OpenStack
Classification: Red Hat
Component: diskimage-builder
Version: 14.0 (Rocky)
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: z4
: 14.0 (Rocky)
Assignee: Ben Nemec
QA Contact: Arik Chernetsky
URL:
Whiteboard:
Depends On: 1749901
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-09-23 13:06 UTC by Bob Fournier
Modified: 2019-11-06 16:49 UTC (History)
8 users (show)

Fixed In Version: diskimage-builder-2.22.0-2.el7ost
Doc Type: Bug Fix
Doc Text:
Previously, the whole disk image building process would fail due to the grub2-efi-modules being installed with the wrong architecture. This patch corrects the process, ensuring the grub2-efi-x64 modules are used for the x86_64 architecture, allowing the disk image building process to succeed.
Clone Of: 1749901
Environment:
Last Closed: 2019-11-06 16:49:36 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
OpenStack gerrit 681889 0 'None' MERGED Use x86 architeture specific grub2 packages for RHEL 2020-09-30 19:01:51 UTC
Red Hat Product Errata RHBA-2019:3745 0 None None None 2019-11-06 16:49:46 UTC

Description Bob Fournier 2019-09-23 13:06:48 UTC
+++ This bug was initially created as a clone of Bug #1749901 +++

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.
~~~

--- Additional comment from Bob Fournier on 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.

--- Additional comment from Rolando Manaog on 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 3 Alistair Tonner 2019-10-30 20:05:32 UTC
   Tested diskimage-builder to see if it still pulls in aa64 packages:

 yum list installed |grep -e openstack -e diskimage-builder
diskimage-builder.noarch        2.22.0-2.el7ost         @rhelosp-14.0-puddle
openstack-tripleo-common.noarch 9.5.0-8.el7ost          @rhelosp-14.0-puddle

disk-image-create -x -a amd64 -o test-image vm fedora base grub2 dhcp-all-interfaces openssh-server

Checked log from the run for grub2 packages:

2019-10-30 18:19:21.306 | > + dnf -v -y install openssh shim policycoreutils-python dkms which policycoreutils curl rsync kernel-modules vim-minimal selinux-policy-targeted tcpdump openssl pyOpenSSL traceroute grub2 git redhat-rpm-config selinux-policy efibootmgr grub2-efi-x64-modules grub2-efi-x64 ca-certificates lsof audit dhclient openssh-server libselinux-python
2019-10-30 18:19:21.307 | > Package grub2-pc-1:2.02-62.fc29.x86_64 is already installed.
2019-10-30 18:19:22.294 | > ---> Package grub2-efi-x64.x86_64 1:2.02-62.fc29 will be installed
2019-10-30 18:19:22.294 | > ---> Package grub2-efi-x64-modules.noarch 1:2.02-62.fc29 will be installed
2019-10-30 18:19:22.295 | >  grub2-efi-x64             x86_64 1:2.02-62.fc29                  fedora  352 k
2019-10-30 18:19:22.295 | >  grub2-efi-x64-modules     noarch 1:2.02-62.fc29                  fedora  1.2 M
2019-10-30 18:19:57.550 | > (60/116): grub2-efi-x64-2.02-62.fc29.x86_64.rpm 948 kB/s | 352 kB     00:00    
2019-10-30 18:19:57.550 | > (70/116): grub2-efi-x64-modules-2.02-62.fc29.no 641 kB/s | 1.2 MB     00:01    
2019-10-30 18:20:47.467 | >   Installing       : grub2-efi-x64-1:2.02-62.fc29.x86_64                111/116 
2019-10-30 18:20:47.467 | >   Installing       : grub2-efi-x64-modules-1:2.02-62.fc29.noarch        114/116 
2019-10-30 18:20:48.625 | >   Verifying        : grub2-efi-x64-1:2.02-62.fc29.x86_64                 61/116 
2019-10-30 18:20:48.625 | >   Verifying        : grub2-efi-x64-modules-1:2.02-62.fc29.noarch         62/116 
2019-10-30 18:20:48.626 | >   grub2-efi-x64-1:2.02-62.fc29.x86_64
2019-10-30 18:20:48.626 | >   grub2-efi-x64-modules-1:2.02-62.fc29.noarch

   No aa64 pkgs installed

Comment 5 errata-xmlrpc 2019-11-06 16:49:36 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.

https://access.redhat.com/errata/RHBA-2019:3745


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