Skip to content

Commit

Permalink
feat(v2 upgrade/controller): upgrading node shouldn't be responsible …
Browse files Browse the repository at this point in the history
…for backup resources

Longhorn 9104

Signed-off-by: Derek Su <[email protected]>
  • Loading branch information
derekbit committed Dec 15, 2024
1 parent aefe41d commit b23af6c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions controller/backup_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -596,6 +596,14 @@ func (bc *BackupController) isResponsibleFor(b *longhorn.Backup, defaultEngineIm
err = errors.Wrap(err, "error while checking isResponsibleFor")
}()

upgradeRequested, err := bc.ds.IsNodeDataEngineUpgradeRequested(bc.controllerID)
if err != nil {
return false, err
}
if upgradeRequested {
return false, nil
}

isResponsible := isControllerResponsibleFor(bc.controllerID, bc.ds, b.Name, "", b.Status.OwnerID)

currentOwnerEngineAvailable, err := bc.ds.CheckEngineImageReadiness(defaultEngineImage, b.Status.OwnerID)
Expand Down

0 comments on commit b23af6c

Please sign in to comment.