Bug 1946119 - panic parsing install-config
Summary: panic parsing install-config
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.8
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ---
: 4.8.0
Assignee: Matthew Staebler
QA Contact: Yunfei Jiang
URL:
Whiteboard:
: 1946412 (view as bug list)
Depends On:
Blocks: 1945907
TreeView+ depends on / blocked
 
Reported: 2021-04-04 18:58 UTC by Luis Sanchez
Modified: 2021-07-27 22:57 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: No Doc Update
Doc Text:
This is a bug fix of new functionality.
Clone Of:
Environment:
Last Closed: 2021-07-27 22:57:19 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift installer pull 4818 0 None open Bug 1946119: aws: support setting IAM role in the default AWS machine platform 2021-04-05 02:11:01 UTC
Red Hat Product Errata RHSA-2021:2438 0 None None None 2021-07-27 22:57:46 UTC

Description Luis Sanchez 2021-04-04 18:58:01 UTC
Version:

$ openshift-install version
openshift-install 4.8.0-0.nightly-2021-04-03-092337
built from commit af24457b32af35787a0ec84c3b2037877ef27a33
release image registry.ci.openshift.org/ocp/release@sha256:db9b9f96f58825bb37fdd9c3728067d639ea0ae15846934df600fd5c6aeda0e8

Platform:

aws/IPI

What happened?

INFO Creating infrastructure resources...                                                                                                         
panic: runtime error: invalid memory address or nil pointer dereference                                                                           
[signal SIGSEGV: segmentation violation code=0x1 addr=0x70 pc=0x2bfdf20]                                                                          
goroutine 1 [running]:                                                                                                                            
github.com/openshift/installer/pkg/asset/cluster/aws.tagIamRoles(0xec51a78, 0xc0001a0008, 0xc001aad960, 0xe, 0xc001d0b0a0, 0x0, 0x0)              
        

What did you expect to happen?

Install to succeed.

How to reproduce it (as minimally and precisely as possible)?

In your install-config.yaml:

controlPlane:
  platform: {}

note there is no `aws` field.

Anything else we need to know?

Adding aws property to platform fixes it:

controlPlane:
  platform:
    aws: {}


aws field is nillable, so a nil check is needed when reading the iamRole

Comment 1 To Hung Sze 2021-04-05 14:00:19 UTC
I tried and reproduced it using AWS - but not GCP.

Comment 2 To Hung Sze 2021-04-05 16:42:11 UTC
Just choose AWS and install.

Comment 3 Matthew Staebler 2021-04-06 13:57:01 UTC
*** Bug 1946412 has been marked as a duplicate of this bug. ***

Comment 5 Ross Brattain 2021-04-07 17:03:39 UTC
Workaround, in both platforms dicts.

compute:
- name: worker
  platform:
    aws:
      iamRole: ""
controlPlane:
  name: master
  platform:
    aws:
      iamRole: ""

Comment 6 Yunfei Jiang 2021-04-08 06:12:01 UTC
verified. PASS.
OCP version: 4.8.0-0.nightly-2021-04-08-005413

> config 1

compute:
- name: worker
  platform: {}
controlPlane:
  name: master
  platform: {}
platform:
  aws:
    region: us-east-2

> config 2

compute:
- name: worker
  platform: {}
controlPlane:
  name: master
  platform: {}
platform:
  aws:
    region: us-east-2
    defaultMachinePlatform:
      iamRole: existing_iam_role

Comment 9 errata-xmlrpc 2021-07-27 22:57: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 (Moderate: OpenShift Container Platform 4.8.2 bug fix and security update), 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/RHSA-2021:2438


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