Bug 1836337

Summary: Azure: cannot set disktype for machines
Product: OpenShift Container Platform Reporter: Abhinav Dahiya <adahiya>
Component: InstallerAssignee: Aditya Narayanaswamy <anarayan>
Installer sub component: openshift-installer QA Contact: Etienne Simard <esimard>
Status: CLOSED ERRATA Docs Contact:
Severity: medium    
Priority: high CC: alchan, anarayan
Version: 4.5Flags: esimard: needinfo-
Target Milestone: ---   
Target Release: 4.5.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Until now, a default value was set for the disk types in Azure. Made the changes to add an extra field in the install config to pick up the disk type required and provided that information to terraform for it to create the required disk type.
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-07-13 17:39:24 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 Abhinav Dahiya 2020-05-15 16:19:04 UTC
Description of problem:


For Azure, currently the installer does not allow users to set the disktype for machines. this is esp problematic for control-plane where the users might want to set a different one for performance.

Comment 3 Etienne Simard 2020-05-20 23:57:19 UTC
Since this is a feature and not a bug, I would like to know if just setting a custom Disk Type is enough for this current validation?

I noticed that we have an Epic for this, but it was not in scope for 4.5 so we did not plan for it yet and will need to create a more thorough test scenario.

Comment 4 Etienne Simard 2020-05-21 21:15:02 UTC
Verified basic functionality with:

./openshift-install 4.5.0-0.nightly-2020-05-20-211028
built from commit 64529d5dcd02bfc2cb279397850dd32c89799883
release image registry.svc.ci.openshift.org/ocp/release@sha256:51f9e8bf240348a0277157758cb95097f5c86e58732b115b5018207e76916eb7


1) Verified that a supported value (Standard_LRS) worker disk type configuration works (Installation succeeded with proper disk type configured):

~~~
compute:
- architecture: amd64
  hyperthreading: Enabled
  name: worker
  platform:
    azure:
      type: Standard_DS4_v2
      osDisk:
        diskSizeGB: 512
        diskType: Standard_LRS
  replicas: 3
~~~

2) Verified that an incompatible value (Standard_LRS) controlPlane disk type configuration fails with the proper error message:

~~~
FATAL failed to fetch Metadata: failed to load asset "Install Config": invalid "install-config.yaml" file: controlPlane.platform.azure.diskType: Invalid value: "Standard_LRS": Standard_LRS not compatible with control planes. 
~~~

3) Verified that an unsupported value for diskType also fails with a proper error message:

~~~
FATAL failed to fetch Metadata: failed to load asset "Install Config": invalid "install-config.yaml" file: controlPlane.platform.azure.diskType: Unsupported value: "Standard_LEET": supported values: "Premium_LRS", "StandardSSD_LRS", "Standard_LRS"
~~~

4) Verified that defaultMachinePlatform works with a supported value (StandardSSD_LRS)

~~~
platform:
  azure:
    baseDomainResourceGroupName: os4-common
    region: centralus
    defaultMachinePlatform:
      osDisk:
        diskType: StandardSSD_LRS
~~~

5) Verified that configuring a diskType value under platform will override a defaultMachinePlatform configuration

6) Verified that an incompatible value (Standard_LRS) defaultMachinePlatform disk type configuration fails with the proper error message:

~~~
FATAL failed to fetch Metadata: failed to load asset "Install Config": invalid "install-config.yaml" file: platform.azure.defaultMachinePlatform.diskType: Unsupported value: "Standard_LRS": supported values: "Premium_LRS", "StandardSSD_LRS" 
~~~

7) Verified that an unsupported value for diskType under defaultMachinePlatform also fails with a proper error message:
~~~
FATAL failed to fetch Metadata: failed to load asset "Install Config": invalid "install-config.yaml" file: [platform.azure.defaultMachinePlatform.diskType: Unsupported value: "Standard_LEET": supported values: "Premium_LRS", "StandardSSD_LRS", "Standard_LRS", platform.azure.defaultMachinePlatform.diskType: Unsupported value: "Standard_LEET": supported values: "Premium_LRS", "StandardSSD_LRS"] 
~~~

Comment 5 errata-xmlrpc 2020-07-13 17:39:24 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, 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/RHBA-2020:2409