
it may happen that if the system where disk-image-create runs is busy, then the kpartx -l run may leave a stale autodelete loop device. This is because kpartx -l first adds a new loop device, then does the listing and removes the loop device. The latter may not end before the end of the kpartx run, leaving a loop device marked as autodelete. Such kind of loop device will automatically delete itself, so the rm -r $WORKING after sudo umount -f $WORKING/mnt in the EXIT trap will fail because $WORKING does not exist anymore. To prevent this situation, just ask udev to finish its operations, properly removing the (temporary) loop device. Change-Id: I12246f3dbe6b5669e698767682a5a142f803823b
redhat-common
Image installation steps common to RHEL and Fedora.
Overrides:
- To use a non-default URL for downloading base cloud images, use the environment variable DIB_CLOUD_IMAGES
- To download a non-default release of cloud images, use the environment variable DIB_RELEASE
- Alternatively, set DIB_LOCAL_IMAGE to the local path of a qcow2 cloud image. This is useful in that you can use a customized or previously built cloud image from diskimage-builder as input. The cloud image does not have to have been built by diskimage-builder. It should be a full disk image, not just a filesystem image.