Bug 1757212
| Summary: | If the Destination Cluster for a migplan doesn't exist, the controller crashes with a nil pointer reference | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Scott Seago <sseago> |
| Component: | Migration Tooling | Assignee: | Scott Seago <sseago> |
| Status: | CLOSED ERRATA | QA Contact: | Zhang Cheng <chezhang> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.2.0 | CC: | dymurray, jmatthew, xjiang |
| Target Milestone: | --- | ||
| Target Release: | 4.3.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-02-06 20:20:44 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Fix is here: https://github.com/fusor/mig-controller/pull/333 Fix is merged on master. Verified. if a migplan with a dest cluster reference that doesn't exist, it will show following message.
status:
conditions:
- category: Critical
lastTransitionTime: "2020-01-15T07:47:23Z"
message: The `dstMigClusterRef` must reference a `migcluster`.
reason: NotFound
status: "True"
type: InvalidDestinationClusterRef
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHEA-2020:0440 |
Description of problem: PV discovery checks src cluster conditions before processing but not dest cluster conditions. As a result, if the dest cluster doesn't exist, the controller crashes with a nil pointer reference. mponent (if applicable): How reproducible: Always Steps to Reproduce: 1. Create a migplan with a dest cluster reference that doesn't exist. 2. Next migplan reconcile will crash the controller Actual results: Controller crashes with the following: E0930 13:39:06.717983 15420 runtime.go:69] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference) /home/sseago/go/src/github.com/fusor/mig-controller/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:76 /home/sseago/go/src/github.com/fusor/mig-controller/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:65 /home/sseago/go/src/github.com/fusor/mig-controller/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:51 /usr/lib/golang/src/runtime/asm_amd64.s:522 /usr/lib/golang/src/runtime/panic.go:513 /usr/lib/golang/src/runtime/panic.go:82 /usr/lib/golang/src/runtime/signal_unix.go:390 /home/sseago/go/src/github.com/fusor/mig-controller/pkg/controller/migplan/pvlist.go:57 /home/sseago/go/src/github.com/fusor/mig-controller/pkg/controller/migplan/migplan_controller.go:214 /home/sseago/go/src/github.com/fusor/mig-controller/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:215 /home/sseago/go/src/github.com/fusor/mig-controller/vendor/sigs.k8s.io/controller-runtime/pkg/internal/controller/controller.go:158 /home/sseago/go/src/github.com/fusor/mig-controller/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:133 /home/sseago/go/src/github.com/fusor/mig-controller/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:134 /home/sseago/go/src/github.com/fusor/mig-controller/vendor/k8s.io/apimachinery/pkg/util/wait/wait.go:88 /usr/lib/golang/src/runtime/asm_amd64.s:1333 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=0x148 pc=0x12dbcf9] goroutine 243 [running]: github.com/fusor/mig-controller/vendor/k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0) /home/sseago/go/src/github.com/fusor/mig-controller/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:58 +0x108 panic(0x14c8460, 0x2621400) /usr/lib/golang/src/runtime/panic.go:513 +0x1b9 github.com/fusor/mig-controller/pkg/controller/migplan.(*ReconcileMigPlan).updatePvs(0xc0005f05c0, 0xc014bdcea0, 0xc0002ab110, 0xc014bdcea0) /home/sseago/go/src/github.com/fusor/mig-controller/pkg/controller/migplan/pvlist.go:57 +0x229 github.com/fusor/mig-controller/pkg/controller/migplan.(*ReconcileMigPlan).Reconcile(0xc0005f05c0, 0xc000452a68, 0x3, 0xc00d8d3140, 0x1a, 0x2636f00, 0x0, 0x0, 0x0) Expected results: Expected the migplan to have an error condition related to the Dest cluster. Additional info: