Improve Nextflow resilience to eventually consistent FileSystems#7281
Improve Nextflow resilience to eventually consistent FileSystems#7281BioWilko wants to merge 10 commits into
Conversation
✅ Deploy Preview for nextflow-docs canceled.
|
379270c to
8452fc4
Compare
|
@bentsherman any chance somebody on your end might take a look at this? If it makes it easier I could always split the changes into a set of more atomic PRs? e.g.
|
Signed-off-by: Biowilko <sam1.wilkinson1@gmail.com>
Signed-off-by: Biowilko <sam1.wilkinson1@gmail.com>
Signed-off-by: Biowilko <sam1.wilkinson1@gmail.com>
Signed-off-by: Biowilko <sam1.wilkinson1@gmail.com>
Signed-off-by: Biowilko <sam1.wilkinson1@gmail.com>
…ition Signed-off-by: Biowilko <sam1.wilkinson1@gmail.com>
Signed-off-by: Biowilko <sam1.wilkinson1@gmail.com>
|
I can't reproduce these failures locally so suspect there's something screwy with the CI... |
|
Looks like a compilation error: Your PR does edit that file but not sure how it affects this line. So you aren't getting this error locally? Maybe try updating against latest master? |
Signed-off-by: Biowilko <sam1.wilkinson1@gmail.com>
|
You're right, it was a basic missing import error! |
Signed-off-by: Sam W <s.a.j.wilkinson@bham.ac.uk>
|
I build the PR locally and run it with one of our pipelines in which the test input data leads to many short lived processes. I use slurm and cephfs. Unfortunately the pipeline is still often waiting forever that jobs are finished, which they actually already are but it is not noticed by nextflow. Only after running |
Does it do the same on release Nextflow? Or only on my PR version? |
It does it also on the release Nextflow, but it is even worse there. I tried to get an answer from claude to explain the situation, this is what I got:
The core mismatch is that CephFS is designed around contention-driven consistency: caches are only invalidated when clients fight over caps. Nextflow's polling is purely passive — it never creates contention, so it never gets the cache invalidated, and never sees the completed jobs. Not sure if this is correct, though |
|
Okay I'm glad that my PR doesn't introduce more issues, I don't think I'm sufficiently informed about network filesystems to be sure but Nextflow actively checks the .exitcode file when an API based executor (like slurm) finishes a process, the find fixing it seems very strange as if your cephfs client is misconfigured or something... |
my cephfs client mount options (kernel client) are pretty much standard no special configuration there:
Maybe you have an idea where to introduce some debug lines to see where it's hanging |
This PR does the following:
.exitcodechecking logic into a genericExitStatusAwaiterfunc which will retry on the next polling loop for API based executors, this is a re-implementation of the existing Grid logic.TaskFileRetry.groovygeneric blocking retry wrapper which ensures files exist, currently used to check for .command.env and .command.out onlyexecutor.exitReadTimeoutparam should be consistent across executors for this purpose.cephto Shared FS detectionsync || truetosync --file-system /work/dir || true-> Might reduce impact on HPCs hopefullysync_cmdfrom aftercleanup_cmdto immediately before .exitcode writing so that all workdir writes are flushed before .exitcode is writtensync_cmdto on in shared FS -> I understand this could be quite controversial, happy to change thisWhat hasn't been done:
This PR fixes #7247 which I've confirmed is due to eventually consistent filesystems causing problems stochastically, I've tested it on a production K8S system as fully working but I don't have access to others for a full test.