fedora-atomic image fails to build using diskimage-builder>=2.4.0

Bug #1699735 reported by Mark Goddard
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Magnum
In Progress
Undecided
Bharat Kunwar

Bug Description

See [1], the DIB project removed the variable DIB_ROOT_IMAGE_FS_UUID which is referenced by the magnum fedora-atomic element[2]. This causes the image to fail to build due to the use of 'set -u'. Using an older release of DIB (2.3.3) allows the image to be built successfully.

Tested using the following:

virtualenv venv
. venv/bin/activate
pip install -U pip
pip install diskimage-builder dib-utils
git clone https://git.openstack.org/openstack/magnum
export ELEMENTS_PATH=$(python -c 'import os, diskimage_builder, pkg_resources;print(os.path.abspath(pkg_resources.resource_filename(diskimage_builder.__name__, "elements")))')
export ELEMENTS_PATH="${ELEMENTS_PATH}:${PWD}/magnum/magnum/drivers/common/image"
export DIB_RELEASE=24
export DIB_IMAGE_SIZE=2.5
disk-image-create fedora-atomic -o fedora-atomic -x --no-tmpfs

Resulting output:

dib-run-parts Wed Jun 21 16:36:08 UTC 2017 Running /tmp/in_target.d/finalise.d/80-fedora-atomic
+ set -eu
+ set -o pipefail
+ cd /
+ ostree admin os-init fedora-atomic
ostree/deploy/fedora-atomic initialized as OSTree root
+ ostree remote add --set=gpg-verify=false fedora-atomic https://kojipkgs.fedoraproject.org/atomic/24/
+ ostree pull fedora-atomic d9c8b8a31238e857f010c6fdc282f5f611d3c8af3e78caa891f7edb85822771b
+ ostree remote delete fedora-atomic
+ ostree admin deploy --os=fedora-atomic d9c8b8a31238e857f010c6fdc282f5f611d3c8af3e78caa891f7edb85822771b --karg-proc-cmdline --karg=selinux=0
Relabeling /var (no stamp file '/ostree/deploy/fedora-atomic/var/.ostree-selabeled' found)
Transaction complete; bootconfig swap: yes deployment count change: 1
+ SYSROOT=/ostree/deploy/fedora-atomic/deploy/d9c8b8a31238e857f010c6fdc282f5f611d3c8af3e78caa891f7edb85822771b.0
+ cp /etc/fstab /ostree/deploy/fedora-atomic/deploy/d9c8b8a31238e857f010c6fdc282f5f611d3c8af3e78caa891f7edb85822771b.0/etc/
++ find /boot/ostree -name 'fedora-atomic-*' -type d
+ DEPLOYED_DIRECTORY=/boot/ostree/fedora-atomic-25c6c581906b39e21573b0d85f04c5d43021d3f28885101dcebeb8b31defee82
+ DEPLOYED_ID=25c6c581906b39e21573b0d85f04c5d43021d3f28885101dcebeb8b31defee82
++ find /boot/ostree/fedora-atomic-25c6c581906b39e21573b0d85f04c5d43021d3f28885101dcebeb8b31defee82 -name 'initramfs*.img'
+ INIT_IMAGE=/boot/ostree/fedora-atomic-25c6c581906b39e21573b0d85f04c5d43021d3f28885101dcebeb8b31defee82/initramfs-4.7.2-201.fc24.x86_64.img
++ find /boot/ostree/fedora-atomic-25c6c581906b39e21573b0d85f04c5d43021d3f28885101dcebeb8b31defee82 -name 'vmlinuz*'
+ VMLINUZ_IMAGE=/boot/ostree/fedora-atomic-25c6c581906b39e21573b0d85f04c5d43021d3f28885101dcebeb8b31defee82/vmlinuz
+ cat
/tmp/in_target.d/finalise.d/80-fedora-atomic: line 28: DIB_IMAGE_ROOT_FS_UUID: unbound variable

Installing diskimage-builder 2.3.3 allowed the image to be built successfully.
pip install diskimage-builder==2.3.3

[1] https://bugs.launchpad.net/diskimage-builder/+bug/1699273
[2] https://github.com/openstack/magnum/blob/907415c984e95e09a8b872f3c551ae6108c91de1/magnum/drivers/common/image/fedora-atomic/finalise.d/80-fedora-atomic#L30

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to magnum (master)

Fix proposed to branch: master
Review: https://review.openstack.org/558525

Changed in magnum:
assignee: nobody → Bharat Kunwar (brtknr)
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on magnum (master)

Change abandoned by Bharat Kunwar (<email address hidden>) on branch: master
Review: https://review.openstack.org/558525
Reason: No longer needed

Revision history for this message
Krzysztof Opasiak (kopasiak) wrote :

If the fix is no longer needed shouldn't this ticket be closed?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.