Bug 1889416

Summary: Installer complains about not enough vcpu for the baremetal flavor where generic bm flavor is being used
Product: OpenShift Container Platform Reporter: OpenShift BugZilla Robot <openshift-bugzilla-robot>
Component: InstallerAssignee: Pierre Prinetti <pprinett>
Installer sub component: OpenShift on OpenStack QA Contact: weiwei jiang <wjiang>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: high CC: eduen, m.andre, pprinett, wjiang, xtian
Version: 4.6   
Target Milestone: ---   
Target Release: 4.6.z   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Feature: Skip flavor validation for baremetal flavors Reason: Sometimes, OpenStack administrators do not set the appropriate metadata on their baremetal flavors. The Installer pre-flight validation, which is performed on the flavor metadata, might then prevent the installation whereas the actual BM would have all the required capacity. Result: With this patch, validations are skipped on flavors detected as "baremetal".
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-01-18 17:58:27 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1878900    
Bug Blocks:    

Comment 1 Pierre Prinetti 2020-10-19 15:55:29 UTC
*** Bug 1889270 has been marked as a duplicate of this bug. ***

Comment 3 Pierre Prinetti 2020-10-30 09:35:07 UTC
Setting as blocker- because Ironic support is in preview, and there is a workaround (in the likely case that the OCP admin is also OSP admin).

Comment 5 Pierre Prinetti 2020-12-09 10:19:22 UTC
The fix was merged before the release-4.6 was cut from master; this just needs verification.

Comment 8 weiwei jiang 2020-12-28 02:57:49 UTC
Checked with OpenShift Installer 4.6.0-0.nightly-2020-12-21-110104 and it works well now.

[root@openshift-qe-001 ~]# openstack flavor show baremetal
+----------------------------+----------------------------------------------------------------------------------------------------------------------+
| Field                      | Value                                                                                                                |
+----------------------------+----------------------------------------------------------------------------------------------------------------------+                                                                                                                           
| OS-FLV-DISABLED:disabled   | False                                                                                                                |                                                                                                                           
| OS-FLV-EXT-DATA:ephemeral  | 0                                                                                                                    |                                                                                                                           
| access_project_ids         | None                                                                                                                 |                                                                                                                           
| disk                       | 39                                                                                                                   |                                                                                                                           
| id                         | e7f810f7-31c5-42ee-b486-b166f5208090                                                                                 |                                                                                                                           
| name                       | baremetal                                                                                                            |                                                                                                                           
| os-flavor-access:is_public | True                                                                                                                 |                                                                                                                           
| properties                 | baremetal='true', resources:CUSTOM_BAREMETAL='1', resources:DISK_GB='0', resources:MEMORY_MB='0', resources:VCPU='0' |                                                                                                                           
| ram                        | 4096                                                                                                                 |                                                                                                                           
| rxtx_factor                | 1.0                                                                                                                  |                                                                                                                           
| swap                       |                                                                                                                      |                                                                                                                           
| vcpus                      | 2                                                                                                                    |                                                                                                                           
+----------------------------+----------------------------------------------------------------------------------------------------------------------+ 


# cat install-config.yaml                                                                            
apiVersion: v1                                                                                                                          
baseDomain: 10.0.103.130.nip.io                                     
compute:                                                                                                                                
- architecture: amd64                                      
  hyperthreading: Enabled                           
  name: worker                                      
  platform:                                         
    openstack:                                     
      type: baremetal                              
  replicas: 2                                      
controlPlane:                                      
  architecture: amd64                                   
  hyperthreading: Enabled                          
  name: master                                                                                                                          
  platform:                                                                                                                             
    openstack:                                                     
      type: baremetal                                            
  replicas: 3                                         
metadata:                                                       
  name: wj45ios1019a                                           
networking:                                        
  clusterNetwork:                                               
  - cidr: 10.128.0.0/14                                           
    hostPrefix: 23                                                                                                                      
  machineNetwork:                                  
  - cidr: 192.168.0.0/18                                       
  networkType: OpenShiftSDN                            
  serviceNetwork:                                                                                                                       
  - 172.30.0.0/16                                                                                                                       
platform:                                                                                                                               
  openstack:                                         
    cloud: shiftstack                                              
    externalNetwork: nova                                     
    computeFlavor: baremetal                                                                                                            
publish: External                                  
pullSecret: 'HIDDEN'

# ./openshift-install-4.6 create manifests --dir .                                                                                                                                                                                           
INFO Credentials loaded from file "/etc/openstack/clouds.yaml"                                                                                                                                                                                                                  
INFO Consuming Install Config from target directory                                                                                                                                                                                                                             
INFO Manifests created in: manifests and openshift

Comment 11 errata-xmlrpc 2021-01-18 17:58:27 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.6.12 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:0037