Bug 1931814 - [OSP] Openshift-install panic when computeFlavor is not present
Summary: [OSP] Openshift-install panic when computeFlavor is not present
Keywords:
Status: CLOSED DUPLICATE of bug 1903055
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Installer
Version: 4.6
Hardware: Unspecified
OS: Unspecified
medium
medium
Target Milestone: ---
: 4.6.z
Assignee: Eric Duen
QA Contact: weiwei jiang
URL:
Whiteboard:
: 1917758 (view as bug list)
Depends On: 1903035
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-02-23 10:26 UTC by Pierre Prinetti
Modified: 2021-03-17 16:33 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1903035
Environment:
Last Closed: 2021-03-17 16:33:43 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Pierre Prinetti 2021-02-23 10:26:45 UTC
Also reported on Github: https://github.com/openshift/installer/issues/4333#issuecomment-784050177

+++ This bug was initially created as a clone of Bug #1903035 +++

Version:
$ ./openshift-install-4.6 version
./openshift-install-4.6 4.6.0-0.nightly-2020-11-29-153115
built from commit db0f93089a64c5fd459d226fc224a2584e8cfb7e
release image registry.svc.ci.openshift.org/ocp/release@sha256:50789c4b04fe7ef2b956ad9c3d410b911477824e364fd1266085e8674eb38f17

Platform:
OSP

Please specify:
Both IPI and UPI

What happened?
$ ./openshift-install-4.6 create manifests --dir .
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x2208ab0]

goroutine 1 [running]:
github.com/openshift/installer/pkg/asset/installconfig/openstack/validation.validatePlatformFlavor(0xc000210460, 0xc000350190, 0xc000fa0030, 0x0, 0x0, 0x0)
        /go/src/github.com/openshift/installer/pkg/asset/installconfig/openstack/validation/platform.go:83 +0xb0
github.com/openshift/installer/pkg/asset/installconfig/openstack/validation.ValidatePlatform(0xc000210460, 0xc000732ab0, 0xc000350190, 0x0, 0x0, 0x0)
        /go/src/github.com/openshift/installer/pkg/asset/installconfig/openstack/validation/platform.go:25 +0x1ed
github.com/openshift/installer/pkg/asset/installconfig/openstack.Validate(0xc000776000, 0x0, 0x0)
        /go/src/github.com/openshift/installer/pkg/asset/installconfig/openstack/validate.go:19 +0x8e
github.com/openshift/installer/pkg/asset/installconfig.(*InstallConfig).platformValidation(0xc00059a540, 0x0, 0x0)
        /go/src/github.com/openshift/installer/pkg/asset/installconfig/installconfig.go:188 +0x87
github.com/openshift/installer/pkg/asset/installconfig.(*InstallConfig).finish(0xc00059a540, 0xd4f01d7, 0x13, 0x19c1, 0xd216b00)
        /go/src/github.com/openshift/installer/pkg/asset/installconfig/installconfig.go:148 +0x234
github.com/openshift/installer/pkg/asset/installconfig.(*InstallConfig).Load(0xc00059a540, 0xe7c9880, 0xc000598d60, 0xe8be340, 0xc00059a540, 0xc00059a540)
        /go/src/github.com/openshift/installer/pkg/asset/installconfig/installconfig.go:125 +0x1f0
github.com/openshift/installer/pkg/asset/store.(*storeImpl).load(0xc000692b70, 0xe7f3fc0, 0xc00059a100, 0xc0005543fc, 0x4, 0xc0005543fc, 0x4, 0x0)
        /go/src/github.com/openshift/installer/pkg/asset/store/store.go:264 +0x455
github.com/openshift/installer/pkg/asset/store.(*storeImpl).load(0xc000692b70, 0xe7f3f80, 0xc00059a040, 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(0xc000692b70, 0xe7f4300, 0x154c3520, 0x0, 0x0, 0x2, 0x2, 0xe740f00)
        /go/src/github.com/openshift/installer/pkg/asset/store/store.go:247 +0x2d7
github.com/openshift/installer/pkg/asset/store.(*storeImpl).fetch(0xc000692b70, 0xe7f4300, 0x154c3520, 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(0xc000692b70, 0xe7f4300, 0x154c3520, 0x1547f8e0, 0x4, 0x4, 0x1200000000000000, 0xed757e32a)
        /go/src/github.com/openshift/installer/pkg/asset/store/store.go:77 +0x4b
main.runTargetCmd.func1(0x7ffdf69dedc4, 0x1, 0xc0003222a0, 0xc000692990)
        /go/src/github.com/openshift/installer/cmd/openshift-install/create.go:172 +0x135
main.runTargetCmd.func2(0x1548b2a0, 0xc00061dfe0, 0x0, 0x2)
        /go/src/github.com/openshift/installer/cmd/openshift-install/create.go:199 +0xb5
github.com/spf13/cobra.(*Command).execute(0x1548b2a0, 0xc00061df80, 0x2, 0x2, 0x1548b2a0, 0xc00061df80)
        /go/src/github.com/openshift/installer/vendor/github.com/spf13/cobra/command.go:844 +0x2c2
github.com/spf13/cobra.(*Command).ExecuteC(0xc0000fe2c0, 0xc000c09e58, 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?

1. create manifests with install-config.yaml which platform.openstack.computeFlavor is not present like 
...
platform:
  openstack:
    cloud: upshift
    externalNetwork: provider_net_cci_8
    octaviaSupport: '0'
    region: regionOne
    trunkSupport: '1'
...


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

$ ./openshift-install-4.6 create manifests --dir .

Anything else we need to know?
4.7 do not met this issue.
$ ./openshift-install-4.7 version
./openshift-install-4.7 4.7.0-0.nightly-2020-11-29-133728
built from commit 64ec239bc596635b50dd82485c9932cdf10c861e
release image registry.svc.ci.openshift.org/ocp/release@sha256:d851f13cc12933e303a932ba100ea6737e62d619049e16e9ba830d46f90fd3e3
$ ./openshift-install-4.7 create manifests --dir . 
INFO Credentials loaded from file "/home/wjiang/osp_remover/46123/clouds.yaml" 
INFO Consuming Install Config from target directory 
INFO Manifests created in: manifests and openshift

--- Additional comment from weiwei jiang on 2020-12-01 08:38:00 UTC ---

Should be dup with https://bugzilla.redhat.com/show_bug.cgi?id=1894678

--- Additional comment from Pierre Prinetti on 2020-12-03 09:16:30 UTC ---

This looks legit.

This issue will disappear from 4.7 when we deprecate `computeFlavor`[1].

We still want to fix in 4.6.

[1]: https://github.com/openshift/installer/pull/4321

--- Additional comment from Martin André on 2020-12-17 09:18:16 UTC ---

computeFlavor is no longer used in the installer after https://github.com/openshift/installer/pull/4321.

Comment 1 Pierre Prinetti 2021-02-23 10:28:37 UTC
*** Bug 1917758 has been marked as a duplicate of this bug. ***

Comment 3 Mike Fedosin 2021-03-17 16:33:43 UTC

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


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