Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

report event when ip alloc failed #696

Merged
merged 1 commit into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions pkg/controller/multi-ip/node/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -632,6 +632,10 @@

updateCrCondition(options)

if err != nil {
n.record.Event(node, corev1.EventTypeWarning, "AllocIPFailed", err.Error())

Check warning on line 636 in pkg/controller/multi-ip/node/pool.go

View check run for this annotation

Codecov / codecov/patch

pkg/controller/multi-ip/node/pool.go#L635-L636

Added lines #L635 - L636 were not covered by tests
}

// the err is kept
return err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/eni/crdv2.go
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
if wait.Interrupted(err) {
allocResp.Err = &types.Error{
Code: types.ErrIPNotAllocated,
Msg: fmt.Sprintf("timed out waiting for ip allocated. Use 'kubectl get nodes.network.alibabacloud.com %s' to see more detail", r.nodeName),
Msg: fmt.Sprintf("timed out waiting for ip allocated. Use 'kubectl describe nodes.network.alibabacloud.com %s' to see more detail", r.nodeName),

Check warning on line 227 in pkg/eni/crdv2.go

View check run for this annotation

Codecov / codecov/patch

pkg/eni/crdv2.go#L227

Added line #L227 was not covered by tests
R: err,
}
} else {
Expand Down
Loading