Skip to content

Commit 7e8650d

Browse files
authored
Merge pull request #5013 from nojnhuh/amp-transient
log transient AzureMachinePool errors at info level
2 parents fc3239b + 95d3091 commit 7e8650d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

exp/controllers/azuremachinepool_controller.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ package controllers
1818

1919
import (
2020
"context"
21+
"fmt"
2122
"reflect"
2223
"time"
2324

@@ -329,7 +330,11 @@ func (ampr *AzureMachinePoolReconciler) reconcileNormal(ctx context.Context, mac
329330
}
330331

331332
if reconcileError.IsTransient() {
332-
log.Error(err, "failed to reconcile AzureMachinePool", "name", machinePoolScope.Name())
333+
if azure.IsOperationNotDoneError(reconcileError) {
334+
log.V(2).Info(fmt.Sprintf("AzureMachinePool reconcile not done: %s", reconcileError.Error()))
335+
} else {
336+
log.V(2).Info(fmt.Sprintf("transient failure to reconcile AzureMachinePool, retrying: %s", reconcileError.Error()))
337+
}
333338
return reconcile.Result{RequeueAfter: reconcileError.RequeueAfter()}, nil
334339
}
335340

0 commit comments

Comments
 (0)