fix: match storage timeout errors without trailing slash
The error pattern `/storage/` only matched storage content endpoints
(`/storage/{name}/content`) but not the main storage list endpoint
(`/nodes/{node}/storage`).
This caused storage timeout errors like:
Get ".../nodes/pve-100-224/storage": context deadline exceeded
to incorrectly mark cluster nodes as unhealthy, even though the timeout
was due to a slow cross-node storage query, not actual node connectivity
issues.
Fixes #754
This commit is contained in:
parent
9d77de4bf1
commit
3cc7bfe934
1 changed files with 2 additions and 2 deletions
|
|
@ -640,8 +640,8 @@ func (cc *ClusterClient) executeWithFailover(ctx context.Context, fn func(*Clien
|
|||
strings.Contains(errStr, "json: cannot unmarshal") ||
|
||||
(strings.Contains(errStr, "storage '") && strings.Contains(errStr, "is not available on node")) ||
|
||||
strings.Contains(errStr, "unexpected response format") ||
|
||||
(strings.Contains(errStr, "context deadline exceeded") && strings.Contains(errStr, "/storage/")) ||
|
||||
(strings.Contains(errStr, "Client.Timeout exceeded") && strings.Contains(errStr, "/storage/")) {
|
||||
(strings.Contains(errStr, "context deadline exceeded") && strings.Contains(errStr, "/storage")) ||
|
||||
(strings.Contains(errStr, "Client.Timeout exceeded") && strings.Contains(errStr, "/storage")) {
|
||||
// This is likely a node-specific failure, not an endpoint failure
|
||||
// Return the error but don't mark the endpoint as unhealthy
|
||||
log.Debug().
|
||||
|
|
|
|||
Loading…
Reference in a new issue