Skip to content

Multicast: canceling one host no longer cancels the whole session (rc) - #1905

Merged
mastacontrola merged 1 commit into
rc-1.6.0from
fix/multicast-cancel-one-host-rc
Oct 19, 2026
Merged

mastacontrola merged 1 commit into
rc-1.6.0from
fix/multicast-cancel-one-host-rc

Conversation

@mastacontrola

Copy link
Copy Markdown
Member

Port of #1904 to rc-1.6.0. Refs #1903. FOS half: FOGProject/fos#48 (FOGProject/fos#193).

Problem. Canceling one host in a multicast session canceled every host in it.

Cause. Task::cancel() set the whole session to canceled. MulticastManager treated any canceled member task as a canceled session, killed udp-sender, and canceled the rest.

Fix.

  • Task::cancel() and TaskManager::cancel() remove only the canceled host and lower a sized session's sessclients. The session ends only when no host is left. TaskManager now decides per session.
  • MulticastManager drops canceled hosts and keeps the sender. A PXE join in the same tick as a cancel is no longer missed.
  • --min-receivers is fixed when udp-sender starts. When hosts were removed and every remaining host has connected, the manager sends udpcast's CMD_GO (opcode 2, from the session's portbase), so the sender starts without the max-wait.
  • Both boot paths send mcastMaxWait=<minutes> for the FOS receiver timeout.

Verified.

  • tests/multicast-cancel-one-host.test.php, 15 checks. Each defect reintroduced turns it red.
  • Full PHP and shell suites pass. Both phpstan passes are clean.
  • Live on a local 1.6 server with a 3-host session and a real udp-sender. Cancel one host through the Active Tasks path: the session and sender PID stay, 2 tasks stay queued, sessclients 3 → 2. Cancel one through Task::cancel(): the same result. Cancel the last host: the session is canceled and the sender is stopped.
  • CMD_GO against a real udp-sender waiting for 2 receivers with 1 connected: the transfer started at once, and the received file is byte-identical.

Not verified. No real FOS client ran a full multicast deploy with this change.

🤖 Generated with Claude Code

Task::cancel() set a host's whole multicast session to canceled, and
MulticastManager treated any canceled member task as a canceled
session: it killed udp-sender and canceled every other host. One host
that never booted forced the whole session to start over.

- Task::cancel() and TaskManager::cancel() remove only the canceled
  host. A sized session waits for one host fewer. The session ends
  only when no host is left. TaskManager decides per session.
- MulticastManager drops canceled hosts from a running session and
  keeps the sender. A PXE join in the same tick as a cancel is no
  longer missed.
- udp-sender's --min-receivers is fixed at launch. When hosts were
  removed and every remaining host has connected, the manager sends
  udpcast's CMD_GO, so the sender starts without the max-wait.
- The boot menu sends mcastMaxWait (minutes) so FOS can bound
  udp-receiver's wait (FOGProject/fos#48).

Closes #1903.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mastacontrola
mastacontrola merged commit a5cc022 into rc-1.6.0 Oct 19, 2026
11 checks passed
@mastacontrola
mastacontrola deleted the fix/multicast-cancel-one-host-rc branch October 19, 2026 14:39
mastacontrola added a commit that referenced this pull request Oct 19, 2026
Set the System.php release fallback to 1.6.0-RC-14. RC-14 fixes
canceling one host in a multicast session, which canceled the whole
session (#1903, #1905, #1909). The PXE menu's Secure Boot key enrollment
now records mok-pending (#1869, #1899). It removes the dead boot fields
from the group create form (#1901). It also fixes non-ASCII tab titles
after AJAX navigation, completes the Japanese translation, and fixes
uptime unit plurals (#1910, #1913).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant