You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"DELETE http://ingester-zone-b-0.ingester-zone-b.test.svc.cluster.local./prepare-delayed-downscale": {statusCode: http.StatusConflict, body: "partition state is locked"},
953
+
"DELETE http://ingester-zone-b-1.ingester-zone-b.test.svc.cluster.local./prepare-delayed-downscale": {statusCode: http.StatusConflict, body: "partition state is locked"},
Copy file name to clipboardExpand all lines: pkg/controller/delay.go
+10-1Lines changed: 10 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -200,6 +200,8 @@ func callPrepareDownscaleAndReturnElapsedDurationsSinceInitiatedDownscale(ctx co
200
200
}
201
201
202
202
ifresp.StatusCode/100!=2 {
203
+
// Unlike `callCancelDelayedDownscale`, here we consider all non 2xx status code as error and should block the downscale.
204
+
// this includes the case where we fail because a partition state change is locked.
203
205
level.Error(epLogger).Log("msg", "unexpected status code returned when calling POST on endpoint", "status", resp.StatusCode, "response_body", string(body))
204
206
returnfmt.Errorf("HTTP POST request returned non-2xx status code: %v", resp.StatusCode)
err:=errors.New("HTTP DELETE request returned non-2xx status code")
264
265
body, readError:=io.ReadAll(resp.Body)
266
+
267
+
// Handle 409 Conflict separately - this typically means that the partition state is locked by an engineer
268
+
ifresp.StatusCode==http.StatusConflict {
269
+
level.Info(epLogger).Log("msg", "HTTP DELETE request returned 409 status code, delayed downscale cancellation skipped", "status", resp.StatusCode, "response_body", string(body))
270
+
returnnil
271
+
}
272
+
273
+
err:=errors.New("HTTP DELETE request returned non-2xx status code")
265
274
level.Error(epLogger).Log("msg", "unexpected status code returned when calling DELETE on endpoint", "status", resp.StatusCode, "response_body", string(body))
0 commit comments