cannot stat .../etc/dib_arguments

Bug #1308224 reported by Michael McCune
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
diskimage-builder
Fix Released
High
Unassigned

Bug Description

I've been running diskimage-builder through the sahara-image-elements project and recently a change to diskimage-builder has introduced this error.

It appears that when dib-run-parts gets to elements/manifests/cleanup.d/01-copy-manifests-dir it fails to find a dib_arguments file and the script fails.

Here is the last output from my script:

dib-run-parts Tue Apr 15 14:35:17 EDT 2014 Running /tmp/image.GSa9RgVv/hooks/cleanup.d/01-copy-
manifests-dir
+ '[' -d /tmp/image.GSa9RgVv/mnt//etc/dib-manifests ']'
+ sudo mv /tmp/image.GSa9RgVv/mnt/etc/dib_arguments /tmp/image.GSa9RgVv/mnt//etc/dib-manifests
mv: cannot stat '/tmp/image.GSa9RgVv/mnt/etc/dib_arguments': No such file or directory

Revision history for this message
Robert Nettleton (rnettleton) wrote :

I'm also running into this error. It appears to be related to the "manifests" element in diskimage-builder.

The HDP images use the "source-repositories" element, which pulls in "manifests" as a dependency. I'm not sure yet if the other images will fail to generate due to this error.

My guess is that there is some conflict/script ordering issue going on, since this script has only recently been added to the "manifests" element.

Revision history for this message
Michael McCune (mimccune) wrote :

When running the diskimage-create from sahara-image-elements, I have only seen this error running CentOS images.

Revision history for this message
Robert Nettleton (rnettleton) wrote :

I was seeing this error yesterday on CentOS, but also on Ubuntu 12.0.4 LTS.

As of this afternoon, I'm seeing a completely different error when running the diskimage-create.sh script from sahara-image-elements:

"> Package syslinux.x86_64 0:4.02-16.el6_5 will be installed
--> Processing Dependency: syslinux-nonlinux for package: syslinux-4.02-16.el6_5.x86_64
---> Package syslinux-extlinux.x86_64 0:4.02-16.el6_5 will be installed
--> Processing Dependency: syslinux-extlinux-nonlinux for package: syslinux-extlinux-4.02-16.el6_5.x86_64
--> Finished Dependency Resolution
Error: Package: syslinux-4.02-16.el6_5.x86_64 (updates)
           Requires: syslinux-nonlinux
Error: Package: syslinux-extlinux-4.02-16.el6_5.x86_64 (updates)
           Requires: syslinux-extlinux-nonlinux
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest
Command exited with non-zero status 1"

Revision history for this message
Michael McCune (mimccune) wrote :

I just started getting this one too. It seems like a different error thouhg.

Revision history for this message
Michael McCune (mimccune) wrote :

I'm wondering if these errors are related to building x86_64 versions of CentOS. It looks like those dependency packages only exist for i686:

http://pkgs.org/download/syslinux-extlinux-nonlinux
http://pkgs.org/download/syslinux-nonlinux

Revision history for this message
Michael McCune (mimccune) wrote :

back to the original bug. I am still getting this while building CentOS images. I added a small patch to 01-copy-manifests-dir to check for the presence of the manifest files before trying to move them and it allowed me to build an image successfully.

Revision history for this message
Michael McCune (mimccune) wrote :

This patch allowed me to successfully build images.

Revision history for this message
Robert Nettleton (rnettleton) wrote :

I'm now able to reproduce this outside of the "sahara-image-elements" project, just using the latest diskimage-builder tree.

The problem seems to occur when an image generation attempt uses the "source-repositories" element, but also passes in the "-n" flag to disk-image-create, which instructs disk-image-create to exclude the "base" element.

Recent changes to the "manifests" element (which "source-repositories" depends on) appear to be the cause of this bug.

The "sahara-image-elements" project uses "-n" in cases where CentOS images are generated. This is a required configuration for the Vanilla and HDP plugin images, which both require CentOS support.

Steps to reproduce this with the latest diskimage-builder:

export BASE_IMAGE_FILE=CentOS-6.4-cloud-init.qcow2
export DIB_CLOUD_IMAGES=http://sahara-files.mirantis.com

disk-image-create -n -o test.qcow2 rhel source-repositories

This creation attempt will fail with the error message reported by the filer:

"dib-run-parts Thu Apr 17 11:44:22 EDT 2014 Running /tmp/image.ReBpJeRH/hooks/cleanup.d/01-copy-manifests-dir
+ '[' -d /tmp/image.ReBpJeRH/mnt//etc/dib-manifests ']'
+ sudo mv /tmp/image.ReBpJeRH/mnt/etc/dib_arguments /tmp/image.ReBpJeRH/mnt//etc/dib-manifests
mv: cannot stat `/tmp/image.ReBpJeRH/mnt/etc/dib_arguments': No such file or directory"

I'm seeing this error on Ubuntu 12.0.4 and CentOS 6.4.

Revision history for this message
Ben Nemec (bnemec) wrote :

Sounds like this should be relatively easy to fix - just need to make the manifests element safe to use without base.

Changed in diskimage-builder:
status: New → Triaged
importance: Undecided → High
Revision history for this message
Michael McCune (mimccune) wrote :

Patch pushed for review at https://review.openstack.org/#/c/89386/

Revision history for this message
Openstack Gerrit (openstack-gerrit) wrote : Fix merged to diskimage-builder (master)

Reviewed: https://review.openstack.org/89386
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=bcf529ce802301dbb262c4d1647e4c3d3fd8eb3a
Submitter: Jenkins
Branch: master

commit bcf529ce802301dbb262c4d1647e4c3d3fd8eb3a
Author: Michael McCune <email address hidden>
Date: Mon Apr 21 13:27:17 2014 -0400

    cleaning up 01-copy-manifests-dir

    This change adds extra tests to the
    elements/manifests/cleanup.d/01-copy-manifests-dir script to prevent it
    from exiting with an error due to non-existant files.

    The premature exit condition only seems to happen when an image is being
    created without including the "base" element.

    Changes
    * adding file detection tests for dib_arguments and dib_environment
    files

    Closes-Bug: #1308224
    Change-Id: Iaa8bafb6765241408b9f02d4896913d15f2f401d

Changed in diskimage-builder:
status: Triaged → Fix Committed
Changed in diskimage-builder:
status: Fix Committed → Fix Released
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.