Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1891910

Summary: Installer fails with obscure error if undefined flavor is being used
Product: OpenShift Container Platform Reporter: Chris Janiszewski <cjanisze>
Component: InstallerAssignee: Eric Duen <eduen>
Installer sub component: OpenShift on OpenStack QA Contact: David Sanz <dsanzmor>
Status: CLOSED DUPLICATE Docs Contact:
Severity: unspecified    
Priority: unspecified CC: pprinett
Version: 4.6   
Target Milestone: ---   
Target Release: ---   
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-10-27 19:57:56 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 Chris Janiszewski 2020-10-27 16:20:42 UTC
Version:

$ openshift-install version
4.6.1

Platform:
Openstack 16.1.1

Please specify:
IPI

What happened?

When deploying OCP IPI on OSP with undefined flavor in the install-config.yaml, the installer errors out with a cryptic error

(ocp-hybrid) [stack@undercloud-hextupleo ~]$ openshift-install --dir=ocp-hybrid create cluster --log-level=debug                                                                                            
DEBUG OpenShift Installer 4.6.1
DEBUG Built from commit ebdbda57fc18d3b73e69f0f2cc499ddfca7e6593
DEBUG Fetching Metadata...
DEBUG Loading Metadata...
DEBUG   Loading Cluster ID...
DEBUG     Loading Install Config...
DEBUG       Loading SSH Key...
DEBUG       Loading Base Domain...
DEBUG         Loading Platform...
DEBUG       Loading Cluster Name...
DEBUG         Loading Base Domain...
DEBUG         Loading Platform...
DEBUG       Loading Pull Secret...
DEBUG       Loading Platform...
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x22070ef]
 
goroutine 1 [running]:
github.com/openshift/installer/pkg/asset/installconfig/openstack/validation.validateMpoolFlavor(0x0, 0xc000a61500, 0x8, 0x2, 0x19, 0xc000ca9b90, 0xc00057ae00, 0x40e138, 0x30)                              
        /go/src/github.com/openshift/installer/pkg/asset/installconfig/openstack/validation/machinepool.go:117 +0x4f                                                                                        
github.com/openshift/installer/pkg/asset/installconfig/openstack/validation.ValidateMachinePool(0xc000d98360, 0xc0009b03c0, 0x0, 0xc000ca9b90, 0x1, 0x1, 0xc000ca9b90)                                      
        /go/src/github.com/openshift/installer/pkg/asset/installconfig/openstack/validation/machinepool.go:50 +0x68a                                                                                        
github.com/openshift/installer/pkg/asset/installconfig/openstack.Validate(0xc00055fb00, 0x0, 0x0)
        /go/src/github.com/openshift/installer/pkg/asset/installconfig/openstack/validate.go:28 +0x3a5
github.com/openshift/installer/pkg/asset/installconfig.(*InstallConfig).platformValidation(0xc00000d0e0, 0x0, 0x0)                                                                                          
        /go/src/github.com/openshift/installer/pkg/asset/installconfig/installconfig.go:188 +0x87
github.com/openshift/installer/pkg/asset/installconfig.(*InstallConfig).finish(0xc00000d0e0, 0xd4f01cb, 0x13, 0x11cb, 0xd216b00)                                                                            
        /go/src/github.com/openshift/installer/pkg/asset/installconfig/installconfig.go:148 +0x234
github.com/openshift/installer/pkg/asset/installconfig.(*InstallConfig).Load(0xc00000d0e0, 0xe7c97e0, 0xc0002fb480, 0xe8be2a0, 0xc00000d0e0, 0xc00000d0e0)                                                  
        /go/src/github.com/openshift/installer/pkg/asset/installconfig/installconfig.go:125 +0x1f0
github.com/openshift/installer/pkg/asset/store.(*storeImpl).load(0xc0006c18c0, 0xe7f3f20, 0xc00000c680, 0xc0000786ec, 0x4, 0xc0000786ec, 0x4, 0x0)                                                          
        /go/src/github.com/openshift/installer/pkg/asset/store/store.go:264 +0x455
github.com/openshift/installer/pkg/asset/store.(*storeImpl).load(0xc0006c18c0, 0xe7f3ee0, 0xc00000c5c0, 0xd4838c4, 0x2, 0xd4838c4, 0x2, 0x0)                                                                
        /go/src/github.com/openshift/installer/pkg/asset/store/store.go:247 +0x2d7
github.com/openshift/installer/pkg/asset/store.(*storeImpl).load(0xc0006c18c0, 0x7fdee86cafb8, 0x154b0cf8, 0x0, 0x0, 0x2, 0x2, 0xe740e60)                                                                    
        /go/src/github.com/openshift/installer/pkg/asset/store/store.go:247 +0x2d7
github.com/openshift/installer/pkg/asset/store.(*storeImpl).fetch(0xc0006c18c0, 0x7fdee86cafb8, 0x154b0cf8, 0x0, 0x0, 0x40b4e5, 0xbf8cde0)                                                                  
        /go/src/github.com/openshift/installer/pkg/asset/store/store.go:201 +0xa3a
github.com/openshift/installer/pkg/asset/store.(*storeImpl).Fetch(0xc0006c18c0, 0x7fdee86cafb8, 0x154b0cf8, 0x15482f20, 0x6, 0x6, 0xfa00000000000000, 0xed72a35a6)                                          
        /go/src/github.com/openshift/installer/pkg/asset/store/store.go:77 +0x4b
main.runTargetCmd.func1(0x7ffd34c223c7, 0xa, 0xc00000c440, 0xc0006c1680)
        /go/src/github.com/openshift/installer/cmd/openshift-install/create.go:172 +0x135
main.runTargetCmd.func2(0x1548b7c0, 0xc00000c1a0, 0x0, 0x2)
        /go/src/github.com/openshift/installer/cmd/openshift-install/create.go:199 +0xb5
github.com/spf13/cobra.(*Command).execute(0x1548b7c0, 0xc00000c140, 0x2, 0x2, 0x1548b7c0, 0xc00000c140)                                                                                                      
        /go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:844 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xc00016b8c0, 0xc000e9fe58, 0x1, 0x1)
        /go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:945 +0x336
github.com/spf13/cobra.(*Command).Execute(...)
        /go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:885
main.installerMain()
        /go/src/github.com/openshift/installer/cmd/openshift-install/main.go:63 +0x2b8
main.main()
        /go/src/github.com/openshift/installer/cmd/openshift-install/main.go:43 +0xcf


What did you expect to happen?

Maybe there should be another check that would validate if the flavor is even there and give some more user friendly error if it's not

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

1. define install-config.yaml and include flavor that doesn't exist. Example:
compute:
- architecture: amd64
  hyperthreading: Enabled
  name: worker
  platform:
    openstack:
      additionalNetworkIDs:
      - 626ea243-cc16-4215-aba0-63f96c9cc345
      type: baremetal-large
  replicas: 2


2. Attempt to deploy


Anything else we need to know?

It's not a super critical issue and probably could land in nice to have category in my mind.
http://pastebin.test.redhat.com/913390

Comment 1 Pierre Prinetti 2020-10-27 19:57:56 UTC

*** This bug has been marked as a duplicate of bug 1887863 ***