Red Hat Bugzilla – Bug 769680
temporary directories created during appliance builds are not cleaned up on error
Last modified: 2011-12-23 22:34:15 EST
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
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.
Temporary appliance directories are left over in /var/tmp/guestfs-XXXXXX.
At most one appliance should be cached on the host system. Temporary directories should be cleaned up.
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