Bug 1948563
Summary: | End-to-End Secure boot deployment fails "Invalid value for input variable" | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Lubov <lshilin> | ||||||
Component: | Installer | Assignee: | Iury Gregory Melo Ferreira <imelofer> | ||||||
Installer sub component: | OpenShift on Bare Metal IPI | QA Contact: | Lubov <lshilin> | ||||||
Status: | CLOSED ERRATA | Docs Contact: | |||||||
Severity: | high | ||||||||
Priority: | high | CC: | bnemec, janders, rbartal, stbenjam, tsedovic | ||||||
Version: | 4.8 | Keywords: | Triaged | ||||||
Target Milestone: | --- | ||||||||
Target Release: | 4.8.0 | ||||||||
Hardware: | Unspecified | ||||||||
OS: | Unspecified | ||||||||
Whiteboard: | |||||||||
Fixed In Version: | Doc Type: | No Doc Update | |||||||
Doc Text: | Story Points: | --- | |||||||
Clone Of: | Environment: | ||||||||
Last Closed: | 2021-07-27 22:59:25 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: | |||||||||
Attachments: |
|
Description
Lubov
2021-04-12 12:59:30 UTC
Created attachment 1771345 [details]
install-config.yaml
Not sure why our team was assigned to it, this is a bug in the installer: node.instance_info is not a map[string]string, it's a map[string]interface{}. Please let me know how I can fix that (I'm not familiar with Terraform at all). After a few investigations I think the problem is not the way installer regarding the type of instance_info (it's already map[string]interface{}), the problem is that terraform expects the elements to be a string (based on image_checksum and image_source), I see the following options: 1- installer will transform capabilities in a string "key1:value1,key2:value2" (or other format), terraform won't complain about the format and we would need to transform in terraform the capabilities back to json to be sent to ironic. https://github.com/openshift/installer/blob/6d778f911e79afad8ba2ff4301eda5b5cf4d8e9e/pkg/tfvars/baremetal/baremetal.go#L142-L144 2- update the instance_info schema in terraform https://github.com/openshift-metal3/terraform-provider-ironic/blob/5b0c62f3d975469a8878d4e79479a25b67ee6c6e/ironic/resource_ironic_deployment.go#L37-L41 I have the feeling that the option#2 would be a breaking change in the terraform. Another approach could be: 3- have a specific field in the host definition for the capabilities we need to set in instance_info (but I think this would require more effort in different projects - BMO / terraform / installer) When we wrote all this it targetted 0.11 of terraform, supposedly things are much approved in 0.12: https://www.hashicorp.com/blog/terraform-0-12-rich-value-types You might consider changing this https://github.com/openshift/installer/blob/6d778f911e79afad8ba2ff4301eda5b5cf4d8e9e/data/data/baremetal/masters/variables.tf#L32-L35 to something like this: variable "instance_infos" { type = list(map(object({ image_source = string image_checksum = string capabilities = map(string) }))) } Terraform PR is up, after it merges I will update the installer with the new version. verified on 4.8.0-0.nightly-2021-05-10-225140 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 |