Skip to content

fix: allow concurrent exec sessions - #8

Merged
pigmej merged 1 commit into
pigmej:mainfrom
kacpersaw:kacpersaw/fix-concurrent-exec
Sep 22, 2026
Merged

pigmej merged 1 commit into
pigmej:mainfrom
kacpersaw:kacpersaw/fix-concurrent-exec

Conversation

@kacpersaw

Copy link
Copy Markdown
Contributor

Summary

Removes the environment lock from ocdev exec so multiple long-running commands can run in the same container. Previously, one exec session prevented another from starting and blocked lifecycle operations that used the same lock.

What changed

  • Exec runs without acquiring or waiting on an environment lock.
  • Running-state and pinned recipe UUID checks remain as preflight checks.
  • Lifecycle commands keep their existing locking behavior.
  • Added concurrent-session tests and updated the documentation.

Behavior and safety

Exec no longer coordinates with setup or teardown. Stop/delete can interrupt running commands. The preflight checks are not atomic with execution by name, so a container can stop or be replaced between the check and execution.

Signal handling, separate output streams, exit-code forwarding, and client cleanup are unchanged.

Testing

  • make test-exec: all 15 test groups passed, including concurrent plain/recipe sessions, independent completion and cancellation, and execution while lifecycle locks are held.
  • make test: all 117 tests plus version regressions passed with a clean HOME and a PATH without Python or real Incus.
  • Independent review found no actionable issues. No live containers were touched.

@pigmej
pigmej merged commit c450402 into pigmej:main Sep 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants