-
Notifications
You must be signed in to change notification settings - Fork 231
bug 1747246: nodelink_controller: fix SEGV in findNodeFromMachine() #390
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
bug 1747246: nodelink_controller: fix SEGV in findNodeFromMachine() #390
Conversation
If an error occurs looking up the machine we went on to log the machine name using `machine.GetName()` as part of the error message. That triggered a nil pointer dereference given that machine is nil when lookup fails. Add explicit unit test so that we don't regress. Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1747246
|
@frobware: This pull request references Bugzilla bug 1747246, which is valid. The bug has been updated to refer to the pull request using the external bug tracker. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ingvagabund The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
/lgtm |
|
@frobware: All pull requests linked via external trackers have merged. Bugzilla bug 1747246 has been moved to the MODIFIED state. DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
|
||
| func TestFindMachineFromNodeDoesNotPanicBZ1747246(t *testing.T) { | ||
| testMachine := machine("matchingInternalIP", "test", []corev1.NodeAddress{ | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
If an error occurs looking up the machine we went on to log the
machine name using
machine.GetName()as part of the error message.That triggered a nil pointer dereference given that machine is nil
when lookup fails.
Add explicit unit test so that we don't regress.
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1747246