Bug 1831577 - New AWS accounts cannot create Spot Instances
Summary: New AWS accounts cannot create Spot Instances
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: Cloud Compute
Version: 4.5
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: 4.5.0
Assignee: Joel Speed
QA Contact: sunzhaohua
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-05-05 10:32 UTC by Joel Speed
Modified: 2020-07-13 17:35 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
If this bug requires documentation, please select an appropriate Doc Type value.
Clone Of:
Environment:
Last Closed: 2020-07-13 17:35:00 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github openshift machine-api-operator pull 580 0 None closed BUG 1831577: Allow Machine API to create Service Linked Role for Spot instances 2021-02-05 01:02:40 UTC
Red Hat Product Errata RHBA-2020:2409 0 None None None 2020-07-13 17:35:20 UTC

Description Joel Speed 2020-05-05 10:32:24 UTC
Description of problem:

If an OCP cluster attempts to create a Spot instance on AWS, which has not already had a spot instance launched in it, then it will fail with the following error:

```
Error launching instance: AuthFailure.ServiceLinkedRoleCreationNotPermitted: The provided credentials do not have permission to create the service-linked role for EC2 Spot Instances.
```

Version-Release number of selected component (if applicable): 4.5


How reproducible:
Easily given a new AWS account can be created

Alternatively I believe deleting the service linked role would recreate this issue (AWSServiceRoleForEC2Spot)


Steps to Reproduce:
1. Create a brand new AWS account
2. Install an OCP 4.5 cluster
3. Attempt to create a spot instance

Actual results:

Machine controller logs error when attempting to create the spot instances

Expected results:

Spot instances are created without issue

Additional info:

Comment 3 sunzhaohua 2020-05-12 10:36:20 UTC
Verified

clusterversion: 4.5.0-0.nightly-2020-05-10-231314 

$ oc edit CredentialsRequest -n openshift-cloud-credential-operator openshift-machine-api-aws    statementEntries:
    - action:
      - iam:CreateServiceLinkedRole

I don't have a new aws account, but create spot instance, didn't met this error. Move it to verified, if meet this problem again, will reopen it.

Comment 4 errata-xmlrpc 2020-07-13 17:35:00 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


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