Be smarter about cleanup in crunch-job after a job finishes. This should
authorWard Vandewege <ward@curoverse.com>
Thu, 21 Aug 2014 17:23:08 +0000 (13:23 -0400)
committerWard Vandewege <ward@curoverse.com>
Thu, 21 Aug 2014 17:23:08 +0000 (13:23 -0400)
resolve the problem of the many leftover stale mount points.

no issue #

sdk/cli/bin/crunch-job

index 47f9894a415557b559a2f7170428e0132b30e7cf..4b6632c45ae0a0c3398f46a20813439faf0be49e 100755 (executable)
@@ -394,7 +394,7 @@ else
     if ($cleanpid == 0)
     {
       srun (["srun", "--nodelist=$nodelist", "-D", $ENV{'TMPDIR'}],
-           ['bash', '-c', 'if mount | grep -q $JOB_WORK/; then sudo /bin/umount $JOB_WORK/* 2>/dev/null; fi; sleep 1; rm -rf $JOB_WORK $CRUNCH_TMP/opt $CRUNCH_TMP/src*']);
+           ['bash', '-c', 'if mount | grep -q $JOB_WORK/; then for i in $JOB_WORK/*keep; do /bin/fusermount -z -u $i; done; fi; sleep 1; rm -rf $JOB_WORK $CRUNCH_TMP/opt $CRUNCH_TMP/src*']);
       exit (1);
     }
     while (1)