Failed to open parameter YAML error while trying to build a VM image in openSUSE

Bug #1708509 reported by Swaminathan Vasudevan
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
diskimage-builder
New
Undecided
Swaminathan Vasudevan

Bug Description

Issue is seen in diskimage_builder when trying to unmount the filesystem.
umount: /tmp/dib_
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)
ERROR: failed to umount the /tmp/dib_
2017-07-28 16:03:20.008 ERROR diskimage_
Traceback (most recent call last):
  File "/usr/lib/
    with open(param_file) as f:
IOError: [Errno 2] No such file or directory: '/tmp/dib_

Revision history for this message
Swaminathan Vasudevan (swaminathan-vasudevan) wrote :

Here is the identified fix for this issue.

In /diskimage_builder/lib/common-functions under function cleanup_image_dir(), the umount of the image directory fails after succesfully creating the image.
It always complains that the device is busy.

umount: /tmp/dib_image.CyOWpD8j: target is busy
        (In some cases useful info about processes that
         use the device is found by lsof(8) or fuser(1).)

description: updated
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to diskimage-builder (master)

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

Changed in diskimage-builder:
assignee: nobody → Swaminathan Vasudevan (swaminathan-vasudevan)
status: New → In Progress
Revision history for this message
Swaminathan Vasudevan (swaminathan-vasudevan) wrote :

Here is the complete log.
http://paste.openstack.org/show/619079/

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Change abandoned on diskimage-builder (master)

Change abandoned by Swaminathan Vasudevan (<email address hidden>) on branch: master
Review: https://review.openstack.org/490637
Reason: Abandon this patch because the issue is with the 'kpartx' in the distro.

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

I'm seeing the same thing with the checkout at bc6c928bb960729e8df60562adafe2d50a1f55ec (today's HEAD) on ubuntu-xenial when using a cloud instance. Given that in the above-mentioned abandoned review there is confirmation that others have seen it too, I'm marking this confirmed.

It would be great if those who've found workarounds could note them here.

Changed in diskimage-builder:
status: In Progress → Confirmed
summary: - Failed to open parameter YAML error while trying to build a VM image in
- openSUSE
+ Failed to open parameter YAML error while trying to build a VM image
Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote : Re: Failed to open parameter YAML error while trying to build a VM image

Interestingly, I'm seeing that the image failed to convert in the log which may be a vector here:

2017-11-07 18:38:50,987 INFO nodepool.image.build.ubuntu-xenial: Converting image using qemu-img convert
2017-11-07 18:38:50,992 INFO nodepool.image.build.ubuntu-xenial: + /usr/local/lib/python2.7/dist-packages/diskimage_builder/lib/img-functions:compress_and_save_image:158 : qemu-img convert -f raw -O --checksum /opt/nodepool/dib_tmp/dib_image.L0zZhDIf/image0.raw /opt/nodepool/images/ubuntu-xenial-0000000113.--checksum-new
2017-11-07 18:38:51,015 INFO nodepool.image.build.ubuntu-xenial: qemu-img: Unknown file format '--checksum'
2017-11-07 18:38:51,023 INFO nodepool.image.build.ubuntu-xenial: + /usr/local/lib/python2.7/dist-packages/diskimage_builder/lib/img-functions:compress_and_save_image:1 : trap_cleanup
2017-11-07 18:38:51,029 INFO nodepool.image.build.ubuntu-xenial: + /usr/local/lib/python2.7/dist-packages/diskimage_builder/lib/img-functions:trap_cleanup:47 : exitval=1
2017-11-07 18:38:51,034 INFO nodepool.image.build.ubuntu-xenial: + /usr/local/lib/python2.7/dist-packages/diskimage_builder/lib/img-functions:trap_cleanup:48 : cleanup
2017-11-07 18:38:51,040 INFO nodepool.image.build.ubuntu-xenial: + /usr/local/lib/python2.7/dist-packages/diskimage_builder/lib/img-functions:cleanup:53 : dib-block-device umount
2017-11-07 18:38:52,908 INFO nodepool.image.build.ubuntu-xenial: 2017-11-07 18:38:52.907 ERROR diskimage_builder.block_device.cmd [-] Failed to open parameter YAML
2017-11-07 18:38:52,909 INFO nodepool.image.build.ubuntu-xenial: Traceback (most recent call last):
2017-11-07 18:38:52,909 INFO nodepool.image.build.ubuntu-xenial: File "/usr/local/lib/python2.7/dist-packages/diskimage_builder/block_device/cmd.py", line 106, in main
2017-11-07 18:38:52,909 INFO nodepool.image.build.ubuntu-xenial: with open(param_file) as f:
2017-11-07 18:38:52,909 INFO nodepool.image.build.ubuntu-xenial: IOError: [Errno 2] No such file or directory: '/opt/nodepool/dib_tmp/dib_build.k2V1MilI/block-device/params.yaml'
2017-11-07 18:38:52,950 INFO nodepool.image.build.ubuntu-xenial:

Revision history for this message
Jesse Pretorius (jesse-pretorius) wrote :

In my particular case the issue was misconfiguration of nodepool. I was missing the 'formats' configuration element causing nodepool to provide an incomplete command to diskimage-builder:

diskimages:
  - name: ubuntu-xenial
    formats:
      - vhd

Once that was resolved, and I installed vhd-util from the openstack-ci PPA everything worked as expected. As such I'm going to revert the title of this bug back to being OpenSUSE only and am going to revert the state to 'new' as it has yet to be confirmed.

summary: - Failed to open parameter YAML error while trying to build a VM image
+ Failed to open parameter YAML error while trying to build a VM image in
+ openSUSE
Changed in diskimage-builder:
status: Confirmed → New
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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