impr(controller_upcall_client): clean up copy-pasta code & add context to retries (#10991)

Before this PR, re-attach and validate would log the same warning
```
calling control plane generation validation API failed
```
on retry errors.

This can be confusing.

This PR makes the message generically valid for any upcall and adds
additional tracing spans to capture context.

Along the way, clean up some copy-pasta variable naming.

refs
-
https://github.com/neondatabase/neon/issues/10381#issuecomment-2684755827

---------

Co-authored-by: Alexander Lakhin <alexander.lakhin@neon.tech>
This commit is contained in:
Christian Schwarz
2025-02-27 11:59:43 +01:00
committed by GitHub
parent 3a3d62dc4f
commit e35f7758d8
2 changed files with 11 additions and 7 deletions

View File

@@ -94,7 +94,9 @@ DEFAULT_PAGESERVER_ALLOWED_ERRORS = (
".*Flushed oversized open layer with size.*",
# During teardown, we stop the storage controller before the pageservers, so pageservers
# can experience connection errors doing background deletion queue work.
".*WARN deletion backend: calling control plane generation validation API failed.*error sending request.*",
".*WARN deletion backend:.* storage controller upcall failed, will retry.*error sending request.*",
# Can happen when the pageserver starts faster than the storage controller
".*WARN init_tenant_mgr:.* storage controller upcall failed, will retry.*error sending request.*",
# Can happen when the test shuts down the storage controller while it is calling the utilization API
".*WARN.*path=/v1/utilization .*request was dropped before completing",
# Can happen during shutdown