-
Notifications
You must be signed in to change notification settings - Fork 76
: host_mesh: graceful shutdown #1383
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
shayne-fletcher
wants to merge
1
commit into
meta-pytorch:main
from
shayne-fletcher:export-D83599449
Closed
: host_mesh: graceful shutdown #1383
shayne-fletcher
wants to merge
1
commit into
meta-pytorch:main
from
shayne-fletcher:export-D83599449
+345
−17
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@shayne-fletcher has exported this pull request. If you are a Meta employee, you can view the originating Diff in D83599449. |
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Sep 30, 2025
Summary: implement bulk termination with config-driven timeout and concurrency. add `MESH_TERMINATE_TIMEOUT` and `MESH_TERMINATE_CONCURRENCY` attrs, define `BulkTerminate` with a `TerminateSummary` result, and implement it for both `BootstrapProcManager` (TERM → wait → KILL) and `LocalProcManager` (`destroy_and_wait`). add `Display`/`Error` impls for `TerminateError` and a `Display` impl for `TerminateSummary`. extend `Host` with `terminate_children` when its manager implements `BulkTerminate`, and route `HostMesh::shutdown` through `ShutdownHost`, which resolves timeout/concurrency from config, runs the termination pass, then drops the host/manager. shutdown is now deterministic: each child gets a grace window, terminations run with bounded concurrency, and anything that outlives the window is killed. refines the explicit shutdown from D83327842: before dropping the host/manager we now run a config-driven bulk termination pass (TERM → wait(timeout) → KILL) with bounded concurrency; `PDEATHSIG` remains a last-resort safety net. Differential Revision: D83599449
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Sep 30, 2025
Summary: implement bulk termination with config-driven timeout and concurrency. add `MESH_TERMINATE_TIMEOUT` and `MESH_TERMINATE_CONCURRENCY` attrs, define `BulkTerminate` with a `TerminateSummary` result, and implement it for both `BootstrapProcManager` (TERM → wait → KILL) and `LocalProcManager` (`destroy_and_wait`). add `Display`/`Error` impls for `TerminateError` and a `Display` impl for `TerminateSummary`. extend `Host` with `terminate_children` when its manager implements `BulkTerminate`, and route `HostMesh::shutdown` through `ShutdownHost`, which resolves timeout/concurrency from config, runs the termination pass, then drops the host/manager. shutdown is now deterministic: each child gets a grace window, terminations run with bounded concurrency, and anything that outlives the window is killed. refines the explicit shutdown from D83327842: before dropping the host/manager we now run a config-driven bulk termination pass (TERM → wait(timeout) → KILL) with bounded concurrency; `PDEATHSIG` remains a last-resort safety net. Differential Revision: D83599449
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Sep 30, 2025
Summary: implement bulk termination with config-driven timeout and concurrency. add `MESH_TERMINATE_TIMEOUT` and `MESH_TERMINATE_CONCURRENCY` attrs, define `BulkTerminate` with a `TerminateSummary` result, and implement it for both `BootstrapProcManager` (TERM → wait → KILL) and `LocalProcManager` (`destroy_and_wait`). add `Display`/`Error` impls for `TerminateError` and a `Display` impl for `TerminateSummary`. extend `Host` with `terminate_children` when its manager implements `BulkTerminate`, and route `HostMesh::shutdown` through `ShutdownHost`, which resolves timeout/concurrency from config, runs the termination pass, then drops the host/manager. shutdown is now deterministic: each child gets a grace window, terminations run with bounded concurrency, and anything that outlives the window is killed. refines the explicit shutdown from D83327842: before dropping the host/manager we now run a config-driven bulk termination pass (TERM → wait(timeout) → KILL) with bounded concurrency; `PDEATHSIG` remains a last-resort safety net. Differential Revision: D83599449
2abea48
to
5a6ca10
Compare
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Oct 1, 2025
Summary: implement bulk termination with config-driven timeout and concurrency. add `MESH_TERMINATE_TIMEOUT` and `MESH_TERMINATE_CONCURRENCY` attrs, define `BulkTerminate` with a `TerminateSummary` result, and implement it for both `BootstrapProcManager` (TERM → wait → KILL) and `LocalProcManager` (`destroy_and_wait`). add `Display`/`Error` impls for `TerminateError` and a `Display` impl for `TerminateSummary`. extend `Host` with `terminate_children` when its manager implements `BulkTerminate`, and route `HostMesh::shutdown` through `ShutdownHost`, which resolves timeout/concurrency from config, runs the termination pass, then drops the host/manager. shutdown is now deterministic: each child gets a grace window, terminations run with bounded concurrency, and anything that outlives the window is killed. refines the explicit shutdown from D83327842: before dropping the host/manager we now run a config-driven bulk termination pass (TERM → wait(timeout) → KILL) with bounded concurrency; `PDEATHSIG` remains a last-resort safety net. Differential Revision: D83599449
shayne-fletcher
added a commit
to shayne-fletcher/monarch-1
that referenced
this pull request
Oct 1, 2025
Summary: implement bulk termination with config-driven timeout and concurrency. add `MESH_TERMINATE_TIMEOUT` and `MESH_TERMINATE_CONCURRENCY` attrs, define `BulkTerminate` with a `TerminateSummary` result, and implement it for both `BootstrapProcManager` (TERM → wait → KILL) and `LocalProcManager` (`destroy_and_wait`). add `Display`/`Error` impls for `TerminateError` and a `Display` impl for `TerminateSummary`. extend `Host` with `terminate_children` when its manager implements `BulkTerminate`, and route `HostMesh::shutdown` through `ShutdownHost`, which resolves timeout/concurrency from config, runs the termination pass, then drops the host/manager. shutdown is now deterministic: each child gets a grace window, terminations run with bounded concurrency, and anything that outlives the window is killed. refines the explicit shutdown from D83327842: before dropping the host/manager we now run a config-driven bulk termination pass (TERM → wait(timeout) → KILL) with bounded concurrency; `PDEATHSIG` remains a last-resort safety net. Differential Revision: D83599449
5a6ca10
to
7a33b36
Compare
@shayne-fletcher has exported this pull request. If you are a Meta employee, you can view the originating Diff in D83599449. |
Summary: implement bulk termination with config-driven timeout and concurrency. add `MESH_TERMINATE_TIMEOUT` and `MESH_TERMINATE_CONCURRENCY` attrs, define `BulkTerminate` with a `TerminateSummary` result, and implement it for both `BootstrapProcManager` (TERM → wait → KILL) and `LocalProcManager` (`destroy_and_wait`). add `Display`/`Error` impls for `TerminateError` and a `Display` impl for `TerminateSummary`. extend `Host` with `terminate_children` when its manager implements `BulkTerminate`, and route `HostMesh::shutdown` through `ShutdownHost`, which resolves timeout/concurrency from config, runs the termination pass, then drops the host/manager. shutdown is now deterministic: each child gets a grace window, terminations run with bounded concurrency, and anything that outlives the window is killed. refines the explicit shutdown from D83327842: before dropping the host/manager we now run a config-driven bulk termination pass (TERM → wait(timeout) → KILL) with bounded concurrency; `PDEATHSIG` remains a last-resort safety net. Differential Revision: D83599449
7a33b36
to
0a1b67a
Compare
This pull request has been merged in 7f945af. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary: implement bulk termination with config-driven timeout and concurrency. add
MESH_TERMINATE_TIMEOUT
andMESH_TERMINATE_CONCURRENCY
attrs, defineBulkTerminate
with aTerminateSummary
result, and implement it for bothBootstrapProcManager
(TERM → wait → KILL) andLocalProcManager
(destroy_and_wait
). addDisplay
/Error
impls forTerminateError
and aDisplay
impl forTerminateSummary
. extendHost
withterminate_children
when its manager implementsBulkTerminate
, and routeHostMesh::shutdown
throughShutdownHost
, which resolves timeout/concurrency from config, runs the termination pass, then drops the host/manager. shutdown is now deterministic: each child gets a grace window, terminations run with bounded concurrency, and anything that outlives the window is killed.Differential Revision: D83599449