From d970e0505034938bf1d4be3d5f8ed2492d1aed3a Mon Sep 17 00:00:00 2001 From: anishakj <43978302+anishakj@users.noreply.github.com> Date: Wed, 11 Oct 2023 14:23:04 +0530 Subject: [PATCH] Issue 643: Fixing intermittent upgrade failure (#672) * Issue 643: Fixing intermittent upgrade failure Signed-off-by: anisha.kj * Adding logs Signed-off-by: anisha.kj * Fixed the typo Signed-off-by: anisha.kj --------- Signed-off-by: anisha.kj --- controllers/upgrade.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/controllers/upgrade.go b/controllers/upgrade.go index 34d3bbf00..402c7a463 100644 --- a/controllers/upgrade.go +++ b/controllers/upgrade.go @@ -409,6 +409,14 @@ func (r *PravegaClusterReconciler) syncSegmentStoreVersion(p *pravegav1beta1.Pra } if pod == nil { + pods, err := r.getStsPodsWithVersion(sts, p.Status.TargetVersion) + if err != nil { + return false, err + } + if *sts.Spec.Replicas == (int32)(len(pods)) { + log.Infof("All segmentstore pods are updated") + return false, nil + } return false, fmt.Errorf("could not obtain outdated pod") }