marsadm: better leave-cluster cleanup of dead files

This commit is contained in:
Thomas Schoebel-Theuer 2015-04-29 08:51:59 +02:00
parent fb880f9b2c
commit 5f485b6a02

View File

@ -1468,6 +1468,12 @@ sub leave_cluster {
sleep_timeout(3, 1);
}
system("rmmod mars") if $host eq $real_host;
foreach my $path (glob("$mars/{,resource-*/}{todo,actual}-*/*-$host")) {
unlink($path);
}
foreach my $path (glob("$mars/{,resource-*/}{todo,actual}-$host")) {
rmdir($path); # at least try it
}
}
sub create_res {