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

loadbalancer: Fix NPE when comparing load balancers #2163

Merged
merged 1 commit into from
Dec 11, 2020

Conversation

randomvariable
Copy link
Member

@randomvariable randomvariable commented Dec 11, 2020

Signed-off-by: Naadir Jeewa jeewan@vmware.com

What this PR does / why we need it:

For addressing the following

E1210 19:57:59.133730       1 runtime.go:78] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
goroutine 350 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic(0x1f3db60, 0x39e1490)
	/go/pkg/mod/k8s.io/apimachinery@v0.17.9/pkg/util/runtime/runtime.go:74 +0xa3
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
	/go/pkg/mod/k8s.io/apimachinery@v0.17.9/pkg/util/runtime/runtime.go:48 +0x82
panic(0x1f3db60, 0x39e1490)
	/usr/local/go/src/runtime/panic.go:679 +0x1b2
sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/services/elb.(*Service).describeClassicELB(0xc00120cfc0, 0xc000eb0de0, 0x18, 0x0, 0x0, 0x0)
	/workspace/pkg/cloud/services/elb/loadbalancer.go:586 +0x29c
sigs.k8s.io/cluster-api-provider-aws/pkg/cloud/services/elb.(*Service).ReconcileLoadbalancers(0xc00120cfc0, 0x0, 0x0)
	/workspace/pkg/cloud/services/elb/loadbalancer.go:58 +0xe4
sigs.k8s.io/cluster-api-provider-aws/controllers.reconcileNormal(0xc000f6e720, 0xc0006b7590, 0x274cf20, 0xc00072b3e0, 0xc00083b1e0)
	/workspace/controllers/awscluster_controller.go:195 +0x233
sigs.k8s.io/cluster-api-provider-aws/controllers.(*AWSClusterReconciler).Reconcile(0xc0000b4ff0, 0xc000766760, 0x17, 0xc0008001b0, 0xe, 0xc0005d8200, 0x0, 0x0, 0x0)
	/workspace/controllers/awscluster_controller.go:122 +0x6d6
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).reconcileHandler(0xc0001d6840, 0x1ff7b40, 0xc0008f52a0, 0x0)
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.5.11/pkg/internal/controller/controller.go:255 +0x162
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).processNextWorkItem(0xc0001d6840, 0xc0004aef00)
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.5.11/pkg/internal/controller/controller.go:231 +0xcb
sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).worker(0xc0001d6840)
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.5.11/pkg/internal/controller/controller.go:210 +0x2b
k8s.io/apimachinery/pkg/util/wait.JitterUntil.func1(0xc000314630)
	/go/pkg/mod/k8s.io/apimachinery@v0.17.9/pkg/util/wait/wait.go:152 +0x5e
k8s.io/apimachinery/pkg/util/wait.JitterUntil(0xc000314630, 0x3b9aca00, 0x0, 0x1, 0xc0003f6ba0)
	/go/pkg/mod/k8s.io/apimachinery@v0.17.9/pkg/util/wait/wait.go:153 +0xf8
k8s.io/apimachinery/pkg/util/wait.Until(0xc000314630, 0x3b9aca00, 0xc0003f6ba0)
	/go/pkg/mod/k8s.io/apimachinery@v0.17.9/pkg/util/wait/wait.go:88 +0x4d
created by sigs.k8s.io/controller-runtime/pkg/internal/controller.(*Controller).Start.func1
	/go/pkg/mod/sigs.k8s.io/controller-runtime@v0.5.11/pkg/internal/controller/controller.go:192 +0x468
panic: runtime error: invalid memory address or nil pointer dereference [recovered]
	panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x1bbdd6c]

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 11, 2020
@randomvariable
Copy link
Member Author

/test ?

@k8s-ci-robot
Copy link
Contributor

@randomvariable: The following commands are available to trigger jobs:

  • /test pull-cluster-api-provider-aws-test
  • /test pull-cluster-api-provider-aws-build
  • /test pull-cluster-api-provider-aws-verify
  • /test pull-cluster-api-provider-aws-e2e-conformance
  • /test pull-cluster-api-provider-aws-e2e-conformance-with-ci-artifacts
  • /test pull-cluster-api-provider-aws-e2e

Use /test all to run the following jobs:

  • pull-cluster-api-provider-aws-test
  • pull-cluster-api-provider-aws-build
  • pull-cluster-api-provider-aws-verify

In response to this:

/test ?

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.

@k8s-ci-robot k8s-ci-robot added the size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. label Dec 11, 2020
@randomvariable
Copy link
Member Author

/test pull-cluster-api-provider-aws-e2e

Signed-off-by: Naadir Jeewa <jeewan@vmware.com>
@randomvariable
Copy link
Member Author

/test pull-cluster-api-provider-aws-e2e

@MarcusNoble
Copy link
Contributor

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm "Looks good to me", indicates that a PR is ready to be merged. label Dec 11, 2020
@richardcase
Copy link
Member

/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: richardcase

The full list of commands accepted by this bot can be found here.

The pull request process is described here

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

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 11, 2020
@k8s-ci-robot k8s-ci-robot merged commit 16f13f3 into kubernetes-sigs:master Dec 11, 2020
@randomvariable randomvariable deleted the elb-npe branch December 11, 2020 11:25
@sedefsavas
Copy link
Contributor

Thanks for fixing this @randomvariable!

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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm "Looks good to me", indicates that a PR is ready to be merged. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants