Description of problem: A machine that I have access too had 38 temporary directories in /var/tmp/guestfs-XXXXXX, where each temporary directory has a unique name. The directory contained initrd and root images as well as a symlink to the /boot/vmlinuz-* kernel. Richard Jones suggested that the temporary directory created in src/appliance.c: build_supermin_appliance() is not cleaned up in all error paths. Additionally, if febootstrap-supermin-helper exits with an error it might not be cleaned up. The impact of this bug is that disk space is wasted by temporary directories. Version-Release number of selected component (if applicable): libguestfs0 1.12.9-2 Debian package How reproducible: I do not know how to reproduce the bug but the temporary directories in /var/tmp had been created over a period of weeks and months. Actual results: Temporary appliance directories are left over in /var/tmp/guestfs-XXXXXX. Expected results: At most one appliance should be cached on the host system. Temporary directories should be cleaned up.
Patches posted: https://www.redhat.com/archives/libguestfs/2011-December/msg00180.html If tests complete OK, I will push these upstream.
Passes all of 'make check' and 'make extra-tests' so I'm going to push this in 1.15.14.
I have tested for many times and the /var/tmp/guestfs.XXXXXX can always been cleaned now, I think guestfs___remove_tmpdir can do the right thing except some specific conditions. Good luck! -Wanlong Gao