Bug 1745767

Summary: Machine-config-controller panic on pathological mirror configuration
Product: OpenShift Container Platform Reporter: Miloslav Trmač <mitr>
Component: Machine Config OperatorAssignee: Miloslav Trmač <mitr>
Status: CLOSED ERRATA QA Contact: Micah Abbott <miabbott>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 4.2.0CC: mnguyen
Target Milestone: ---   
Target Release: 4.2.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: 2019-10-16 06:37:32 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:

Description Miloslav Trmač 2019-08-26 21:02:54 UTC
Description of problem:
Per unit tests, given an ImageContentSourcePolicy CRD with
> RepositoryDigestMirrors{
>   Source: "source.example.com",
>   Mirrors: []string{"source.example.com"},
> }

the code creating registries.conf will fail with
> panic: runtime error: index out of range [recovered]
>	panic: runtime error: index out of range
at
> machine-config-operator/pkg/controller/container-runtime-config/helpers.go:309

Proposed fix is https://github.com/openshift/machine-config-operator/pull/1082 .

Comment 3 errata-xmlrpc 2019-10-16 06:37:32 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, 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-2019:2922