[DIB] DIB fails to build image on CentOS without qemu-img

Bug #1304578 reported by Andrew Lazarev
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Sahara
Fix Released
Medium
Andrew Lazarev

Bug Description

Host OS: CentOS 6.4
Trying to build centos image

=====
Downloaded and cached http://sahara-files.mirantis.com/CentOS-6.5-cloud-init.qcow2 for the first time
Repacking base image as tarball.
/tmp/image.8DDC1XRQ/hooks/root.d/10-rhel-cloud-image: line 32: qemu-img: command not found
=====

"yum install qemu-img" on host OS fixed the issue

Tags: dib
Revision history for this message
Matthew Farrellee (mattf) wrote :

do you feel this should be something solved by sahara-image-elements directly, via documentation or some other way?

imho, it's a packaging issue, e.g. yum install sahara-image-elements would depend on diskimage-builder which would depend on qemu-img.

Revision history for this message
Andrew Lazarev (alazarev) wrote :

sahara-image-elements installs qemu-kvm already. Probably qemu-kvm depends on qemu-img in other systems and that's why image build works correctly. But it seems it is not true for centos. Most likely changing "yum install qemu-kvm kpartx git -y" to "yum install qemu-kvm qemu-img kpartx git -y" will fix the issue.

Revision history for this message
Matthew Farrellee (mattf) wrote :

i'm typically of the persuasion that programs should error out if they're missing a dep. there's often inconsistency in package names across platforms.

for instance, on my rhel 6.5 machine -

# rpm -qf $(which qemu-img)
qemu-img-rhev-0.12.1.2-2.415.el6_5.5.x86_64

# rpm -q --whatrequires qemu-img
python-cinder-2013.2.2-2.el6ost.noarch

# rpm -q --provides qemu-img-rhev
qemu-img = 2:0.12.1.2-2.415.el6_5.5
qemu-img-rhev = 2:0.12.1.2-2.415.el6_5.5
qemu-img-rhev(x86-64) = 2:0.12.1.2-2.415.el6_5.5

you're proposed fix will happen to work because qemu-img-rhev also calls itself qemu-img. that may not be the case on the centos system.

in any event, the check-and-error ship has already saild for diskimage-create. so +1 on your approach.

Changed in sahara:
status: New → Triaged
importance: Undecided → Medium
status: Triaged → In Progress
assignee: nobody → Andrew Lazarev (alazarev)
milestone: none → icehouse-rc2
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara-image-elements (master)

Reviewed: https://review.openstack.org/86152
Committed: https://git.openstack.org/cgit/openstack/sahara-image-elements/commit/?id=e77a859bb44145d915ba66a5cfa35da9429f619e
Submitter: Jenkins
Branch: master

commit e77a859bb44145d915ba66a5cfa35da9429f619e
Author: Andrew Lazarev <email address hidden>
Date: Tue Apr 8 13:46:41 2014 -0700

    [DIB] Added qemu-img dependency for CentOS host system

    Change-Id: Id9535abf1da8bfc5767ead1f4e75b578ae72b521
    Closes-Bug: #1304578

Changed in sahara:
status: In Progress → Fix Committed
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to sahara-image-elements (milestone-proposed)

Fix proposed to branch: milestone-proposed
Review: https://review.openstack.org/86291

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to sahara-image-elements (milestone-proposed)

Reviewed: https://review.openstack.org/86291
Committed: https://git.openstack.org/cgit/openstack/sahara-image-elements/commit/?id=8750cd9a24ff904efafc6ba6c5b8be8afaf4629e
Submitter: Jenkins
Branch: milestone-proposed

commit 8750cd9a24ff904efafc6ba6c5b8be8afaf4629e
Author: Andrew Lazarev <email address hidden>
Date: Tue Apr 8 13:46:41 2014 -0700

    [DIB] Added qemu-img dependency for CentOS host system

    Change-Id: Id9535abf1da8bfc5767ead1f4e75b578ae72b521
    Closes-Bug: #1304578
    (cherry picked from commit e77a859bb44145d915ba66a5cfa35da9429f619e)

Changed in sahara:
status: Fix Committed → Fix Released
Thierry Carrez (ttx)
Changed in sahara:
milestone: icehouse-rc2 → 2014.1
Luigi Toscano (ltoscano)
tags: added: dib
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.