Bug 1953063 - Update default AWS instance type in machine-api-operator
Summary: Update default AWS instance type in machine-api-operator
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.7
Hardware: Unspecified
OS: Linux
medium
medium
Target Milestone: ---
: 4.9.0
Assignee: Alberto
QA Contact: Milind Yadav
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-23 19:40 UTC by Yaakov Selkowitz
Modified: 2021-10-18 17:30 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: When using the default value for instanceType, the Machine API creates "m4.large" instances. Consequence: New machines created with the default instance type will be different than the machines created by the OpenShift installer (m5.large). Fix: The Machine API has been updated to create m5.large instances when the default is specified. Result: New machines created with the default instance type on AWS will be "m5.large" instances.
Clone Of:
Environment:
Last Closed: 2021-10-18 17:30:14 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift machine-api-operator pull 850 0 None open Bug 1953063: Update default AWS instance types 2021-04-23 19:40:48 UTC
Red Hat Product Errata RHSA-2021:3759 0 None None None 2021-10-18 17:30:30 UTC

Description Yaakov Selkowitz 2021-04-23 19:40:24 UTC
The default AWS instance type was updated to m5 in the installer in 4.6.  The machine-api-operator default used when no instance type is specified should match.

Comment 2 Milind Yadav 2021-06-23 04:18:07 UTC
Validated on  - 
[miyadav@miyadav aws]$ oc get clusterversion
NAME      VERSION                             AVAILABLE   PROGRESSING   SINCE   STATUS
version   4.9.0-0.nightly-2021-06-22-193627   True        False         22m     Cluster version is 4.9.0-0.nightly-2021-06-22-193627
[miyadav@miyadav aws]$ 



Steps 
1.Create machineset using below yaml ( default values should be used as we do not provide instance type value) 

apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
  labels:
    machine.openshift.io/cluster-api-cluster: miyadav-aws23-xhq82
  name: miyadav-aws23-xhq82-worker-us-east-def
spec:
  replicas: 1
  selector:
    matchLabels:
      machine.openshift.io/cluster-api-cluster: miyadav-aws23-xhq82
      machine.openshift.io/cluster-api-machineset: miyadav-aws23-xhq82-worker-us-east-def
  template:
    metadata:
      labels:
        machine.openshift.io/cluster-api-cluster: miyadav-aws23-xhq82
        machine.openshift.io/cluster-api-machine-role: worker
        machine.openshift.io/cluster-api-machine-type: worker
        machine.openshift.io/cluster-api-machineset: miyadav-aws23-xhq82-worker-us-east-def
    spec:
      metadata: {}
      taints:
      - effect: "NoSchedule"
        key: "mapi"
        value: "mapi_test"
      providerSpec:
        value:
          ami:
            id: ami-0cd5c6a0f8bb3c33d
          apiVersion: awsproviderconfig.openshift.io/v1beta1
          placement:
            availabilityZone:
          subnet:
            filters:
            - name: tag:Name
              values:
              - miyadav-aws23-xhq82-private-us-east-2b
          iamInstanceProfile:
              id:

Expected and Actual :
Machineset created successfully 

Step 2:
Check the instance type in the new provisioned machine 

Expected and Actual :
.
.
.
spec:
  metadata: {}
  providerID: aws:///us-east-2b/i-0d22b65512125e8e3
  providerSpec:
    value:
      ami:
        id: ami-0cd5c6a0f8bb3c33d
      apiVersion: awsproviderconfig.openshift.io/v1beta1
      credentialsSecret:
        name: aws-cloud-credentials
      deviceIndex: 0
      iamInstanceProfile: {}
      instanceType: m5.large
      metadata:
        creationTimestamp: null
      placement:
        region: us-east-2
      subnet:
        filters:
        - name: tag:Name
          values:
          - miyadav-aws23-xhq82-private-us-east-2b
      userDataSecret:
        name: worker-user-data
  taints:
  - effect: NoSchedule
    key: mapi
    value: mapi_test
.
.
.


Additional info

Moved to VERIFIED based on results

Comment 3 Milind Yadav 2021-06-23 05:26:56 UTC
For future refeence - Refer this yaml for creating machineset instead of one in the comment above
apiVersion: machine.openshift.io/v1beta1
kind: MachineSet
metadata:
  labels:
    machine.openshift.io/cluster-api-cluster: miyadav-aws23-xhq82
  name: miyadav-aws23-xhq82-worker-us-east-def
spec:
  replicas: 1
  selector:
    matchLabels:
      machine.openshift.io/cluster-api-cluster: miyadav-aws23-xhq82
      machine.openshift.io/cluster-api-machineset: miyadav-aws23-xhq82-worker-us-east-def
  template:
    metadata:
      labels:
        machine.openshift.io/cluster-api-cluster: miyadav-aws23-xhq82
        machine.openshift.io/cluster-api-machine-role: worker
        machine.openshift.io/cluster-api-machine-type: worker
        machine.openshift.io/cluster-api-machineset: miyadav-aws23-xhq82-worker-us-east-def
    spec:
      metadata: {}
      providerSpec:
        value:
          ami:
            id: ami-0cd5c6a0f8bb3c33d
          apiVersion: awsproviderconfig.openshift.io/v1beta1
          placement:
            availabilityZone: us-east-2b
          subnet:
            filters:
            - name: tag:Name
              values:
              - miyadav-aws23-xhq82-private-us-east-2b
          tags:
          - name: kubernetes.io/cluster/miyadav-aws23-xhq82
            value: owned
          iamInstanceProfile:
              id: miyadav-aws23-xhq82-worker-profile

Comment 6 errata-xmlrpc 2021-10-18 17:30:14 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.9.0 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:3759


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