svn commit: r236211 - projects/portbuild/scripts
Mark Linimon
linimon at FreeBSD.org
Mon May 28 23:35:17 UTC 2012
Author: linimon (doc,ports committer)
Date: Mon May 28 23:35:16 2012
New Revision: 236211
URL: http://svn.freebsd.org/changeset/base/236211
Log:
Clean up claim-chroots that failed (usually due to ssh timeout after copy
to client). This relieves pressure on /tmp on the clients.
Modified:
projects/portbuild/scripts/cleanup-chroots
Modified: projects/portbuild/scripts/cleanup-chroots
==============================================================================
--- projects/portbuild/scripts/cleanup-chroots Mon May 28 23:32:18 2012 (r236210)
+++ projects/portbuild/scripts/cleanup-chroots Mon May 28 23:35:16 2012 (r236211)
@@ -14,6 +14,7 @@ pbd=${PORTBUILD_DATA:-/var/portbuild}
REMOVE_EMPTY_BUILD_TIME=10080
REMOVE_INUSE_CHROOT_TIME=7200
REMOVE_NOTINUSE_CHROOT_TIME=60
+REMOVE_NOTINUSE_CLAIM_CHROOT_TIME=60
#VERBOSE=1
@@ -163,3 +164,18 @@ if [ ! -z "${stale_builds}" ]; then
rm -rf ${build}
done
fi
+
+# cleanup claim-chroots that failed (usually due to ssh timeout after
+# copy to client)
+# XXX MCL assuming that mktemp using /tmp in claim-chroot
+stale_claim_chroots=$(find /tmp -name claim-chroot.* -prune -mmin +${REMOVE_NOTINUSE_CLAIM_CHROOT_TIME} 2> /dev/null)
+if [ ! -z "${stale_claim_chroots}" ]; then
+ if [ $VERBOSE ]; then
+ echo "cleanup-chroots: suspected stale claim_chroots on $(hostname):"
+ echo ${stale_claim_chroots}
+ echo
+ fi
+ for claim_chroot in ${stale_claim_chroots}; do
+ rm -rf ${claim_chroot}
+ done
+fi
More information about the svn-src-projects
mailing list