mirror of https://github.com/minio/minio.git
heal/batch: Fix missing redirection to the first node (#20642)
Manual heal can return XMinioHealInvalidClientToken if the manual healing is started in the first node, and the next mc call to get the heal status is landed on another node. The reason is that redirection based on the token ID is not able to redirect requests to the first node due to a typo. This also affects the batch cancel command if the batch is being done in the first node, the user will never be able to cancel it due to the same bug.
This commit is contained in:
parent
b5177993b3
commit
0e9854372e
|
@ -245,7 +245,7 @@ func parseRequestToken(token string) (subToken string, nodeIndex int) {
|
|||
|
||||
func proxyRequestByToken(ctx context.Context, w http.ResponseWriter, r *http.Request, token string) (string, bool) {
|
||||
subToken, nodeIndex := parseRequestToken(token)
|
||||
if nodeIndex > 0 {
|
||||
if nodeIndex >= 0 {
|
||||
return subToken, proxyRequestByNodeIndex(ctx, w, r, nodeIndex)
|
||||
}
|
||||
return subToken, false
|
||||
|
|
Loading…
Reference in New Issue