Use DIB to Building Guest Images for OpenStack Trove failed.
export ELEMENTS_PATH=/root/tripleo-image-elements/elements:/root/trove-guest-image-elements/elements:/root/diskimage-builder/diskimage_builder/elements:/root/trove/integration/scripts/files/elements
export DISTRO="ubuntu"
export SERVICE_TYPE="mysql"
export DIB_CLOUD_INIT_DATASOURCES="ConfigDrive"
export DIB_APT_CONF_DIR=/etc/apt/apt.conf.d
export DIB_CLOUD_INIT_ETC_HOSTS=true
export QEMU_IMG_OPTIONS="--qemu-img-options compat=1.1"
(.venv) root@ubun16:~# ls /root/diskimage-builder/diskimage_builder/elements/
Display all 113 possibilities? (y or n)
(.venv) root@ubun16:~# ls /root/diskimage-builder/diskimage_builder/elements/ubuntu
ubuntu/ ubuntu-common/ ubuntu-minimal/ ubuntu-signed/ ubuntu-systemd-container/
(.venv) root@ubun16:~# ls /root/diskimage-builder/diskimage_builder/elements/ubuntu/
element-deps element-provides environment.d install.d package-installs.yaml pre-install.d README.rst root.d test-elements
(.venv) root@ubun16:~# ls /root/diskimage-builder/diskimage_builder/elements/vm
element-deps finalise.d README.rst
(.venv) root@ubun16:~# ls /root/diskimage-builder/diskimage_builder/elements/cloud-init-datasources
install.d README.rst
(.venv) root@ubun16:~# ls trove/integration/scripts/files/elements/ubuntu-guest
extra-data.d install.d post-install.d pre-install.d
(.venv) root@ubun16:~# ls trove/integration/scripts/files/elements/ubuntu-mysql
pre-install.d
When I execute following command ,that report build failed.
openstack version is stein,build trove image in ubuntu 16.04,disk-image-build version is 3.3.1.
The link to the reference document is:
https://docs.openstack.org/trove/stein/admin/building_guest_images.html.
disk-image-create -a amd64 -o "trove-${DISTRO}-${SERVICE_TYPE}-dev.qcow2" -x ${QEMU_IMG_OPTIONS} ${DISTRO} vm cloud-init-datasources ${DISTRO}-guest ${DISTRO}-${SERVICE_TYPE}
......
2020-09-23 03:14:06.946 | ++ export DISTRO_NAME=ubuntu
2020-09-23 03:14:06.946 | ++ DISTRO_NAME=ubuntu
2020-09-23 03:14:06.946 | ++ export DIB_RELEASE=bionic
2020-09-23 03:14:06.946 | ++ DIB_RELEASE=bionic
2020-09-23 03:14:06.946 | ++ export DIB_DEBIAN_COMPONENTS=main,universe
2020-09-23 03:14:06.946 | ++ DIB_DEBIAN_COMPONENTS=main,universe
2020-09-23 03:14:06.946 | ++ ARCH=amd64
2020-09-23 03:14:06.946 | ++ [[ arm64 armhf powerpc ppc64el s390x =~ amd64 ]]
2020-09-23 03:14:06.946 | ++ default_ubuntu_mirror=http://archive.ubuntu.com/ubuntu
2020-09-23 03:14:06.946 | ++ export DIB_DISTRIBUTION_MIRROR=http://archive.ubuntu.com/ubuntu
2020-09-23 03:14:06.946 | ++ DIB_DISTRIBUTION_MIRROR=http://archive.ubuntu.com/ubuntu
2020-09-23 03:14:06.946 | dib-run-parts Sourcing environment file /tmp/dib_build.shmG24Ae/hooks/extra-data.d/../environment.d/11-dib-install-type.bash
2020-09-23 03:14:06.948 | + source /tmp/dib_build.shmG24Ae/hooks/extra-data.d/../environment.d/11-dib-install-type.bash
2020-09-23 03:14:06.948 | ++ export DIB_DEFAULT_INSTALLTYPE=source
2020-09-23 03:14:06.948 | ++ DIB_DEFAULT_INSTALLTYPE=source
2020-09-23 03:14:06.948 | dib-run-parts Sourcing environment file /tmp/dib_build.shmG24Ae/hooks/extra-data.d/../environment.d/11-ubuntu-init-system.bash
2020-09-23 03:14:06.950 | + source /tmp/dib_build.shmG24Ae/hooks/extra-data.d/../environment.d/11-ubuntu-init-system.bash
2020-09-23 03:14:06.950 | ++ [[ bionic == \t\r\u\s\t\y ]]
2020-09-23 03:14:06.950 | ++ export DIB_INIT_SYSTEM=systemd
2020-09-23 03:14:06.950 | ++ DIB_INIT_SYSTEM=systemd
2020-09-23 03:14:06.950 | dib-run-parts Sourcing environment file /tmp/dib_build.shmG24Ae/hooks/extra-data.d/../environment.d/14-manifests
2020-09-23 03:14:06.952 | + source /tmp/dib_build.shmG24Ae/hooks/extra-data.d/../environment.d/14-manifests
2020-09-23 03:14:06.952 | ++ export DIB_MANIFEST_IMAGE_DIR=/etc/dib-manifests
2020-09-23 03:14:06.952 | ++ DIB_MANIFEST_IMAGE_DIR=/etc/dib-manifests
2020-09-23 03:14:06.952 | ++ export DIB_MANIFEST_SAVE_DIR=trove-ubuntu-mysql-dev.d/
2020-09-23 03:14:06.953 | ++ DIB_MANIFEST_SAVE_DIR=trove-ubuntu-mysql-dev.d/
2020-09-23 03:14:06.953 | dib-run-parts Sourcing environment file /tmp/dib_build.shmG24Ae/hooks/extra-data.d/../environment.d/15-block-device.bash
2020-09-23 03:14:06.955 | + source /tmp/dib_build.shmG24Ae/hooks/extra-data.d/../environment.d/15-block-device.bash
2020-09-23 03:14:06.955 | ++ [[ arm64 aarch64 =~ amd64 ]]
2020-09-23 03:14:06.955 | ++ export DIB_BLOCK_DEVICE=mbr
2020-09-23 03:14:06.955 | ++ DIB_BLOCK_DEVICE=mbr
2020-09-23 03:14:06.955 | dib-run-parts Sourcing environment file /tmp/dib_build.shmG24Ae/hooks/extra-data.d/../environment.d/99-cloud-init-datasources.bash
2020-09-23 03:14:06.957 | + source /tmp/dib_build.shmG24Ae/hooks/extra-data.d/../environment.d/99-cloud-init-datasources.bash
2020-09-23 03:14:06.957 | ++ export DIB_CLOUD_INIT_DATASOURCES=ConfigDrive
2020-09-23 03:14:06.957 | ++ DIB_CLOUD_INIT_DATASOURCES=ConfigDrive
2020-09-23 03:14:06.957 | dib-run-parts Sourcing environment file /tmp/dib_build.shmG24Ae/hooks/extra-data.d/../environment.d/99-dib-init-system
2020-09-23 03:14:06.959 | + source /tmp/dib_build.shmG24Ae/hooks/extra-data.d/../environment.d/99-dib-init-system
2020-09-23 03:14:06.959 | ++ '[' -z systemd ']'
2020-09-23 03:14:06.959 | ++ case $DIB_INIT_SYSTEM in
2020-09-23 03:14:06.959 | dib-run-parts Running /tmp/dib_build.shmG24Ae/hooks/extra-data.d/10-create-pkg-map-dir
2020-09-23 03:14:06.969 | Copying pkg-map for bootloader
2020-09-23 03:14:06.976 | Copying pkg-map for base
2020-09-23 03:14:06.982 | Copying pkg-map for cache-url
2020-09-23 03:14:06.989 | dib-run-parts 10-create-pkg-map-dir completed
2020-09-23 03:14:06.989 | dib-run-parts Running /tmp/dib_build.shmG24Ae/hooks/extra-data.d/11-ssh-key-dev
2020-09-23 03:14:06.991 | + set -eu
2020-09-23 03:14:06.991 | + set -o pipefail
2020-09-23 03:14:06.992 | + source /root/.venv/lib/python3.5/site-packages/diskimage_builder/lib/die
2020-09-23 03:14:06.992 | ++ export -f die
2020-09-23 03:14:06.992 | + '[' -n /tmp/dib_build.shmG24Ae/hooks ']'
2020-09-23 03:14:06.992 | /tmp/dib_build.shmG24Ae/hooks/extra-data.d/11-ssh-key-dev: line 14: DEV_MODE: unbound variable
2020-09-23 03:14:06.996 | + diskimage_builder/lib/common-functions:run_d:1 : trap_cleanup
2020-09-23 03:14:06.999 | + diskimage_builder/lib/img-functions:trap_cleanup:36 : exitval=1
2020-09-23 03:14:07.002 | + diskimage_builder/lib/img-functions:trap_cleanup:37 : cleanup
2020-09-23 03:14:07.005 | + diskimage_builder/lib/img-functions:cleanup:42 : unmount_image
2020-09-23 03:14:07.008 | + diskimage_builder/lib/img-functions:unmount_image:22 : sync
2020-09-23 03:14:07.079 | + diskimage_builder/lib/img-functions:unmount_image:26 : unmount_dir /tmp/dib_build.shmG24Ae/mnt
2020-09-23 03:14:07.082 | + diskimage_builder/lib/common-functions:unmount_dir:414 : local dir=/tmp/dib_build.shmG24Ae/mnt
2020-09-23 03:14:07.085 | + diskimage_builder/lib/common-functions:unmount_dir:415 : local real_dir
2020-09-23 03:14:07.087 | + diskimage_builder/lib/common-functions:unmount_dir:416 : local mnts
2020-09-23 03:14:07.090 | + diskimage_builder/lib/common-functions:unmount_dir:417 : local split_mounts
2020-09-23 03:14:07.093 | + diskimage_builder/lib/common-functions:unmount_dir:418 : local found_mountpoint
2020-09-23 03:14:07.095 | + diskimage_builder/lib/common-functions:unmount_dir:420 : '[' '!' -d /tmp/dib_build.shmG24Ae/mnt ']'
2020-09-23 03:14:07.099 | ++ diskimage_builder/lib/common-functions:unmount_dir:427 : readlink -e /tmp/dib_build.shmG24Ae/mnt
2020-09-23 03:14:07.105 | + diskimage_builder/lib/common-functions:unmount_dir:427 : real_dir=/tmp/dib_build.shmG24Ae/mnt
2020-09-23 03:14:07.108 | + diskimage_builder/lib/common-functions:unmount_dir:430 : IFS='|'
2020-09-23 03:14:07.111 | + diskimage_builder/lib/common-functions:unmount_dir:430 : read -ra split_mounts
2020-09-23 03:14:07.116 | ++ diskimage_builder/lib/common-functions:unmount_dir:435 : sort -r
2020-09-23 03:14:07.116 | ++ diskimage_builder/lib/common-functions:unmount_dir:435 : awk '{print $2}'
2020-09-23 03:14:07.116 | ++ diskimage_builder/lib/common-functions:unmount_dir:435 : grep '^/tmp/dib_build.shmG24Ae/mnt/'
2020-09-23 03:14:07.123 | + diskimage_builder/lib/common-functions:unmount_dir:435 : mnts='/tmp/dib_build.shmG24Ae/mnt/var/cache/apt/archives
2020-09-23 03:14:07.123 | /tmp/dib_build.shmG24Ae/mnt/sys
2020-09-23 03:14:07.123 | /tmp/dib_build.shmG24Ae/mnt/proc
2020-09-23 03:14:07.123 | /tmp/dib_build.shmG24Ae/mnt/dev/pts
2020-09-23 03:14:07.123 | /tmp/dib_build.shmG24Ae/mnt/dev'
2020-09-23 03:14:07.126 | + diskimage_builder/lib/common-functions:unmount_dir:436 : for m in '$mnts'
2020-09-23 03:14:07.128 | + diskimage_builder/lib/common-functions:unmount_dir:438 : found_mountpoint=false
2020-09-23 03:14:07.131 | + diskimage_builder/lib/common-functions:unmount_dir:439 : for mountpoint in '"${split_mounts[@]}"'
2020-09-23 03:14:07.134 | + diskimage_builder/lib/common-functions:unmount_dir:440 : [[ / != \/ ]]
2020-09-23 03:14:07.137 | + diskimage_builder/lib/common-functions:unmount_dir:448 : '[' false == false ']'
2020-09-23 03:14:07.140 | + diskimage_builder/lib/common-functions:unmount_dir:450 : echo 'Unmount /tmp/dib_build.shmG24Ae/mnt/var/cache/apt/archives'
2020-09-23 03:14:07.140 | Unmount /tmp/dib_build.shmG24Ae/mnt/var/cache/apt/archives
2020-09-23 03:14:07.143 | + diskimage_builder/lib/common-functions:unmount_dir:451 : sudo umount -fl /tmp/dib_build.shmG24Ae/mnt/var/cache/apt/archives
2020-09-23 03:14:07.180 | + diskimage_builder/lib/common-functions:unmount_dir:436 : for m in '$mnts'
2020-09-23 03:14:07.182 | + diskimage_builder/lib/common-functions:unmount_dir:438 : found_mountpoint=false
2020-09-23 03:14:07.185 | + diskimage_builder/lib/common-functions:unmount_dir:439 : for mountpoint in '"${split_mounts[@]}"'
2020-09-23 03:14:07.188 | + diskimage_builder/lib/common-functions:unmount_dir:440 : [[ / != \/ ]]
2020-09-23 03:14:07.191 | + diskimage_builder/lib/common-functions:unmount_dir:448 : '[' false == false ']'
2020-09-23 03:14:07.194 | + diskimage_builder/lib/common-functions:unmount_dir:450 : echo 'Unmount /tmp/dib_build.shmG24Ae/mnt/sys'
2020-09-23 03:14:07.194 | Unmount /tmp/dib_build.shmG24Ae/mnt/sys
2020-09-23 03:14:07.197 | + diskimage_builder/lib/common-functions:unmount_dir:451 : sudo umount -fl /tmp/dib_build.shmG24Ae/mnt/sys
2020-09-23 03:14:07.231 | + diskimage_builder/lib/common-functions:unmount_dir:436 : for m in '$mnts'
2020-09-23 03:14:07.234 | + diskimage_builder/lib/common-functions:unmount_dir:438 : found_mountpoint=false
2020-09-23 03:14:07.237 | + diskimage_builder/lib/common-functions:unmount_dir:439 : for mountpoint in '"${split_mounts[@]}"'
2020-09-23 03:14:07.240 | + diskimage_builder/lib/common-functions:unmount_dir:440 : [[ / != \/ ]]
2020-09-23 03:14:07.243 | + diskimage_builder/lib/common-functions:unmount_dir:448 : '[' false == false ']'
2020-09-23 03:14:07.246 | + diskimage_builder/lib/common-functions:unmount_dir:450 : echo 'Unmount /tmp/dib_build.shmG24Ae/mnt/proc'
2020-09-23 03:14:07.246 | Unmount /tmp/dib_build.shmG24Ae/mnt/proc
2020-09-23 03:14:07.248 | + diskimage_builder/lib/common-functions:unmount_dir:451 : sudo umount -fl /tmp/dib_build.shmG24Ae/mnt/proc
2020-09-23 03:14:07.271 | + diskimage_builder/lib/common-functions:unmount_dir:436 : for m in '$mnts'
2020-09-23 03:14:07.274 | + diskimage_builder/lib/common-functions:unmount_dir:438 : found_mountpoint=false
2020-09-23 03:14:07.277 | + diskimage_builder/lib/common-functions:unmount_dir:439 : for mountpoint in '"${split_mounts[@]}"'
2020-09-23 03:14:07.280 | + diskimage_builder/lib/common-functions:unmount_dir:440 : [[ / != \/ ]]
2020-09-23 03:14:07.282 | + diskimage_builder/lib/common-functions:unmount_dir:448 : '[' false == false ']'
2020-09-23 03:14:07.285 | + diskimage_builder/lib/common-functions:unmount_dir:450 : echo 'Unmount /tmp/dib_build.shmG24Ae/mnt/dev/pts'
2020-09-23 03:14:07.285 | Unmount /tmp/dib_build.shmG24Ae/mnt/dev/pts
2020-09-23 03:14:07.288 | + diskimage_builder/lib/common-functions:unmount_dir:451 : sudo umount -fl /tmp/dib_build.shmG24Ae/mnt/dev/pts
2020-09-23 03:14:07.323 | + diskimage_builder/lib/common-functions:unmount_dir:436 : for m in '$mnts'
2020-09-23 03:14:07.326 | + diskimage_builder/lib/common-functions:unmount_dir:438 : found_mountpoint=false
2020-09-23 03:14:07.329 | + diskimage_builder/lib/common-functions:unmount_dir:439 : for mountpoint in '"${split_mounts[@]}"'
2020-09-23 03:14:07.332 | + diskimage_builder/lib/common-functions:unmount_dir:440 : [[ / != \/ ]]
2020-09-23 03:14:07.335 | + diskimage_builder/lib/common-functions:unmount_dir:448 : '[' false == false ']'
2020-09-23 03:14:07.338 | + diskimage_builder/lib/common-functions:unmount_dir:450 : echo 'Unmount /tmp/dib_build.shmG24Ae/mnt/dev'
2020-09-23 03:14:07.338 | Unmount /tmp/dib_build.shmG24Ae/mnt/dev
2020-09-23 03:14:07.340 | + diskimage_builder/lib/common-functions:unmount_dir:451 : sudo umount -fl /tmp/dib_build.shmG24Ae/mnt/dev
2020-09-23 03:14:07.368 | + diskimage_builder/lib/img-functions:unmount_image:27 : '[' -n '' ']'
2020-09-23 03:14:07.371 | + diskimage_builder/lib/img-functions:unmount_image:30 : '[' -n '' ']'
2020-09-23 03:14:07.374 | + diskimage_builder/lib/img-functions:cleanup:43 : dib-block-device umount
2020-09-23 03:14:07.786 | DEBUG diskimage_builder.block_device.blockdevice [-] Creating BlockDevice object __init__ /root/.venv/lib/python3.5/site-packages/diskimage_builder/block_device/blockdevice.py:229
2020-09-23 03:14:07.786 | DEBUG diskimage_builder.block_device.blockdevice [-] Params [{'image-dir': '/tmp/dib_image.h5YKQT67', 'build-dir': '/tmp/dib_build.shmG24Ae', 'root-fs-type': 'ext4', 'root-label': None, 'config': '/tmp/dib_build.shmG24Ae/block-device/config.yaml', 'mount-base': '/tmp/dib_build.shmG24Ae/mnt'}] __init__ /root/.venv/lib/python3.5/site-packages/diskimage_builder/block_device/blockdevice.py:232
2020-09-23 03:14:07.786 | INFO diskimage_builder.block_device.blockdevice [-] State already cleaned - no way to do anything here
2020-09-23 03:14:07.822 | + diskimage_builder/lib/img-functions:cleanup:44 : cleanup_build_dir
2020-09-23 03:14:07.825 | + diskimage_builder/lib/common-functions:cleanup_build_dir:216 : timeout 10 sh -c ' while ! sudo rm -rf /tmp/dib_build.shmG24Ae/built; do sleep 1; done'
2020-09-23 03:14:07.835 | + diskimage_builder/lib/common-functions:cleanup_build_dir:220 : sudo rm -rf /tmp/dib_build.shmG24Ae/mnt
2020-09-23 03:14:08.103 | + diskimage_builder/lib/common-functions:cleanup_build_dir:221 : kill_chroot_processes /tmp/dib_build.shmG24Ae
2020-09-23 03:14:08.153 | + diskimage_builder/lib/common-functions:cleanup_build_dir:222 : tmpfs_check 0
2020-09-23 03:14:08.155 | + diskimage_builder/lib/common-functions:tmpfs_check:23 : local echo_message=0
2020-09-23 03:14:08.158 | + diskimage_builder/lib/common-functions:tmpfs_check:24 : '[' 0 == 0 ']'
2020-09-23 03:14:08.161 | + diskimage_builder/lib/common-functions:tmpfs_check:25 : '[' -r /proc/meminfo ']'
2020-09-23 03:14:08.164 | ++ diskimage_builder/lib/common-functions:tmpfs_check:26 : awk '/^MemTotal/ { print $2 }' /proc/meminfo
2020-09-23 03:14:08.169 | + diskimage_builder/lib/common-functions:tmpfs_check:26 : total_kB=32945668
2020-09-23 03:14:08.171 | + diskimage_builder/lib/common-functions:tmpfs_check:29 : RAM_NEEDED=4
2020-09-23 03:14:08.174 | + diskimage_builder/lib/common-functions:tmpfs_check:30 : '[' 32945668 -lt 4194304 ']'
2020-09-23 03:14:08.177 | + diskimage_builder/lib/common-functions:tmpfs_check:30 : return 0
2020-09-23 03:14:08.179 | + diskimage_builder/lib/common-functions:cleanup_build_dir:225 : timeout 120 sh -c 'while ! sudo umount -f /tmp/dib_build.shmG24Ae; do sleep 1; done'
2020-09-23 03:14:08.212 | + diskimage_builder/lib/common-functions:cleanup_build_dir:230 : rm -rf --one-file-system /tmp/dib_build.shmG24Ae
2020-09-23 03:14:08.216 | + diskimage_builder/lib/img-functions:cleanup:45 : cleanup_image_dir
2020-09-23 03:14:08.219 | + diskimage_builder/lib/common-functions:cleanup_image_dir:234 : kill_chroot_processes /tmp/dib_image.h5YKQT67
2020-09-23 03:14:08.265 | + diskimage_builder/lib/common-functions:cleanup_image_dir:235 : tmpfs_check 0
2020-09-23 03:14:08.267 | + diskimage_builder/lib/common-functions:tmpfs_check:23 : local echo_message=0
2020-09-23 03:14:08.270 | + diskimage_builder/lib/common-functions:tmpfs_check:24 : '[' 0 == 0 ']'
2020-09-23 03:14:08.273 | + diskimage_builder/lib/common-functions:tmpfs_check:25 : '[' -r /proc/meminfo ']'
2020-09-23 03:14:08.276 | ++ diskimage_builder/lib/common-functions:tmpfs_check:26 : awk '/^MemTotal/ { print $2 }' /proc/meminfo
2020-09-23 03:14:08.281 | + diskimage_builder/lib/common-functions:tmpfs_check:26 : total_kB=32945668
2020-09-23 03:14:08.283 | + diskimage_builder/lib/common-functions:tmpfs_check:29 : RAM_NEEDED=4
2020-09-23 03:14:08.286 | + diskimage_builder/lib/common-functions:tmpfs_check:30 : '[' 32945668 -lt 4194304 ']'
2020-09-23 03:14:08.289 | + diskimage_builder/lib/common-functions:tmpfs_check:30 : return 0
2020-09-23 03:14:08.291 | + diskimage_builder/lib/common-functions:cleanup_image_dir:236 : timeout 120 sh -c 'while ! sudo umount -f /tmp/dib_image.h5YKQT67; do sleep 1; done'
2020-09-23 03:14:08.327 | + diskimage_builder/lib/common-functions:cleanup_image_dir:241 : rm -rf --one-file-system /tmp/dib_image.h5YKQT67
2020-09-23 03:14:08.331 | + diskimage_builder/lib/img-functions:trap_cleanup:38 : exit 1