Skip to content

Conversation

@frobware
Copy link
Contributor

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

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
@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Aug 30, 2019
@ingvagabund ingvagabund changed the title nodelink_controller: fix SEGV in findNodeFromMachine() bug 1747246: nodelink_controller: fix SEGV in findNodeFromMachine() Aug 30, 2019
@openshift-ci-robot
Copy link
Contributor

@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.

Details

In response to this:

bug 1747246: nodelink_controller: fix SEGV in findNodeFromMachine()

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.

@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Aug 30, 2019
@ingvagabund
Copy link
Member

/approve

@openshift-ci-robot
Copy link
Contributor

[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

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Aug 30, 2019
@russellb
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Aug 30, 2019
@openshift-merge-robot openshift-merge-robot merged commit 93bf96b into openshift:master Aug 30, 2019
@openshift-ci-robot
Copy link
Contributor

@frobware: All pull requests linked via external trackers have merged. Bugzilla bug 1747246 has been moved to the MODIFIED state.

Details

In response to this:

bug 1747246: nodelink_controller: fix SEGV in findNodeFromMachine()

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{
{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

@frobware frobware deleted the fix-crashloop-nodelink-bz1747246 branch September 3, 2019 09:56
@frobware frobware restored the fix-crashloop-nodelink-bz1747246 branch September 3, 2019 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants