Skip to content

Conversation

@abhinavdahiya
Copy link
Contributor

AWS allows m4 class for reserved instances in all AZs for ap-northeast-2

aws --region ap-northeast-2 ec2 describe-reserved-instances-offerings --instance-tenancy default --instance-type m4.large --product-description 'Linux/UNIX' --filters Name=scope,Values='Availability Zone' | jq -r '[.ReservedInstancesOfferings[].AvailabilityZone] | sort | unique[]'
ap-northeast-2a
ap-northeast-2b
ap-northeast-2c

But the on-demand instances in ap-norteast-2b was failing with error

Unsupported: Your requested instance type (m4.xlarge) is not supported in your requested Availability Zone (ap-northeast-2b). Please retry your request by not specifying an Availability Zone or choosing ap-northeast-2a, ap-northeast-2c.

So moving to m5 class for ap-northeast-2 should allow creating control plane instances in all Zones. (the default configuration)

/cc @openshift/openshift-team-installer @eparis

…nstance class

multiple reserved instance classes can use used to satisfy the test, and sometimes less preferred instance class might need to be chosen
when AWS allows higher priority in reserved and not in on-demand EC2 instances.

```console
go test ./platformtests/... -v
=== RUN   TestGetDefaultInstanceClass
=== RUN   TestGetDefaultInstanceClass/Asia_Pacific_(Tokyo)
=== RUN   TestGetDefaultInstanceClass/EU_(Paris)
=== RUN   TestGetDefaultInstanceClass/Asia_Pacific_(Sydney)
=== RUN   TestGetDefaultInstanceClass/US_East_(Ohio)
=== RUN   TestGetDefaultInstanceClass/EU_(Stockholm)
=== RUN   TestGetDefaultInstanceClass/EU_(London)
=== RUN   TestGetDefaultInstanceClass/Asia_Pacific_(Osaka-Local)
=== RUN   TestGetDefaultInstanceClass/EU_(Frankfurt)
=== RUN   TestGetDefaultInstanceClass/Asia_Pacific_(Seoul)
=== RUN   TestGetDefaultInstanceClass/US_West_(N._California)
=== RUN   TestGetDefaultInstanceClass/Canada_(Central)
=== RUN   TestGetDefaultInstanceClass/US_West_(Oregon)
=== RUN   TestGetDefaultInstanceClass/Asia_Pacific_(Mumbai)
=== RUN   TestGetDefaultInstanceClass/South_America_(Sao_Paulo)
=== RUN   TestGetDefaultInstanceClass/Asia_Pacific_(Singapore)
=== RUN   TestGetDefaultInstanceClass/US_East_(N._Virginia)
=== RUN   TestGetDefaultInstanceClass/AWS_GovCloud_(US)
=== RUN   TestGetDefaultInstanceClass/Asia_Pacific_(Hong_Kong)
=== RUN   TestGetDefaultInstanceClass/AWS_GovCloud_(US-East)
=== RUN   TestGetDefaultInstanceClass/EU_(Ireland)
--- PASS: TestGetDefaultInstanceClass (71.20s)
    --- PASS: TestGetDefaultInstanceClass/Asia_Pacific_(Tokyo) (2.75s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m4:map[ap-northeast-1a:{} ap-northeast-1c:{} ap-northeast-1d:{}] m5:map[ap-northeast-1a:{} ap-northeast-1c:{}
    --- PASS: TestGetDefaultInstanceClass/EU_(Paris) (1.44s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:136: skip the unpriced m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m5:map[eu-west-3a:{} eu-west-3b:{} eu-west-3c:{}]]
    --- PASS: TestGetDefaultInstanceClass/Asia_Pacific_(Sydney) (2.79s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m4:map[ap-southeast-2a:{} ap-southeast-2b:{} ap-southeast-2c:{}] m5:map[ap-southeast-2a:{} ap-southeast-2c:{}]
    --- PASS: TestGetDefaultInstanceClass/US_East_(Ohio) (1.35s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m4:map[us-east-2a:{} us-east-2b:{} us-east-2c:{}] m5:map[us-east-2a:{} us-east-2b:{} us-east-2c:{}]]
    --- PASS: TestGetDefaultInstanceClass/EU_(Stockholm) (1.86s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:136: skip the unpriced m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m5:map[eu-north-1a:{} eu-north-1b:{} eu-north-1c:{}]]
    --- PASS: TestGetDefaultInstanceClass/EU_(London) (2.23s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m4:map[eu-west-2a:{} eu-west-2b:{} eu-west-2c:{}] m5:map[eu-west-2a:{} eu-west-2b:{} eu-west-2c:{}]]
    --- PASS: TestGetDefaultInstanceClass/Asia_Pacific_(Osaka-Local) (0.70s)
        default_instance_class_test.go:106: no direct access to region, assuming full support: OptInRequired: You are not subscribed to this service. Please g
                status code: 401, request id: 94786b2a-85c2-4b83-a928-a5b2a72d803b
        default_instance_class_test.go:120: map[m3:{} m4:{} m5:{} m5d:{} t2:{} t3:{}]
    --- PASS: TestGetDefaultInstanceClass/EU_(Frankfurt) (2.08s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m4:map[eu-central-1a:{} eu-central-1b:{} eu-central-1c:{}] m5:map[eu-central-1a:{} eu-central-1b:{} eu-central
    --- PASS: TestGetDefaultInstanceClass/Asia_Pacific_(Seoul) (2.14s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m4:map[ap-northeast-2a:{} ap-northeast-2b:{} ap-northeast-2c:{}] m5:map[ap-northeast-2a:{} ap-northeast-2b:{}
    --- PASS: TestGetDefaultInstanceClass/US_West_(N._California) (0.88s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m4:map[us-west-1a:{} us-west-1b:{}] m5:map[us-west-1a:{} us-west-1b:{}]]
    --- PASS: TestGetDefaultInstanceClass/Canada_(Central) (1.48s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m4:map[ca-central-1a:{} ca-central-1b:{}] m5:map[ca-central-1a:{} ca-central-1b:{}]]
    --- PASS: TestGetDefaultInstanceClass/US_West_(Oregon) (1.29s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m4:map[us-west-2a:{} us-west-2b:{} us-west-2c:{}] m5:map[us-west-2a:{} us-west-2b:{} us-west-2c:{} us-west-2d:
    --- PASS: TestGetDefaultInstanceClass/Asia_Pacific_(Mumbai) (3.44s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m4:map[ap-south-1a:{} ap-south-1b:{} ap-south-1c:{}] m5:map[ap-south-1a:{} ap-south-1b:{} ap-south-1c:{}]]
    --- PASS: TestGetDefaultInstanceClass/South_America_(Sao_Paulo) (2.60s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m4:map[sa-east-1a:{} sa-east-1c:{}] m5:map[sa-east-1a:{} sa-east-1c:{}]]
    --- PASS: TestGetDefaultInstanceClass/Asia_Pacific_(Singapore) (2.32s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m4:map[ap-southeast-1a:{} ap-southeast-1b:{} ap-southeast-1c:{}] m5:map[ap-southeast-1a:{} ap-southeast-1b:{}
    --- PASS: TestGetDefaultInstanceClass/US_East_(N._Virginia) (1.58s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m4:map[us-east-1a:{} us-east-1b:{} us-east-1c:{} us-east-1d:{} us-east-1e:{} us-east-1f:{}] m5:map[us-east-1a:
    --- PASS: TestGetDefaultInstanceClass/AWS_GovCloud_(US) (0.17s)
        default_instance_class_test.go:106: no direct access to region, assuming full support: AuthFailure: AWS was not able to validate the provided access c
                status code: 401, request id: 510b245a-0d50-438d-894f-4ec2ea6c8dcc
        default_instance_class_test.go:120: map[m1:{} m3:{} m4:{} m5:{} m5d:{} t2:{} t3:{}]
    --- PASS: TestGetDefaultInstanceClass/Asia_Pacific_(Hong_Kong) (0.84s)
        default_instance_class_test.go:106: no direct access to region, assuming full support: AuthFailure: AWS was not able to validate the provided access c
                status code: 401, request id: 90b6acb2-779c-4c1e-a270-1ee530180090
        default_instance_class_test.go:120: map[m5:{} m5d:{} t3:{}]
    --- PASS: TestGetDefaultInstanceClass/AWS_GovCloud_(US-East) (0.35s)
        default_instance_class_test.go:106: no direct access to region, assuming full support: AuthFailure: AWS was not able to validate the provided access c
                status code: 401, request id: f85d4b7f-632f-4bf4-a167-0b0611d841b3
        default_instance_class_test.go:120: map[m5:{} m5d:{} t3:{}]
    --- PASS: TestGetDefaultInstanceClass/EU_(Ireland) (2.02s)
        default_instance_class_test.go:134: m4
        default_instance_class_test.go:134: m5
        default_instance_class_test.go:176: map[m4:map[eu-west-1a:{} eu-west-1b:{} eu-west-1c:{}] m5:map[eu-west-1a:{} eu-west-1b:{} eu-west-1c:{}]]
PASS
ok      github.com/openshift/installer/platformtests/aws        71.212s
```
AWS allows m4 class for reserved instances in all AZs for ap-northeast-2

```console
aws --region ap-northeast-2 ec2 describe-reserved-instances-offerings --instance-tenancy default --instance-type m4.large --product-description 'Linux/UNIX' --filters Name=scope,Values='Availability Zone' | jq -r '[.ReservedInstancesOfferings[].AvailabilityZone] | sort | unique[]'
ap-northeast-2a
ap-northeast-2b
ap-northeast-2c
```

But the on-demand instances in ap-norteast-2b was failing with error
```
Unsupported: Your requested instance type (m4.xlarge) is not supported in your requested Availability Zone (ap-northeast-2b). Please retry your request by not specifying an Availability Zone or choosing ap-northeast-2a, ap-northeast-2c.
```

So moving to m5 class for ap-northeast-2 should allow creating control plane instances in all Zones. (the default configuration)
@openshift-ci-robot openshift-ci-robot requested review from a team and eparis July 2, 2019 17:45
@openshift-ci-robot openshift-ci-robot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Jul 2, 2019
@openshift-ci-robot
Copy link
Contributor

@abhinavdahiya: This pull request references a valid Bugzilla bug. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

Details

In response to this:

Bug 1725524: types/aws/default: move ap-northeast-2 to m5 instance class

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jul 2, 2019
@abhinavdahiya
Copy link
Contributor Author

/hold
testing locally

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 2, 2019
@abhinavdahiya
Copy link
Contributor Author

/hold cancel

Using the install-config

apiVersion: v1
baseDomain: devcluster.openshift.com
controlPlane:
  name: master
  replicas: 3
compute:
- name: worker
  replicas: 3
metadata:
  name: adahiya-1
platform:
  aws:
    region: ap-northeast-2
...
./bin/openshift-install --dir dev create cluster
INFO Consuming "Install Config" from target directory
INFO Creating infrastructure resources...
INFO Waiting up to 30m0s for the Kubernetes API at https://api.adahiya-1.devcluster.openshift.com:6443...
...

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Jul 2, 2019
@eparis
Copy link
Member

eparis commented Jul 2, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 2, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: abhinavdahiya, eparis

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot
Copy link
Contributor

@abhinavdahiya: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-aws-scaleup-rhel7 3085753 link /test e2e-aws-scaleup-rhel7

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@openshift-merge-robot openshift-merge-robot merged commit 11d12af into openshift:master Jul 2, 2019
@abhinavdahiya abhinavdahiya deleted the bz-1725524 branch July 10, 2019 22:19
@wking
Copy link
Member

wking commented Jul 26, 2019

Are we backporting this to 4.1 (e.g. see #1787 backporting #1786)?


t.Log(available)
assert.Equal(t, defaults.InstanceClass(region), match)
assert.Contains(t, allowed, defaults.InstanceClass(region))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With this change we no longer warn when our default does not match the calculated preferred class. That's appropriate for ap-northeast-2, but if, for example, one of the other regions happened to gain full support for m4, we'd want to switch our default back to m4 and wouldn't have the tests suggesting that change. It's probably not a big deal as long as we prefer the older version, but when we start preferring m5 over m4 it will become more important for us to track the m5 rollout across AWS regions.

@wking
Copy link
Member

wking commented Jul 26, 2019

/cherrypick release-4.1

rbhz#1725524 was redirected to target 4.1.z, so we do need a backport.

@openshift-cherrypick-robot

@wking: #1935 failed to apply on top of branch "release-4.1":

Applying: Bug 1725524: types/aws/default: move ap-northeast-2 to m5 instance class
error: Failed to merge in the changes.
Using index info to reconstruct a base tree...
M	pkg/types/aws/defaults/platform.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/types/aws/defaults/platform.go
CONFLICT (content): Merge conflict in pkg/types/aws/defaults/platform.go
Patch failed at 0002 Bug 1725524: types/aws/default: move ap-northeast-2 to m5 instance class

Details

In response to this:

/cherrypick release-4.1

rbhz#1725524 was redirected to target 4.1.z, so we do need a backport.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

wking pushed a commit to wking/openshift-installer that referenced this pull request Aug 14, 2019
AWS allows m4 class for reserved instances in all AZs for ap-northeast-2

```console
aws --region ap-northeast-2 ec2 describe-reserved-instances-offerings --instance-tenancy default --instance-type m4.large --product-description 'Linux/UNIX' --filters Name=scope,Values='Availability Zone' | jq -r '[.ReservedInstancesOfferings[].AvailabilityZone] | sort | unique[]'
ap-northeast-2a
ap-northeast-2b
ap-northeast-2c
```

But the on-demand instances in ap-norteast-2b was failing with error
```
Unsupported: Your requested instance type (m4.xlarge) is not supported in your requested Availability Zone (ap-northeast-2b). Please retry your request by not specifying an Availability Zone or choosing ap-northeast-2a, ap-northeast-2c.
```

So moving to m5 class for ap-northeast-2 should allow creating control plane instances in all Zones. (the default configuration)

This commit cherry-picks 3085753 (Bug 1725524: types/aws/default:
move ap-northeast-2 to m5 instance class, 2019-07-02, openshift#1935).  It's
not a clean cherry-pick, because we decided to not backport the
ap-east-1 addition from cdd6689 (pkg/types/aws/defaults/platform:
Default to m5 in ap-east-1, 2019-05-16, openshift#1755) to 4.1.z [1].

[1]: https://bugzilla.redhat.com/show_bug.cgi?id=1734136#c4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. lgtm Indicates that a PR is ready to be merged. size/S Denotes a PR that changes 10-29 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants