Bug 1989630

Summary: ibmcloud installer panics getting client VSI profiles
Product: OpenShift Container Platform Reporter: Christopher J Schaefer <cschaefe>
Component: InstallerAssignee: aos-install
Installer sub component: openshift-installer QA Contact: Gaoyun Pei <gpei>
Status: CLOSED DUPLICATE Docs Contact:
Severity: unspecified    
Priority: unspecified    
Version: 4.9   
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: ---
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-08-03 16:00: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:

Description Christopher J Schaefer 2021-08-03 15:53:19 UTC
Version:

$ openshift-install version
Master (4.9)

Platform:

ibmcloud

Please specify:
IPI  (CI)

What happened?

Installer panics when attempting to create an IBM Cloud IPI cluster. The cause appears to be due to failed client VSIProfile initialization via the ibmcloud client and this caused the installer to panic
```
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x27f5bb7]
goroutine 1 [running]:
github.com/openshift/installer/pkg/asset/installconfig/ibmcloud.(*Client).GetVSIProfiles(0xc000c186e0, 0x11cc5438, 0xc0000780f0, 0xc000f54d08, 0x5044f1, 0x8, 0x10066960, 0xc000daa000)
	/go/src/github.com/openshift/installer/pkg/asset/installconfig/ibmcloud/client.go:290 +0x77
github.com/openshift/installer/pkg/asset/installconfig/ibmcloud.validateMachinePoolType(0x11e25338, 0xc000c186e0, 0xc000edf8b8, 0x8, 0xc000aefe00, 0xc000aefd01, 0xc000aefe00, 0xc000f54e60)
	/go/src/github.com/openshift/installer/pkg/asset/installconfig/ibmcloud/validation.go:73 +0x64
github.com/openshift/installer/pkg/asset/installconfig/ibmcloud.validateMachinePool(0x11e25338, 0xc000c186e0, 0xc000ae6000, 0xc000ae09f0, 0xc000aefe00, 0x0, 0xc000aefe00, 0xc000eadce0)
	/go/src/github.com/openshift/installer/pkg/asset/installconfig/ibmcloud/validation.go:58 +0x38b
github.com/openshift/installer/pkg/asset/installconfig/ibmcloud.Validate(0x11e25338, 0xc000c186e0, 0xc000a91d40, 0x0, 0x0)
	/go/src/github.com/openshift/installer/pkg/asset/installconfig/ibmcloud/validation.go:24 +0x5d0
github.com/openshift/installer/pkg/asset/installconfig.(*InstallConfig).platformValidation(0xc000ae0390, 0x0, 0x0)
	/go/src/github.com/openshift/installer/pkg/asset/installconfig/installconfig.go:197 +0x275
github.com/openshift/installer/pkg/asset/installconfig.(*InstallConfig).finish(0xc000ae0390, 0x104cd0b0, 0x13, 0x14b1, 0x1018a400)
	/go/src/github.com/openshift/installer/pkg/asset/installconfig/installconfig.go:162 +0x252
github.com/openshift/installer/pkg/asset/installconfig.(*InstallConfig).Load(0xc000ae0390, 0x11bf3720, 0xc0003f93b0, 0x11cf8bd8, 0xc000ae0390, 0xc000ae0390)
	/go/src/github.com/openshift/installer/pkg/asset/installconfig/installconfig.go:136 +0x1f3
github.com/openshift/installer/pkg/asset/store.(*storeImpl).load(0xc0011efd10, 0x11c20838, 0xc0011eff20, 0xc00053a88c, 0x4, 0xc00053a88c, 0x4, 0x0)
	/go/src/github.com/openshift/installer/pkg/asset/store/store.go:264 +0x455
github.com/openshift/installer/pkg/asset/store.(*storeImpl).load(0xc0011efd10, 0x11c20808, 0xc000144c20, 0x10446cc0, 0x2, 0x10446cc0, 0x2, 0x0)
	/go/src/github.com/openshift/installer/pkg/asset/store/store.go:247 +0x2d7
github.com/openshift/installer/pkg/asset/store.(*storeImpl).load(0xc0011efd10, 0x11c20ad8, 0x19c3adc0, 0x0, 0x0, 0x2, 0x2, 0x0)
	/go/src/github.com/openshift/installer/pkg/asset/store/store.go:247 +0x2d7
github.com/openshift/installer/pkg/asset/store.(*storeImpl).fetch(0xc0011efd10, 0x11c20ad8, 0x19c3adc0, 0x0, 0x0, 0x40b845, 0xebb84c0)
	/go/src/github.com/openshift/installer/pkg/asset/store/store.go:201 +0xa45
github.com/openshift/installer/pkg/asset/store.(*storeImpl).Fetch(0xc0011efd10, 0x11c20ad8, 0x19c3adc0, 0x19be6620, 0x4, 0x4, 0xed89a394f, 0x864ea46fd20748c)
	/go/src/github.com/openshift/installer/pkg/asset/store/store.go:77 +0x4b
main.runTargetCmd.func1(0x7ffef933b8b6, 0xe, 0xc000425a70, 0x0)
	/go/src/github.com/openshift/installer/cmd/openshift-install/create.go:238 +0x12d
main.runTargetCmd.func2(0x19bf4fe0, 0xc0003f9130, 0x0, 0x1)
	/go/src/github.com/openshift/installer/cmd/openshift-install/create.go:265 +0xb5
github.com/spf13/cobra.(*Command).execute(0x19bf4fe0, 0xc0003f9120, 0x1, 0x1, 0x19bf4fe0, 0xc0003f9120)
	/go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:854 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xc00055ab00, 0xc000f55de8, 0x1, 0x1)
	/go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:958 +0x375
github.com/spf13/cobra.(*Command).Execute(...)
	/go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:895
main.installerMain()
	/go/src/github.com/openshift/installer/cmd/openshift-install/main.go:72 +0x2fe
main.main()
	/go/src/github.com/openshift/installer/cmd/openshift-install/main.go:50 +0x259
```


What did you expect to happen?
Installer would provision IPI resources in IBM Cloud.


How to reproduce it (as minimally and precisely as possible)?
Using an IBM Cloud installer build, and install-config.yaml

$ openshift-installer create cluster ...

Anything else we need to know?

IBM Cloud will be working to provide a fix to check the `err` prior to attempting to return profiles.
https://github.com/openshift/installer/blob/f531b868b0907fb5506e5c87393057085ba048ab/pkg/asset/installconfig/ibmcloud/client.go#L289-L290

https://github.com/openshift/installer/pull/5129

Comment 1 Christopher J Schaefer 2021-08-03 16:00:33 UTC
Duplicate of https://bugzilla.redhat.com/show_bug.cgi?id=1989604

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