diskimage-builder fails to create disk image- cannot uninstall PyYAML

Bug #1776634 reported by huangshan on 2018-06-13

This bug report will be marked for expiration in 49 days if no further activity occurs. (find out why)

6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
Undecided
Unassigned

Bug Description

I have the followed the instructions as specified in the steps. while i creating image using disk-image-builder to build a centos7 disk image, it shows the following error.

Cli:
disk-image-create -a amd64 -t qcow2 --image-size 2G base vm centos haproxy-octavia rebind-sshd no-resolvconf amphora-agent keepalived-octavia pip-cache devuser

Log:
flakes, pep8, flake8, diskimage-builder, ovsdbapp, itsdangerous, Flask, octavia
2018-06-13 08:33:11.071 | Found existing installation: chardet 2.2.1
2018-06-13 08:33:11.074 | Uninstalling chardet-2.2.1:
2018-06-13 08:33:11.077 | Successfully uninstalled chardet-2.2.1
2018-06-13 08:33:11.293 | Found existing installation: six 1.9.0
2018-06-13 08:33:11.296 | Uninstalling six-1.9.0:
2018-06-13 08:33:11.297 | Successfully uninstalled six-1.9.0
2018-06-13 08:33:11.427 | Found existing installation: MarkupSafe 0.11
2018-06-13 08:33:11.430 | Uninstalling MarkupSafe-0.11:
2018-06-13 08:33:11.431 | Successfully uninstalled MarkupSafe-0.11
2018-06-13 08:33:12.307 | Found existing installation: Babel 0.9.6
2018-06-13 08:33:12.310 | Uninstalling Babel-0.9.6:
2018-06-13 08:33:12.312 | Successfully uninstalled Babel-0.9.6
2018-06-13 08:33:12.749 | Found existing installation: PyYAML 3.10
2018-06-13 08:33:13.130 | Cannot uninstall 'PyYAML'. It is a distutils installed project and thus we cannot accurately determine which files belong to it which would lead to only a partial uninstall.
2018-06-13 08:33:13.236 | ++ /usr/lib/python2.7/site-packages/diskimage_builder/lib/img-functions:run_in_target:59 : check_break after-error run_in_target bash
2018-06-13 08:33:13.239 | ++ /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:check_break:123 : echo ''
2018-06-13 08:33:13.239 | ++ /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:check_break:123 : egrep -e '(,|^)after-error(,|$)' -q
2018-06-13 08:33:13.244 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/img-functions:run_in_target:1 : trap_cleanup
2018-06-13 08:33:13.247 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/img-functions:trap_cleanup:36 : exitval=1
2018-06-13 08:33:13.249 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/img-functions:trap_cleanup:37 : cleanup
2018-06-13 08:33:13.252 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/img-functions:cleanup:42 : dib-block-device umount
2018-06-13 08:33:13.462 | DEBUG diskimage_builder.block_device.blockdevice [-] Creating BlockDevice object __init__ /usr/lib/python2.7/site-packages/diskimage_builder/block_device/blockdevice.py:228
2018-06-13 08:33:13.462 | DEBUG diskimage_builder.block_device.blockdevice [-] Params [{'root-fs-type': 'ext4', 'image-dir': '/tmp/dib_image.JxLsEUU7', 'root-label': None, 'build-dir': '/tmp/dib_build.kivHgQYN', 'config': '/tmp/dib_build.kivHgQYN/block-device/config.yaml', 'mount-base': '/tmp/dib_build.kivHgQYN/mnt'}] __init__ /usr/lib/python2.7/site-packages/diskimage_builder/block_device/blockdevice.py:231
2018-06-13 08:33:13.463 | INFO diskimage_builder.block_device.blockdevice [-] State already cleaned - no way to do anything here
2018-06-13 08:33:13.477 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/img-functions:cleanup:43 : unmount_image
2018-06-13 08:33:13.480 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/img-functions:unmount_image:22 : sync
2018-06-13 08:33:13.572 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/img-functions:unmount_image:26 : unmount_dir /tmp/dib_build.kivHgQYN/mnt
2018-06-13 08:33:13.575 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:386 : local dir=/tmp/dib_build.kivHgQYN/mnt
2018-06-13 08:33:13.577 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:387 : local real_dir
2018-06-13 08:33:13.580 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:388 : local mnts
2018-06-13 08:33:13.582 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:389 : local split_mounts
2018-06-13 08:33:13.585 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:390 : local found_mountpoint
2018-06-13 08:33:13.587 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:392 : '[' '!' -d /tmp/dib_build.kivHgQYN/mnt ']'
2018-06-13 08:33:13.590 | ++ /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:399 : readlink -e /tmp/dib_build.kivHgQYN/mnt
2018-06-13 08:33:13.594 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:399 : real_dir=/tmp/dib_build.kivHgQYN/mnt
2018-06-13 08:33:13.596 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:402 : IFS='|'
2018-06-13 08:33:13.599 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:402 : read -ra split_mounts
2018-06-13 08:33:13.603 | ++ /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:407 : awk '{print $2}'
2018-06-13 08:33:13.603 | ++ /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:407 : grep '^/tmp/dib_build.kivHgQYN/mnt/'
2018-06-13 08:33:13.603 | ++ /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:407 : sort -r
2018-06-13 08:33:13.607 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:407 : mnts='/tmp/dib_build.kivHgQYN/mnt/tmp/yum
2018-06-13 08:33:13.607 | /tmp/dib_build.kivHgQYN/mnt/tmp/pip
2018-06-13 08:33:13.607 | /tmp/dib_build.kivHgQYN/mnt/tmp/in_target.d
2018-06-13 08:33:13.607 | /tmp/dib_build.kivHgQYN/mnt/sys
2018-06-13 08:33:13.607 | /tmp/dib_build.kivHgQYN/mnt/proc
2018-06-13 08:33:13.607 | /tmp/dib_build.kivHgQYN/mnt/dev/pts
2018-06-13 08:33:13.607 | /tmp/dib_build.kivHgQYN/mnt/dev'
2018-06-13 08:33:13.610 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:408 : for m in '$mnts'
2018-06-13 08:33:13.612 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:410 : found_mountpoint=false
2018-06-13 08:33:13.614 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:411 : for mountpoint in '"${split_mounts[@]}"'
2018-06-13 08:33:13.617 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:412 : [[ / != \/ ]]
2018-06-13 08:33:13.619 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:420 : '[' false == false ']'
2018-06-13 08:33:13.622 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:422 : echo 'Unmount /tmp/dib_build.kivHgQYN/mnt/tmp/yum'
2018-06-13 08:33:13.622 | Unmount /tmp/dib_build.kivHgQYN/mnt/tmp/yum
2018-06-13 08:33:13.624 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:423 : sudo umount -fl /tmp/dib_build.kivHgQYN/mnt/tmp/yum
2018-06-13 08:33:13.635 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:408 : for m in '$mnts'
2018-06-13 08:33:13.638 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:410 : found_mountpoint=false
2018-06-13 08:33:13.640 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:411 : for mountpoint in '"${split_mounts[@]}"'
2018-06-13 08:33:13.643 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:412 : [[ / != \/ ]]
2018-06-13 08:33:13.645 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:420 : '[' false == false ']'
2018-06-13 08:33:13.648 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:422 : echo 'Unmount /tmp/dib_build.kivHgQYN/mnt/tmp/pip'
2018-06-13 08:33:13.648 | Unmount /tmp/dib_build.kivHgQYN/mnt/tmp/pip
2018-06-13 08:33:13.651 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:423 : sudo umount -fl /tmp/dib_build.kivHgQYN/mnt/tmp/pip
2018-06-13 08:33:13.661 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:408 : for m in '$mnts'
2018-06-13 08:33:13.663 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:410 : found_mountpoint=false
2018-06-13 08:33:13.666 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:411 : for mountpoint in '"${split_mounts[@]}"'
2018-06-13 08:33:13.668 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:412 : [[ / != \/ ]]
2018-06-13 08:33:13.671 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:420 : '[' false == false ']'
2018-06-13 08:33:13.673 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:422 : echo 'Unmount /tmp/dib_build.kivHgQYN/mnt/tmp/in_target.d'
2018-06-13 08:33:13.673 | Unmount /tmp/dib_build.kivHgQYN/mnt/tmp/in_target.d
2018-06-13 08:33:13.676 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:423 : sudo umount -fl /tmp/dib_build.kivHgQYN/mnt/tmp/in_target.d
2018-06-13 08:33:13.686 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:408 : for m in '$mnts'
2018-06-13 08:33:13.689 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:410 : found_mountpoint=false
2018-06-13 08:33:13.691 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:411 : for mountpoint in '"${split_mounts[@]}"'
2018-06-13 08:33:13.694 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:412 : [[ / != \/ ]]
2018-06-13 08:33:13.696 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:420 : '[' false == false ']'
2018-06-13 08:33:13.699 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:422 : echo 'Unmount /tmp/dib_build.kivHgQYN/mnt/sys'
2018-06-13 08:33:13.699 | Unmount /tmp/dib_build.kivHgQYN/mnt/sys
2018-06-13 08:33:13.702 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:423 : sudo umount -fl /tmp/dib_build.kivHgQYN/mnt/sys
2018-06-13 08:33:13.712 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:408 : for m in '$mnts'
2018-06-13 08:33:13.714 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:410 : found_mountpoint=false
2018-06-13 08:33:13.717 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:411 : for mountpoint in '"${split_mounts[@]}"'
2018-06-13 08:33:13.720 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:412 : [[ / != \/ ]]
2018-06-13 08:33:13.722 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:420 : '[' false == false ']'
2018-06-13 08:33:13.725 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:422 : echo 'Unmount /tmp/dib_build.kivHgQYN/mnt/proc'
2018-06-13 08:33:13.725 | Unmount /tmp/dib_build.kivHgQYN/mnt/proc
2018-06-13 08:33:13.727 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:423 : sudo umount -fl /tmp/dib_build.kivHgQYN/mnt/proc
2018-06-13 08:33:13.738 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:408 : for m in '$mnts'
2018-06-13 08:33:13.741 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:410 : found_mountpoint=false
2018-06-13 08:33:13.743 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:411 : for mountpoint in '"${split_mounts[@]}"'
2018-06-13 08:33:13.746 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:412 : [[ / != \/ ]]
2018-06-13 08:33:13.748 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:420 : '[' false == false ']'
2018-06-13 08:33:13.751 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:422 : echo 'Unmount /tmp/dib_build.kivHgQYN/mnt/dev/pts'
2018-06-13 08:33:13.751 | Unmount /tmp/dib_build.kivHgQYN/mnt/dev/pts
2018-06-13 08:33:13.754 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:423 : sudo umount -fl /tmp/dib_build.kivHgQYN/mnt/dev/pts
2018-06-13 08:33:13.764 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:408 : for m in '$mnts'
2018-06-13 08:33:13.767 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:410 : found_mountpoint=false
2018-06-13 08:33:13.770 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:411 : for mountpoint in '"${split_mounts[@]}"'
2018-06-13 08:33:13.772 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:412 : [[ / != \/ ]]
2018-06-13 08:33:13.775 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:420 : '[' false == false ']'
2018-06-13 08:33:13.778 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:422 : echo 'Unmount /tmp/dib_build.kivHgQYN/mnt/dev'
2018-06-13 08:33:13.778 | Unmount /tmp/dib_build.kivHgQYN/mnt/dev
2018-06-13 08:33:13.780 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:unmount_dir:423 : sudo umount -fl /tmp/dib_build.kivHgQYN/mnt/dev
2018-06-13 08:33:13.791 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/img-functions:unmount_image:27 : '[' -n '' ']'
2018-06-13 08:33:13.794 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/img-functions:unmount_image:30 : '[' -n '' ']'
2018-06-13 08:33:13.797 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/img-functions:cleanup:44 : cleanup_build_dir
2018-06-13 08:33:13.800 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:cleanup_build_dir:196 : timeout 10 sh -c ' while ! sudo rm -rf /tmp/dib_build.kivHgQYN/built; do sleep 1; done'
2018-06-13 08:33:13.812 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:cleanup_build_dir:200 : sudo rm -rf /tmp/dib_build.kivHgQYN/mnt
2018-06-13 08:33:15.321 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:cleanup_build_dir:201 : kill_chroot_processes /tmp/dib_build.kivHgQYN
2018-06-13 08:33:15.361 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:cleanup_build_dir:202 : tmpfs_check 0
2018-06-13 08:33:15.363 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:23 : local echo_message=0
2018-06-13 08:33:15.366 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:24 : '[' 0 == 0 ']'
2018-06-13 08:33:15.369 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:25 : '[' -r /proc/meminfo ']'
2018-06-13 08:33:15.372 | ++ /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:26 : awk '/^MemTotal/ { print $2 }' /proc/meminfo
2018-06-13 08:33:15.376 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:26 : total_kB=3882464
2018-06-13 08:33:15.378 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:29 : RAM_NEEDED=4
2018-06-13 08:33:15.381 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:30 : '[' 3882464 -lt 4194304 ']'
2018-06-13 08:33:15.384 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:31 : '[' 0 == 1 ']'
2018-06-13 08:33:15.386 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:34 : return 1
2018-06-13 08:33:15.389 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:cleanup_build_dir:210 : rm -rf --one-file-system /tmp/dib_build.kivHgQYN
2018-06-13 08:33:15.396 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/img-functions:cleanup:45 : cleanup_image_dir
2018-06-13 08:33:15.399 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:cleanup_image_dir:214 : kill_chroot_processes /tmp/dib_image.JxLsEUU7
2018-06-13 08:33:15.433 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:cleanup_image_dir:215 : tmpfs_check 0
2018-06-13 08:33:15.436 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:23 : local echo_message=0
2018-06-13 08:33:15.438 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:24 : '[' 0 == 0 ']'
2018-06-13 08:33:15.441 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:25 : '[' -r /proc/meminfo ']'
2018-06-13 08:33:15.444 | ++ /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:26 : awk '/^MemTotal/ { print $2 }' /proc/meminfo
2018-06-13 08:33:15.449 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:26 : total_kB=3882464
2018-06-13 08:33:15.452 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:29 : RAM_NEEDED=4
2018-06-13 08:33:15.455 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:30 : '[' 3882464 -lt 4194304 ']'
2018-06-13 08:33:15.457 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:31 : '[' 0 == 1 ']'
2018-06-13 08:33:15.460 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:tmpfs_check:34 : return 1
2018-06-13 08:33:15.463 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/common-functions:cleanup_image_dir:221 : rm -rf --one-file-system /tmp/dib_image.JxLsEUU7
2018-06-13 08:33:15.467 | + /usr/lib/python2.7/site-packages/diskimage_builder/lib/img-functions:trap_cleanup:38 : exit 1
[root@compass diskimage-create]#

Ian Wienand (iwienand) wrote :

Can you please *attach* a full log; it's not really dib at fault here, it's one of the elements, but it's not clear which one from this log

Changed in diskimage-builder:
status: New → Incomplete
huangshan (huangshan) wrote :
huangshan (huangshan) wrote :

Ok, the full log is shown in the attachment.

basic os:http://cloud.centos.org/centos/7/images/CentOS-7-x86_64-GenericCloud.qcow2.xz
element: amphora-agent git /opt/amphora-agent https://git.openstack.org/openstack/octavia stable/pike

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers