gcs_store, filesystem_store: lightweight check_health probes#2361
Open
amankrx wants to merge 3 commits into
Open
gcs_store, filesystem_store: lightweight check_health probes#2361amankrx wants to merge 3 commits into
amankrx wants to merge 3 commits into
Conversation
palfrey
requested changes
May 22, 2026
Member
palfrey
left a comment
There was a problem hiding this comment.
Please add test code for both of these
11415d3 to
a0d5848
Compare
palfrey
requested changes
May 22, 2026
| format!("GcsStore::check_health: object_exists errored: {e}").into(), | ||
| ) | ||
| } | ||
| Err(_) => HealthStatus::new_failed( |
Member
There was a problem hiding this comment.
And it should be a timeout, not a Failed!
| format!("FilesystemStore::check_health: stat errored: {e}").into(), | ||
| ) | ||
| } | ||
| Err(_) => HealthStatus::new_failed( |
Member
There was a problem hiding this comment.
Should be a timeout, not a Failed!
| use nativelink_store::cas_utils::ZERO_BYTE_DIGESTS; | ||
| use nativelink_store::gcs_client::client::GcsOperations; | ||
| use nativelink_store::gcs_client::mocks::{MockGcsOperations, MockRequest}; | ||
| use nativelink_store::gcs_client::mocks::{FailureMode, MockGcsOperations, MockRequest}; |
Member
There was a problem hiding this comment.
It's a good idea, but now causing
error: unnecessary qualification
--> nativelink-store/tests/gcs_store_test.rs:136:27
|
136 | .set_failure_mode(nativelink_store::gcs_client::mocks::FailureMode::NotFound)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D unused-qualifications` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_qualifications)]`
a0d5848 to
1327ec0
Compare
The default StoreDriver::check_health performs a full update_oneshot +
has + get_part_unchunked roundtrip. Under any meaningful slow-store
load (e.g. concurrent multi-GB blob reads saturating the network) that
roundtrip queues behind production traffic and easily exceeds the
per-indicator budget, causing /status to return 503 even when the
pod is otherwise functional. Kubelet treats those as probe failures
and eventually restarts the pod, dropping every connected client.
Override check_health on both registered indicators with a probe that
shares no path with production traffic:
* GcsStore: a single object_exists() call against a fixed
never-existing path. Metadata roundtrip only — independent of
body-transfer bandwidth and the upload buffer pool.
* FilesystemStore: a stat() of the configured content_path. A
single syscall, microseconds on a healthy mount; bounded with a
timeout so a hung NFS / EBS mount cannot wedge the indicator.
Both paths are bounded by a 2 s ceiling so they remain well inside
the HealthServer per-indicator budget.
1327ec0 to
7ef50ac
Compare
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
The default StoreDriver::check_health performs a full
update_oneshot+has+get_part_unchunkedroundtrip. Under any meaningful slow-store load (e.g. concurrent multi-GB blob reads saturating the network) that roundtrip queues behind production traffic and easily exceeds the per-indicator budget, causing /status to return 503 even when the pod is otherwise functional. Kubelet treats those as probe failures and eventually restarts the pod, dropping every connected client.Type of change
Please delete options that aren't relevant.
How Has This Been Tested?
Added relevant tests and tested the branch in an actual environment.
Checklist
bazel test //...passes locallygit amendsee some docsThis change is