Skip to content

Conversation

@wking
Copy link
Member

@wking wking commented Aug 14, 2019

This PR cherry-picks #1935 back to release-4.1. It's not a clean cherry-pick, because we decided to not backport the ap-east-1 addition from #1755 to 4.1.z.

…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)

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
@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 Aug 14, 2019
@openshift-ci-robot
Copy link
Contributor

@wking: 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 Aug 14, 2019
@abhinavdahiya
Copy link
Contributor

/lgtm

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

[APPROVALNOTIFIER] This PR is APPROVED

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

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:
  • OWNERS [abhinavdahiya,wking]

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

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

1 similar comment
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@eparis eparis added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Aug 20, 2019
@openshift-merge-robot openshift-merge-robot merged commit adb76eb into openshift:release-4.1 Aug 20, 2019
@openshift-ci-robot
Copy link
Contributor

@wking: All pull requests linked via external trackers have merged. Bugzilla bug 1725524 has been moved to the MODIFIED state.

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.

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. cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. 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