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

Bug 1340530

Summary: diskimage-builder does not create RHE6 images out of the box
Product: Red Hat OpenStack Reporter: Luigi Toscano <ltoscano>
Component: diskimage-builderAssignee: Ben Nemec <bnemec>
Status: CLOSED WONTFIX QA Contact: Arik Chernetsky <achernet>
Severity: high Docs Contact:
Priority: medium    
Version: 8.0 (Liberty)CC: aschultz, egafford, jslagle, ltoscano, mburns, rhel-osp-director-maint, sbaker
Target Milestone: ---Keywords: Regression, Triaged, ZStream
Target Release: 8.0 (Liberty)   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-19 20:22:30 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:

Description Luigi Toscano 2016-05-27 18:08:00 UTC
Description of problem:
A change introduced with one of the last rebase of diskimage-builder (between 1.5 and 1.10/1.11) broke support for building RHEL6 images. 

The new bootloader element, which is used by the rhel element, tries to install grub2, not available in RHEL6. This was caused most likely by the refactoring of the vm and the split of the bootstrap element. See also:
https://bugs.launchpad.net/diskimage-builder/+bug/1534387

The execution terminates with:

dib-run-parts Fri May 27 14:06:06 EDT 2016 Running /tmp/in_target.d/finalise.d/50-bootloader
+ set -eu
+ set -o pipefail
+ '[' -n /dev/loop0p1 ']'
+ PART_DEV=/dev/loop0p1
+ [[ amd64 =~ ppc ]]
++ echo /dev/loop0p1
++ sed -e s#p1##
++ sed -e s#mapper/##
+ BOOT_DEV=/dev/loop0
+ DIB_EXTLINUX=0
+ '[' 0 '!=' 0 ']'
+ install_grub2
+ '[' -f /tmp/grub/install ']'
+ [[ amd64 =~ ppc ]]
+ install-packages -m bootloader grub-pc
Error: Nothing to do



Workaround: set DIB_EXTLINUX=1.

This is a blocker for sahara-image-elements, as the supported plugins HDP 2.0.6 and CDH 5.4 work only on RHEL6. The workaround could be applied there, but it should be probably fixed for all users.

Version-Release number of selected component (if applicable):
dib-utils-0.0.9-1.el7ost.noarch
diskimage-builder-1.11.1-1.el7ost.noarch
sahara-image-elements-3.0.0-3.el7ost.noarch

Comment 1 James Slagle 2017-02-28 22:05:41 UTC
what are the steps to reproduce this issue? what version of diskimage-builder is being used?

Comment 2 Luigi Toscano 2017-03-01 09:34:58 UTC
It is (In reply to James Slagle from comment #1)
> what are the steps to reproduce this issue? what version of
> diskimage-builder is being used?

(In reply to Luigi Toscano from comment #0)
> Version-Release number of selected component (if applicable):
> dib-utils-0.0.9-1.el7ost.noarch
> diskimage-builder-1.11.1-1.el7ost.noarch
> sahara-image-elements-3.0.0-3.el7ost.noarch

See also the referenced bug.

Comment 3 Steve Baker 2018-03-19 20:22:30 UTC
RHEL6 is quite old at this point, I'd suggest updating the sahara elements to build on top of a RHEL7 base image

Comment 4 Luigi Toscano 2018-03-19 21:01:50 UTC
RHEL6 is old, but RH-OSP 8 is still supported. 

Anyway, for the record, we enabled the workaround in the wrapper script exposed to the users, by setting
export DIB_EXTLINUX=1

Same for RH-OSP 9; in RH-OSP 10 we managed to migrate all supported images to RHEL 7 (thanks also to the support of the plugins from the providers).