Skip to content

Commit

Permalink
operator v1: try to avoid problems where status is internally overridden
Browse files Browse the repository at this point in the history
  • Loading branch information
birdayz committed Nov 18, 2024
1 parent 390e4b6 commit 38dbb32
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions operator/pkg/resources/statefulset_scale.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,12 +291,12 @@ func (r *StatefulSetResource) handleDecommission(ctx context.Context, l logr.Log
if err != nil {
return err
}
cluster.Status.DecommissioningNode = nil
cluster.SetDecommissionBrokerID(nil)
err = r.Status().Update(ctx, cluster)
if err == nil {
log.Info("Cleared decomm broker ID from status")
// sync original cluster variable to avoid conflicts on subsequent operations
r.pandaCluster.Status = cluster.Status
r.pandaCluster.SetDecommissionBrokerID(nil)
}
return err
})
Expand Down

0 comments on commit 38dbb32

Please sign in to comment.