Bug 1206676

Summary: mkfs options must be extensible to allow RHEL 6 images to be built from RHEL 7
Product: Red Hat OpenStack Reporter: Elise Gafford <egafford>
Component: diskimage-builderAssignee: Ben Nemec <bnemec>
Status: CLOSED ERRATA QA Contact: Luigi Toscano <ltoscano>
Severity: high Docs Contact:
Priority: high    
Version: 6.0 (Juno)CC: bnemec, egafford, lhh, mlopes, morazi, sgordon, yeylon
Target Milestone: z3Keywords: Triaged, ZStream
Target Release: 6.0 (Juno)Flags: yeylon: needinfo-
Hardware: noarch   
OS: Linux   
Whiteboard:
Fixed In Version: diskimage-builder-0.1.34-21.el7ost Doc Type: Bug Fix
Doc Text:
Prior to this update, freeform options could not be passed to MKFS from DIB, even though the FS type was modifiable. Consequently, when building an ext4 FS on Red Hat Enterprise Linux (RHEL) 6 from a RHEL 7 build host, the 64-bit flag was set, resulting in a non-booting VM. This fix addresses this issue by adding the mkfs-options arg to the disk-image-create script, allowing arbitrary user-defined options to be passed to mkfs. As a result, fully booting ext4 FS can be built on RHEL 6 from RHEL 7, and as a side benefit, users now have a hook to specify many properties of their filesystem which were previously locked without code modification.
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-05-05 13:31:08 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: 1207369    

Description Elise Gafford 2015-03-27 18:03:49 UTC
Description of problem:

As of released version diskimage-builder-0.1.34-20.el7ost, an image built from RHEL 7 onto RHOS 6 will be built with an ext4 filesystem with 64bit enabled. Due to bug https://bugzilla.redhat.com/show_bug.cgi?id=1099237, this results in an unbootable filesystem. Until this bug is resolved, the only functional workaround to this problem is to build an ext3 filesystem (which is a still-more unfortunate solution than disabling 64bit.)

The patch at https://review.openstack.org/#/c/165149/ will allow MKFS_OPTIONS to be extended, allowing the passage of the "-O ^64bit" flag, allowing the filesytem to boot. Backporting this patch will allow generation of HDP (and CDH) images on an ext4 filesystem on RHEL 6, which is critical to OpenStack Sahara's user flow.


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

diskimage-builder-0.1.34-20.el7ost

How reproducible:

100%

Steps to Reproduce:
1. Download a RHEL 6.6 qcow2.
2. Using a filesystem address for DIB_CLOUD_IMAGES, create any rhel-based image ('disk-image-create "rhel vm" -n' for minimal test.)
3. Boot said image.

Actual results:

Extlinux reports no configuration file found (it cannot understand the filesystem, and points at the root directory. Even if the config, kernel, and ramdisk are moved to root, the kernel image is interpreted as corrupt.) The image is unbootable.

Expected results:

The image boots.

Additional info:

Comment 8 Luigi Toscano 2015-04-24 18:20:10 UTC
The patch adds a new option which removes the 64 bit flag. The generation of RHEL6 images from RHEL7 has been successfully tested with:
`disk-image-create "rhel vm" --mkfs-options "-O ^64bit" -n -o rhel6.qcow2`

The patch does not change the default behavior (for example, a simple 
`disk-image-create -o fedora-20-dib.qcow2 vm fedora` works as before )

diskimage-builder-0.1.34-21.el7ost.noarch

Comment 10 errata-xmlrpc 2015-05-05 13:31:08 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://rhn.redhat.com/errata/RHBA-2015-0928.html