Skip to content

Commit a181ca4

Browse files
Mark agent inactive on ack of MIGRATE action (#5260)
1 parent cad67fc commit a181ca4

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

internal/pkg/api/handleAck.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ import (
3434
const (
3535
TypeUnenroll = "UNENROLL"
3636
TypeUpgrade = "UPGRADE"
37+
TypeMigrate = "MIGRATE"
3738
)
3839

3940
var (
@@ -305,7 +306,7 @@ func (ack *AckT) handleAckEvents(ctx context.Context, zlog zerolog.Logger, agent
305306
setResult(n, http.StatusOK)
306307
}
307308

308-
if event.Error == nil && action.Type == TypeUnenroll {
309+
if event.Error == nil && (action.Type == TypeUnenroll || action.Type == TypeMigrate) {
309310
unenrollIdxs = append(unenrollIdxs, n)
310311
}
311312
span.End()

0 commit comments

Comments
 (0)