marsadm: remove straw dir creation

This commit is contained in:
Thomas Schoebel-Theuer 2022-03-27 22:37:05 +02:00 committed by Thomas Schoebel-Theuer
parent 4657b49248
commit 78e00b38b4
1 changed files with 2 additions and 6 deletions

View File

@ -679,6 +679,7 @@ sub __read_cache {
sub _read_cache {
return 0 if no_mountpoint($mars);
return 0 if $kernel_strategy_version < 4;
return 0 unless -d "$mars/actcual-$real_host";
my $inval_path = "$cache_dir/invalid";
if (-l $inval_path) {
_reset_resources();
@ -741,6 +742,7 @@ sub __write_cache {
sub _write_cache {
return 0 if no_mountpoint($mars);
return 1 unless -d "$mars/actual-$real_host";
mkdir($cache_dir);
my $ok =
__write_cache("$cache_dir/total_resources.cache", \%total_resources) &&
@ -2594,12 +2596,6 @@ sub get_global_versions {
}
unless (defined($ARGV[0]) && $ARGV[0] =~ m/cluster|cat/) {
my $act_dir = "$mars/actual-$host";
unless (-d $act_dir) {
my $not_mounted = no_mountpoint($mars);
if (defined($not_mounted) && !$not_mounted) {
mkdir($act_dir);
}
}
$kernel_version = get_alive_link("tree", $host, 2);
if ($kernel_version && $user_version != $kernel_version) {
lwarn "kernel_version=$kernel_version user_version=$user_version\n";