Skip to content

Commit

Permalink
Merge pull request #2052 from sawsa307/fix-set-error-state
Browse files Browse the repository at this point in the history
Update set error state for CalculateEndpoints()
  • Loading branch information
k8s-ci-robot authored Mar 31, 2023
2 parents 846fbf3 + 823d691 commit 3a7d4bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/neg/syncers/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ func (s *transactionSyncer) syncInternal() error {
start := time.Now()
err := s.syncInternalImpl()
if err != nil {
s.logger.V(3).Info("Updating error state", "error state", s.getErrorStateReason(err))
s.setErrorState(s.getErrorStateReason(err))
}
s.updateStatus(err)
Expand Down Expand Up @@ -267,8 +268,7 @@ func (s *transactionSyncer) syncInternalImpl() error {
endpointsData := negtypes.EndpointsDataFromEndpointSlices(endpointSlices)
targetMap, endpointPodMap, dupCount, err = s.endpointsCalculator.CalculateEndpoints(endpointsData, currentMap)
if err != nil {
s.setErrorState(s.getErrorStateReason(err))
return fmt.Errorf("endpoints calculation error in mode %q, err: %w", s.endpointsCalculator.Mode(), err)
return err
}
err = s.endpointsCalculator.ValidateEndpoints(endpointsData, endpointPodMap, dupCount)
if err != nil {
Expand Down

0 comments on commit 3a7d4bd

Please sign in to comment.