Bug 1879426 - registry operator panics: interface conversion: cache.DeletedFinalStateUnknown is not v1.Object: missing method GetAnnotations
Summary: registry operator panics: interface conversion: cache.DeletedFinalStateUnknow...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image Registry
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ---
: 4.6.0
Assignee: Oleg Bulatov
QA Contact: Wenjing Zheng
URL:
Whiteboard:
Depends On:
Blocks: 1886603
TreeView+ depends on / blocked
 
Reported: 2020-09-16 09:37 UTC by Oleg Bulatov
Modified: 2020-10-27 16:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: type assertions were made twice for a variable, and the second time its result was not checked Consequence: the assertions were false for cache.DeletedFinalStateUnknown and the second one caused panic Fix: use checked type assertions Result: the operator does not panic
Clone Of:
Environment:
Last Closed: 2020-10-27 16:41:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift cluster-image-registry-operator pull 609 0 None closed Bug 1879426: Remove unsafe type casting 2020-11-02 18:18:09 UTC
Red Hat Product Errata RHBA-2020:4196 0 None None None 2020-10-27 16:41:31 UTC

Description Oleg Bulatov 2020-09-16 09:37:06 UTC
Description of problem:

The registry operator panics:

E0916 05:10:49.599799       1 runtime.go:78] Observed a panic: &runtime.TypeAssertionError{_interface:(*runtime._type)(nil), concrete:(*runtime._type)(0x239e580), asserted:(*runtime._type)(0x255f620), missingMethod:"GetAnnotations"} (interface conversion: cache.DeletedFinalStateUnknown is not v1.Object: missing method GetAnnotations)
goroutine 350 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic(0x22d3d60, 0xc0010b0390)
	/go/src/github.com/openshift/cluster-image-registry-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:74 +0xa3
k8s.io/apimachinery/pkg/util/runtime.HandleCrash(0x0, 0x0, 0x0)
	/go/src/github.com/openshift/cluster-image-registry-operator/vendor/k8s.io/apimachinery/pkg/util/runtime/runtime.go:48 +0x82
panic(0x22d3d60, 0xc0010b0390)
	/usr/lib/golang/src/runtime/panic.go:969 +0x166
github.com/openshift/cluster-image-registry-operator/pkg/operator.(*Controller).handler.func3(0x239e580, 0xc000c58100)
	/go/src/github.com/openshift/cluster-image-registry-operator/pkg/operator/controller.go:387 +0xab
k8s.io/client-go/tools/cache.ResourceEventHandlerFuncs.OnDelete(...)
	/go/src/github.com/openshift/cluster-image-registry-operator/vendor/k8s.io/client-go/tools/cache/controller.go:241

https://prow.ci.openshift.org/view/gs/origin-ci-test/logs/release-openshift-origin-installer-e2e-azure-4.6/1306090255216021504

https://storage.googleapis.com/origin-ci-test/logs/release-openshift-origin-installer-e2e-azure-4.6/1306090255216021504/artifacts/e2e-azure/pods/openshift-image-registry_cluster-image-registry-operator-845f685745-87mld_cluster-image-registry-operator_previous.log

Comment 4 Benjamin Gilbert 2020-10-08 21:03:35 UTC
Since this is targeted for 4.6, I gather we're going to continue seeing test failures for it in 4.5?  Accordingly, I've added "Undiagnosed panic detected in pod" to the environment list, which will unfortunately cause unrelated undiagnosed panics to drop off of build-watchers' radar.

Comment 5 Benjamin Gilbert 2020-10-08 22:48:32 UTC
Removing the test from the environment list again, since I misunderstood how Sippy correlates BZs: https://github.com/openshift/sippy/issues/128#issuecomment-705797307

Comment 7 errata-xmlrpc 2020-10-27 16:41:19 UTC
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 (OpenShift Container Platform 4.6 GA Images), 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/RHBA-2020:4196


Note You need to log in before you can comment on or make changes to this bug.