Skip to content

fix(ports): serialize concurrent port allocations - #1355

Open
tommaso-ascani wants to merge 1 commit into
mainfrom
fix-ports-allocation-race
Open

tommaso-ascani wants to merge 1 commit into
mainfrom
fix-ports-allocation-race

Conversation

@tommaso-ascani

@tommaso-ascani tommaso-ascani commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

Concurrent allocate_ports calls read the used ranges before taking the lock, so parallel module updates on the same node could get the same range.

  • Take the exclusive lock before reading
  • Deallocate the old range in the same transaction

Refs NethServer/dev#7498 NethServer/dev#7412

Assisted by Claude

Parallel module updates could get the same port range.

Assisted by Claude
@tommaso-ascani tommaso-ascani self-assigned this Oct 13, 2026
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@DavidePrincipi DavidePrincipi linked an issue Oct 14, 2026 that may be closed by this pull request

This branch has not been deployed

No deployments
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.

TCP port conflict by Ports Manager

1 participant