Skip to content

Commit

Permalink
Issue 220: Fix for intermittent bookkeeper cluster upgrade failure (#237
Browse files Browse the repository at this point in the history
)

Signed-off-by: anisha.kj <[email protected]>
  • Loading branch information
anishakj authored Oct 11, 2023
1 parent 5257dd4 commit b80fb7c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions controllers/upgrade.go
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,14 @@ func (r *BookkeeperClusterReconciler) syncBookkeeperVersion(bk *bookkeeperv1alph
}

if pod == nil {
pods, err := r.getStsPodsWithVersion(sts, bk.Status.TargetVersion)
if err != nil {
return false, err
}
if *sts.Spec.Replicas == (int32)(len(pods)) {
log.Infof("All bookkeeper pods are updated")
return false, nil
}
return false, fmt.Errorf("could not obtain outdated pod")
}

Expand Down

0 comments on commit b80fb7c

Please sign in to comment.