mirror of
https://github.com/kolesa-team/pve-purestorage-plugin.git
synced 2026-08-12 21:53:06 -06:00
Removed unnecesary if (#61)
This commit is contained in:
+12
-15
@@ -1053,24 +1053,21 @@ sub map_volume {
|
|||||||
};
|
};
|
||||||
|
|
||||||
# Wait for the device to appear
|
# Wait for the device to appear
|
||||||
if ( wait_for( $path_exists, "volume \"$volname\" to map" ) ) {
|
wait_for( $path_exists, "volume \"$volname\" to map", 30 );
|
||||||
|
|
||||||
# we might end up with operational disk but without multipathing, e.g.
|
# we might end up with operational disk but without multipathing, e.g.
|
||||||
# if unmapping was interrupted ('remove map' was already done, but slaves were not removed)
|
# if unmapping was interrupted ('remove map' was already done, but slaves were not removed)
|
||||||
if ( !multipath_check( $wwid ) ) {
|
if ( !multipath_check( $wwid ) ) {
|
||||||
print "Debug :: Adding multipath map for device \"$wwid\"\n" if $DEBUG;
|
print "Debug :: Adding multipath map for device \"$wwid\"\n" if $DEBUG;
|
||||||
exec_command( [ 'multipathd', 'add', 'map', $wwid ] );
|
exec_command( [ 'multipathd', 'add', 'map', $wwid ] );
|
||||||
|
|
||||||
# Wait for multipath to be fully established
|
# Wait for multipath to be fully established
|
||||||
my $multipath_ready = sub {
|
my $multipath_ready = sub {
|
||||||
return multipath_check( $wwid );
|
return multipath_check( $wwid );
|
||||||
};
|
};
|
||||||
wait_for( $multipath_ready, "multipath map for volume \"$volname\" to be ready", 30, 0.5 );
|
wait_for( $multipath_ready, "multipath map for volume \"$volname\" to be ready", 30 );
|
||||||
}
|
|
||||||
return $path;
|
|
||||||
}
|
}
|
||||||
|
return $path;
|
||||||
die "Error :: Local path \"$path\" does not exist.\n";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub unmap_volume {
|
sub unmap_volume {
|
||||||
|
|||||||
Reference in New Issue
Block a user