Skip to content

SPAWN_COMPLETE created by spored bootstrap, not task completion — tasks appear complete before running #24

Closed

Description

@scttfrdmn

Summary

/tmp/SPAWN_COMPLETE is created by spored's bootstrap process (signaling "instance is ready") rather than by the nf-spawn task script (signaling "task is done"). As a result, spawn status --check-complete returns 0 (complete) immediately after cloud-init finishes — before the user-data task script has had a chance to run.

Evidence

On a running task instance, 18 min after launch with no FASTQ output:

$ sudo cat /tmp/SPAWN_COMPLETE
{
  "status": "success",
  "timestamp": "2026-06-03T23:11:28Z"
}

Cloud-init log: spored installation complete / ✓ Completion signal sent to /tmp/SPAWN_COMPLETE

The instance has 61 GB free disk, no fasterq-dump running, no .exitcode in S3.

Expected

/tmp/SPAWN_COMPLETE should only exist after the nf-spawn task script completes. nf-spawn's staging script (buildStagingScript()) should be the one creating this file as the final step, not spored's bootstrap.

Root cause

spored creates SPAWN_COMPLETE as part of its own boot sequence to signal the instance is SSH-ready. The nf-spawn staging script runs via user-data and presumably also tries to touch SPAWN_COMPLETE after the task — but spored beats it.

Fix options

  1. Have the nf-spawn staging script delete SPAWN_COMPLETE at the start and re-create it at the end (so it's always "this task is done" not "instance is ready")
  2. Use a different completion file name (e.g. TASK_COMPLETE) that spored doesn't touch
  3. Check spawn status for a custom completion file: --completion-file /tmp/NF_TASK_COMPLETE

Context

Activity

  1. added
    bug
    on Jun 3, 2026
  2. added a commit that references this issue on Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions