disk-image-create fails for fedora-20 images
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
diskimage-builder |
Fix Released
|
Medium
|
Ian Wienand |
Bug Description
When using latest diskimage-builder from github, I am getting an error when I try to build a disk image based on fedora-20.x86_64. I followed the instructs to build a disk image for heat software config, but I don't think the problem is related heat software config in particular.
Here are the last few lines of ouput I got when running disk-image-create:
Target: install.d
Script Seconds
-------
99-up-to-date 107.477
99-os-refresh-
99-install-
99-dkms 1.735
50-store-
50-heat-
50-heat-
50-heat-
50-heat-config 20.897
11-create-
10-os-refresh-
10-os-config-
10-os-collect-
10-cloud-init 0.005
01-source-
01-pip-manifest 0.015
01-install-pip 3.853
01-install-deps 2.783
00-fedora-fixup-vim 3.368
00-fedora-
00-fedora-
00-fedora-
00-ccache 1.319
00-baseline-
-------
dib-run-parts Mon May 5 16:19:42 UTC 2014 Running /tmp/in_
dib-run-parts Mon May 5 16:19:42 UTC 2014 05-fstab-
dib-run-parts Mon May 5 16:19:42 UTC 2014 Running /tmp/in_
NOZEROCONF=yes
dib-run-parts Mon May 5 16:19:42 UTC 2014 06-network-
dib-run-parts Mon May 5 16:19:42 UTC 2014 Running /tmp/in_
ls: cannot access /usr/src/
dib-run-parts Mon May 5 16:19:42 UTC 2014 99-dkms completed
-------
Target: post-install.d
Script Seconds
-------
99-dkms 0.167
06-network-
05-fstab-
-------
dib-run-parts Mon May 5 18:19:42 CEST 2014 Running /tmp/image.
Checking that no-one is using this disk right now ...
BLKRRPART: Invalid argument
OK
Disk /dev/loop1: cannot get geometry
sfdisk: ERROR: sector 0 does not have an msdos signature
/dev/loop1: unrecognized partition table type
No partitions found
BLKRRPART: Invalid argument
If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)
to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512 count=1
(See fdisk(8).)
dib-run-parts Mon May 5 18:19:42 CEST 2014 10-partition completed
Disk /dev/loop1: 303 cylinders, 255 heads, 63 sectors/track
Old situation:
New situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/loop1p1 * 1 302 302 2425815 83 Linux
/dev/loop1p2 0 - 0 0 0 Empty
/dev/loop1p3 0 - 0 0 0 Empty
/dev/loop1p4 0 - 0 0 0 Empty
Successfully wrote the new partition table
Re-reading the partition table ...
IMAGE_BLOCK_
-------
Target: block-device.d
Script Seconds
-------
10-partition 0.112
-------
mke2fs 1.42 (29-Nov-2011)
Discarding device blocks: done
Filesystem label=cloudimg-
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
606480 inodes, 606453 blocks
30322 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=624951296
19 block groups
32768 blocks per group, 32768 fragments per group
31920 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
Allocating group tables: done
Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done
dib-run-parts Mon May 5 16:19:52 UTC 2014 Running /tmp/in_
dib-run-parts Mon May 5 16:19:52 UTC 2014 01-install-
dib-run-parts Mon May 5 16:19:52 UTC 2014 Running /tmp/in_
+ set -o pipefail
++ grep '^SELINUX=' /etc/selinux/config
++ awk -F = '{print $2}'
+ CONFIGURED_
+ '[' enforcing == enforcing ']'
+ setfiles /etc/selinux/
++ mktemp
+ FIXFILES_
+ fixfiles -l /tmp/tmp.08Cj5eM7ZH restore
fixfiles: No suitable file systems found
Cleaning up labels on /tmp
cat: /initial_
secon: SELinux is not enabled
Changed in diskimage-builder: | |
assignee: | Richard Su (rwsu) → Ian Wienand (iwienand) |
Changed in diskimage-builder: | |
status: | Fix Committed → Fix Released |
I have also seen this issue when selinux is in enforcing mode. I believe the "fixfiles" command has been silently failing and it has been unearthed by this change to add "set -e" to fail scripts when there is a failure. https:/ /github. com/openstack/ diskimage- builder/ commit/ f6ba2aeaf45c2e4 ce4879cb171e973 aec78e4b0a# diff-9aa8c22f05 30c01d445edc3b3 87345fd
I have been able to workaround this issue by changing the fixboot command to "fixfiles onboot" which move the check and relabeling to boot time. I think it would still be preferable to find a way to relabel when the images are created, because it cuts deployment time.