From 61674d2b699ce4ab65848434f13f6fb19c045649 Mon Sep 17 00:00:00 2001 From: Ben Sherman Date: Thu, 9 Jan 2025 03:42:23 -0600 Subject: [PATCH] Handle attribute caching with Lustre filesystem (#5650) Signed-off-by: Ben Sherman Signed-off-by: Paolo Di Tommaso Co-authored-by: Paolo Di Tommaso --- .../nextflow/executor/GridTaskHandler.groovy | 2 +- .../src/main/nextflow/file/FileHelper.groovy | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/modules/nextflow/src/main/groovy/nextflow/executor/GridTaskHandler.groovy b/modules/nextflow/src/main/groovy/nextflow/executor/GridTaskHandler.groovy index 1d03bf21ba..6a021d76fd 100644 --- a/modules/nextflow/src/main/groovy/nextflow/executor/GridTaskHandler.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/executor/GridTaskHandler.groovy @@ -319,7 +319,7 @@ class GridTaskHandler extends TaskHandler implements FusionAwareTask { protected Integer readExitStatus() { String workDirList = null - if( exitTimestampMillis1 && FileHelper.workDirIsNFS ) { + if( exitTimestampMillis1 && FileHelper.workDirIsSharedFS ) { /* * When the file is in a NFS folder in order to avoid false negative * list the content of the parent path to force refresh of NFS metadata diff --git a/modules/nf-commons/src/main/nextflow/file/FileHelper.groovy b/modules/nf-commons/src/main/nextflow/file/FileHelper.groovy index 5710731514..f76e95d55b 100644 --- a/modules/nf-commons/src/main/nextflow/file/FileHelper.groovy +++ b/modules/nf-commons/src/main/nextflow/file/FileHelper.groovy @@ -468,14 +468,14 @@ class FileHelper { * @return The {@code true} when the path is a NFS mount {@code false} otherwise */ @Memoized - static boolean isPathNFS(Path path) { + static boolean isPathSharedFS(Path path) { assert path if( path.getFileSystem() != FileSystems.getDefault() ) return false final type = getPathFsType(path) - def result = type == 'nfs' - log.debug "NFS path ($result): $path" + final result = type == 'nfs' || type == 'lustre' + log.debug "FS path type ($result): $path" return result } @@ -491,7 +491,7 @@ class FileHelper { process.destroy() if( status ) { - log.debug "Can't check if specified path is NFS ($status): ${FilesEx.toUriString(path)}\n${Bolts.indent(text,' ')}" + log.debug "Unable to determine FS type ($status): ${FilesEx.toUriString(path)}\n${Bolts.indent(text,' ')}" return null } @@ -503,8 +503,8 @@ class FileHelper { * {@code true} when the current session working directory is a NFS mounted path * {@code false otherwise} */ - static boolean getWorkDirIsNFS() { - isPathNFS(Global.session.workDir) + static boolean getWorkDirIsSharedFS() { + isPathSharedFS(Global.session.workDir) } /** @@ -546,7 +546,7 @@ class FileHelper { if( Files.exists(self) ) return true - if( !workDirIsNFS ) + if( !workDirIsSharedFS ) return false