Bug 1886845

Summary: image-registry operator panics when it fails to create azure container
Product: OpenShift Container Platform Reporter: Oleg Bulatov <obulatov>
Component: Image RegistryAssignee: Oleg Bulatov <obulatov>
Status: CLOSED CURRENTRELEASE QA Contact: Wenjing Zheng <wzheng>
Severity: high Docs Contact:
Priority: unspecified    
Version: 4.4CC: aos-bugs
Target Milestone: ---   
Target Release: 4.6.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: No Doc Update
Doc Text:
Story Points: ---
Clone Of:
: 1886849 (view as bug list) Environment:
Last Closed: 2020-10-09 14:08:33 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:
Bug Depends On:    
Bug Blocks: 1886849    

Description Oleg Bulatov 2020-10-09 14:05:50 UTC
Description of problem:

When the image-registry operator fails to create an Azure container, sometimes it panics because of invalid memory address dereference.

Version-Release number of selected component (if applicable):

4.5

How reproducible:

Sometimes.

Steps to Reproduce:

No clear steps to reproduce, see BZ 1886221.

Actual results:

The operator panics.

Expected results:

The operator reports an error.

Additional info:

E1008 19:45:54.418448     616 runtime.go:78] Observed a panic: "invalid memory address or nil pointer dereference" (runtime error: invalid memory address or nil pointer dereference)
goroutine 484 [running]:
k8s.io/apimachinery/pkg/util/runtime.logPanic(0x2042020, 0x3af9150)
        /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(0x2042020, 0x3af9150)
        /opt/rh/go-toolset-1.13/root/usr/lib/go-toolset-1.13-golang/src/runtime/panic.go:679 +0x1b2
github.com/openshift/cluster-image-registry-operator/pkg/storage/azure.(*driver).CreateStorage(0xc000dff9b0, 0xc000e92300, 0xc000776000, 0xc000807ba0)
        /go/src/github.com/openshift/cluster-image-registry-operator/pkg/storage/azure/azure.go:513 +0xe4d
github.com/openshift/cluster-image-registry-operator/pkg/resource.(*Generator).syncStorage(0xc0000e0da0, 0xc000e92300, 0x0, 0x0)
        /go/src/github.com/openshift/cluster-image-registry-operator/pkg/resource/generator.go:148 +0x140