summaryrefslogtreecommitdiff
path: root/.testr.conf
diff options
context:
space:
mode:
authorIan Wienand <iwienand@redhat.com>2019-03-13 16:38:49 +1100
committerIan Wienand <iwienand@redhat.com>2019-03-13 16:38:49 +1100
commit528456407131c8771588fd3d53f91785b728752e (patch)
treefebe122e6038c3d79996467731fde4612f302724 /.testr.conf
parentbdfc13a5c0d6d623d1303bf198591f5c84ae8233 (diff)
Unmount internal mounts on finalise errorsHEADmaster
This is only one line, but it takes a lot to untangle ... basically the current "correct" path is: --- mk_build_dir() -> sets trap trap_cleanup EXIT ... stuff .. mount_proc_dev_sys -> mounts $TMP_MOUNT_PATH/<proc,dev.sysfs> pre-finalise.d finalise.d unmount_image $TMP_BUILD_DIR/mnt # nb == $TMP_MOUNT_PATH -> unmount_dir() -> recursive unmount everything inside TMP_MOUNT_PATH TMP_IMAGE_PATH=$(dib-block-device getval image-path) export TMP_IMAGE_PATH dib-block-device umount dib-block-device cleanup ... actually cleanup directories ... --- Our current failure exit trap does: --- dib-block-device umount unmount_image ... --- Note this is the *opposite* of what is done in the correct exit path. In the failure case, if a script fails in the finalise stages it leads to /proc, /sys, /dev etc. still being mounted inside the image; the "dib-block-device umount" call doesn't know anything about these mounts and tries to unmount the parent directory, and we get a hard failure with a busy mount, and all the mounts are subsequently leaked. Note that "unmount_dir", which is ultimately called by "unmount_image", already knows to skip those mounts that "dib-block-device umount" manages (this is the DIB_MOUNTPOINTS list). This is further evidence it should be called *before* the dib-block-device umount. Change-Id: Ibef3ce9d1167b9c4ff3d5717b113cd3ed374f5e3
Notes
Notes (review): Code-Review+1: Tobias Henkel <tobias.henkel@bmw.de> Code-Review+1: Natal Ng├ętal <hobbestigrou@erakis.eu> Code-Review+2: Ian Wienand <iwienand@redhat.com> Workflow+1: Ian Wienand <iwienand@redhat.com> Verified+2: Zuul Submitted-by: Zuul Submitted-at: Fri, 15 Mar 2019 05:44:03 +0000 Reviewed-on: https://review.openstack.org/642953 Project: openstack/diskimage-builder Branch: refs/heads/master
Diffstat (limited to '.testr.conf')
0 files changed, 0 insertions, 0 deletions