ROSA Cluster Upgrade Command Fails Due To AWS Role Mismatch

Solution Verified - Updated -

Environment

  • ROSA cli < v1.1.11
  • Red Hat OpenShift Service on AWS (ROSA) 4.8+
  • AWS security token service (STS)

Issue

The cluster was created with an old version of the rosa-cli command and trying to upgrade the cluster with the latest rosa-cli version fails with the following output:

$ rosa upgrade cluster -c CLUSTERNAME
? Version: 4.9.xx
I: Ensuring account and operator role policies for cluster 'CLUSTERNAME' are compatible with upgrade.
E: Roles with the prefix 'MY-PREFIX not found

Resolution

  1. Run the command below to create all necessary roles and policies required by the rosa upgrade command:
$ rosa create account-roles

If the command above fails, the roles will need to be manually created with the right naming convention and tags. The commands can be found at this documentation

  1. Attempt the upgrade after #1 succeeds.

Root Cause

The existing roles don't meet the criteria expected by the automation on the rosa upgrade cluster command.

<Message>The role with name MY-PREFIX-Support-Role cannot be found.

E: Roles with the prefix 'MY-PREFIX' not found

Diagnostic Steps

Trying to perform a cluster upgrade using the rosa-cli command gets the following output:

$ rosa upgrade cluster -c CLUSTERNAME --debug
? Version: 4.9.xx
I: Ensuring account and operator role policies for cluster 'CLUSTERNAME' are compatible with upgrade.
...
<ErrorResponse xmlns="https://iam.amazonaws.com/doc/2010-05-08/">
  <Error>
    <Type>Sender</Type>
    <Code>NoSuchEntity</Code>
    <Message>The role with name MY-PREFIX-Support-Role cannot be found.</Message>
  </Error>
  <RequestId>xxxxxxx-xxxxx-xxxxxx-xxxxx-xxxxxxxxxx</RequestId>
</ErrorResponse>
E: Roles with the prefix 'MY-PREFIX' not found

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments