'losetup' crashes when attempted to create a Fedora disk image
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
diskimage-builder |
Fix Released
|
Medium
|
Jan Provaznik |
Bug Description
To reproduce, invoke disk-image-create with complete trace enabled, and attempt to create a Fedora image:
$ git clone https:/
$ cd disk-image-builder
$ export PATH=$PATH:
$ disk-image-create -o fedora-test fedora -a i386 -x
+ true
+ case "$1" in
+ shift
+ break
+ '[' '' = 1 -a /root '!=' '' ']'
+ source /home/kashyap/
++ source /home/kashyap/
+++ '[' -f /etc/debian_version ']'
++++ uname -m
+++ _ARCH=x86_64
+++ case $_ARCH in
+++ _ARCH=amd64
+++ ARCH=i386
+++ export ARCH
+++ export DIB_NO_TMPFS=0
+++ DIB_NO_TMPFS=0
++++ dirname /home/kashyap/
+++ _BASE_ELEMENT_
+++ ELEMENTS_PATH=
+++ export ELEMENTS_
+++ ELEMENTS_
++ FS_TYPE=ext4
++ IMAGE_TYPE=qcow2
++ IMAGE_NAME=
+ source /home/kashyap/
+ source /home/kashyap/
+ arg_to_elements fedora
+ for arg in '"$@"'
+ IMAGE_ELEMENT=' fedora'
+ '[' '' '!=' 1 ']'
+ IMAGE_ELEMENT='base fedora'
+ echo 'Building elements: base fedora'
Building elements: base fedora
+ echo 'If prompted for sudo, install sudoers.
If prompted for sudo, install sudoers.
++ /home/kashyap/
+ IMAGE_ELEMENT=
+ echo 'Expanded element dependencies to: dib-run-parts dracut-network base fedora cache-url'
Expanded element dependencies to: dib-run-parts dracut-network base fedora cache-url
+ IMAGE_NAME=
+ mk_build_dir
++ mktemp -t -d --tmpdir=/tmp image.XXXXXXXX
+ export TMP_BUILD_
+ TMP_BUILD_
+ '[' 0 -eq 0 ']'
+ tmpfs_check
+ '[' 0 == 0 ']'
+ '[' -r /proc/meminfo ']'
++ awk '/^MemTotal/ { print $2 }' /proc/meminfo
+ total_kB=23649504
+ '[' 23649504 -lt 4194304 ']'
+ return 0
+ sudo mount -t tmpfs tmpfs /tmp/image.XWWZNOAm
++ id -u
++ id -g
+ sudo chown 0:0 /tmp/image.XWWZNOAm
+ trap cleanup EXIT
+ echo Building in /tmp/image.XWWZNOAm
Building in /tmp/image.XWWZNOAm
+ export TMP_IMAGE_
+ TMP_IMAGE_
+ export TMP_HOOKS_
+ TMP_HOOKS_
+ create_base
+ mkdir /tmp/image.
+ export TMP_MOUNT_
+ TMP_MOUNT_
+ TARGET_
+ run_d root
+ check_element
+ '[' -d /tmp/image.
+ generate_hooks
+ mkdir -p /tmp/image.
+ for _ELEMENT in '$IMAGE_ELEMENT'
++ echo /home/kashyap/
++ tr : ' '
+ for dir in '$(echo $ELEMENTS_PATH | tr ":" " ")'
+ '[' -d /home/kashyap/
+ cp -t /tmp/image.
+ break
+ for _ELEMENT in '$IMAGE_ELEMENT'
++ echo /home/kashyap/
++ tr : ' '
+ for dir in '$(echo $ELEMENTS_PATH | tr ":" " ")'
+ '[' -d /home/kashyap/
+ cp -t /tmp/image.
/kashyap/
+ break
+ for _ELEMENT in '$IMAGE_ELEMENT'
++ echo /home/kashyap/
++ tr : ' '
+ for dir in '$(echo $ELEMENTS_PATH | tr ":" " ")'
+ '[' -d /home/kashyap/
+ cp -t /tmp/image.
/bin/..
./elements/
+ break
+ for _ELEMENT in '$IMAGE_ELEMENT'
++ echo /home/kashyap/
++ tr : ' '
+ for dir in '$(echo $ELEMENTS_PATH | tr ":" " ")'
+ '[' -d /home/kashyap/
+ cp -t /tmp/image.
/elements/
/elements/
+ break
+ for _ELEMENT in '$IMAGE_ELEMENT'
++ echo /home/kashyap/
++ tr : ' '
+ for dir in '$(echo $ELEMENTS_PATH | tr ":" " ")'
+ '[' -d /home/kashyap/
+ cp -t /tmp/image.
+ break
+ check_break before-root bash
+ echo ''
+ egrep -e '(,|^)before-
+ '[' -d /tmp/image.
+ run-parts /tmp/image.
/tmp/image.
Fetching Base Image
% Total % Received % Xferd Average Speed Time Time Time Current
100 216M 100 216M 0 0 212k 0 0:17:21 0:17:21 --:--:-- 132k
Downloaded and cached http://
Repacking base image as tarball.
Working in /tmp/tmp.5ypJ7B4vjn
mount: could not find any device /dev/loop#Bad address
can't set up loop
mount: /dev/mapper is not a block device
+ check_break after-root bash
+ echo ''
+ egrep -e '(,|^)after-
++ ls /tmp/image.
++ grep -v lost+found
+ '[' -z usr ']'
+ '[' -L /tmp/image.
+ '[' -f /tmp/image.
+ sudo touch /tmp/image.
touch: cannot touch '/tmp/image.
+ cleanup
+ unmount_image
+ sudo umount -f /tmp/image.
umount: /tmp/image.
+ true
+ sudo umount -f /tmp/image.
umount: /tmp/image.
+ true
+ sudo umount -f /tmp/image.
umount: /tmp/image.
+ true
+ sudo umount -f /tmp/image.
umount: /tmp/image.
+ true
+ sleep 5
+ sudo umount -f /tmp/image.
umount: /tmp/image.
+ true
+ sync
+ '[' -n '' ']'
+ cleanup_dirs
+ sudo rm -rf /tmp/image.
+ sudo rm -rf /tmp/image.
+ sudo umount -f /tmp/image.XWWZNOAm
+ rm -rf /tmp/image.XWWZNOAm
affects: | tripleo → diskimage-builder |
Changed in diskimage-builder: | |
assignee: | nobody → Richard Su (rwsu) |
Changed in diskimage-builder: | |
status: | Fix Committed → Fix Released |
Re-invoking it again fails to set up loop device:
$ disk-image-create -o fedora-test fedora -a i386 -x
. root(,| $)' -q tsgcLWGl/ hooks/root. d ']' tsgcLWGl/ hooks/root. d tsgcLWGl/ hooks/root. d/10-fedora- cloud-image:
.
.
+ echo ''
+ egrep -e '(,|^)before-
+ '[' -d /tmp/image.
+ run-parts /tmp/image.
/tmp/image.
Fetching Base Image
Dload Upload Total Spent Left Speed mattdm. fedorapeople. org/cloud- images/ /Fedora18- Cloud-i386- latest. qcow2 root(,| $)' -q tsgcLWGl/ mnt tsgcLWGl/ mnt/etc/ resolv. conf ']' tsgcLWGl/ mnt/etc/ resolv. conf ']' tsgcLWGl/ mnt/etc/ resolv. conf tsgcLWGl/ mnt/etc/ resolv. conf': No such file or directory tsgcLWGl/ mnt/sys tsgcLWGl/ mnt/sys: not found tsgcLWGl/ mnt/proc tsgcLWGl/ mnt/proc: not found tsgcLWGl/ mnt/dev tsgcLWGl/ mnt/dev: not found tsgcLWGl/ mnt/tmp/ in_target. d tsgcLWGl/ mnt/tmp/ in_target. d: not found tsgcLWGl/ mnt tsgcLWGl/ mnt: not mounted tsgcLWGl/ built tsgcLWGl/ mnt
% Total % Received % Xferd Average Speed Time Time Time Current
0 0 0 0 0 0 0 0 --:--:-- 0:00:01 --:--:-- 0
Server copy has not changed. Using locally cached http://
Repacking base image as tarball.
Working in /tmp/tmp.sDrZzw96Zx
mount: could not find any free loop deviceBad address
can't set up loop
mount: /dev/mapper is not a block device
+ check_break after-root bash
+ echo ''
+ egrep -e '(,|^)after-
++ ls /tmp/image.
++ grep -v lost+found
+ '[' -z usr ']'
+ '[' -L /tmp/image.
+ '[' -f /tmp/image.
+ sudo touch /tmp/image.
touch: cannot touch '/tmp/image.
+ cleanup
+ unmount_image
+ sudo umount -f /tmp/image.
umount: /tmp/image.
+ true
+ sudo umount -f /tmp/image.
umount: /tmp/image.
+ true
+ sudo umount -f /tmp/image.
umount: /tmp/image.
+ true
+ sudo umount -f /tmp/image.
umount: /tmp/image.
+ true
+ sleep 5
+ sudo umount -f /tmp/image.
umount: /tmp/image.
+ true
+ sync
+ '[' -n '' ']'
+ cleanup_dirs
+ sudo rm -rf /tmp/image.
+ sudo rm -rf /tmp/image.
+ sudo umount -f /tmp/image.tsgcLWGl
+ rm -rf /tmp/image.tsgcLWGl