Skip to content

Commit

Permalink
tests: allow-list neon_local endpoint errors from storage controller
Browse files Browse the repository at this point in the history
  • Loading branch information
jcsp committed Jun 21, 2024
1 parent f0e2bb7 commit 6f77cdd
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
8 changes: 6 additions & 2 deletions storage_controller/src/compute_hook.rs
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ pub(crate) enum NotifyError {
// A response indicates we will never succeed, such as 400 or 404
#[error("Non-retryable error {0}")]
Fatal(StatusCode),

#[error("neon_local error: {0}")]
NeonLocal(anyhow::Error),
}

enum MaybeSendResult {
Expand Down Expand Up @@ -278,7 +281,7 @@ impl ComputeHook {
async fn do_notify_local(
&self,
reconfigure_request: &ComputeHookNotifyRequest,
) -> anyhow::Result<()> {
) -> Result<(), NotifyError> {
// neon_local updates are not safe to call concurrently, use a lock to serialize
// all calls to this function
let _locked = self.neon_local_lock.lock().await;
Expand Down Expand Up @@ -321,7 +324,8 @@ impl ComputeHook {
tracing::info!("Reconfiguring endpoint {}", endpoint_name,);
endpoint
.reconfigure(compute_pageservers.clone(), *stripe_size)
.await?;
.await
.map_err(NotifyError::NeonLocal)?;
}
}

Expand Down
5 changes: 5 additions & 0 deletions test_runner/fixtures/pageserver/allowed_errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,11 @@ def scan_pageserver_log_for_errors(
".*startup_reconcile: Could not scan node.*",
# Tests run in dev mode
".*Starting in dev mode.*",
# Tests that stop endpoints & use the storage controller's neon_local notification
# mechanism might fail (neon_local's stopping and endpoint isn't atomic wrt the storage
# controller's attempts to notify the endpoint).
".*reconciler.*Local notification hook failed.*",
".*reconciler.*neon_local error.*",
]


Expand Down

0 comments on commit 6f77cdd

Please sign in to comment.