Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-43439

[aws] ec2:DescribeInstanceTypes permission is required when instance type specified

    • None
    • False
    • Hide

      None

      Show
      None
    • N/A
    • Release Note Not Required
    • In Progress

      Description of problem:

          If an instance type is specified in the install-config.yaml, the installer will try to validate its availability in the given region and that it meets the minimum requirements for OCP nodes. When that happens, the `ec2:DescribeInstanceTypes` permission is used but it's not validated by the installer as a required permissions for installs.

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

          4.16+

      How reproducible:

          Always by setting an instanceType in the install-config.yaml

      Steps to Reproduce:

          1.
          2.
          3.
          

      Actual results:

          If you install with an user with minimal permissions, you'll get the error:
      
      level=error msg=failed to fetch Master Machines: failed to load asset "Install Config": failed to create install config: [controlPlane.platform.aws: Internal error: error listing instance types: fetching instance types: UnauthorizedOperation: You are not authorized to perform this operation. User: arn:aws:iam::460538899914:user/ci-op-8phprrsm-ccf9a-minimal-perm is not authorized to perform: ec2:DescribeInstanceTypes because no identity-based policy allows the ec2:DescribeInstanceTypes action
                      level=error msg=	status code: 403, request id: 559344f4-0fc3-4a6c-a6ee-738d4e1c0099, compute[0].platform.aws: Internal error: error listing instance types: fetching instance types: UnauthorizedOperation: You are not authorized to perform this operation. User: arn:aws:iam::460538899914:user/ci-op-8phprrsm-ccf9a-minimal-perm is not authorized to perform: ec2:DescribeInstanceTypes because no identity-based policy allows the ec2:DescribeInstanceTypes action   
                      level=error msg=	status code: 403, request id: 584cc325-9057-4c31-bb7d-2f4458336605]

      Expected results:

          The installer fails with an explicit message saying that `ec2:DescribeInstanceTypes` is required.

      Additional info:

          

            [OCPBUGS-43439] [aws] ec2:DescribeInstanceTypes permission is required when instance type specified

            Errata Tool made changes -
            Resolution New: Done-Errata [ 10803 ]
            Status Original: Verified [ 10015 ] New: Closed [ 6 ]

            Errata Tool added a comment -

            Since the problem described in this issue should be resolved in a recent advisory, it has been closed.

            For information on the advisory (Important: OpenShift Container Platform 4.18.1 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-2024:6122

            Errata Tool added a comment - Since the problem described in this issue should be resolved in a recent advisory, it has been closed. For information on the advisory (Important: OpenShift Container Platform 4.18.1 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-2024:6122
            Yunfei Jiang made changes -
            Status Original: ON_QA [ 15723 ] New: Verified [ 10015 ]

            verified on 4.18.0-0.nightly-2024-11-30-141716. PASS

            Yunfei Jiang added a comment - verified on 4.18.0-0.nightly-2024-11-30-141716. PASS
            Errata Tool made changes -
            Remote Link New: This issue links to "RHEA-2024:6122 (Web Link)" [ 1861347 ]
            ART Bot made changes -
            Status Original: MODIFIED [ 14454 ] New: ON_QA [ 15723 ]
            OpenShift Prow Bot made changes -
            Status Original: POST [ 15726 ] New: MODIFIED [ 14454 ]
            Gaoyun Pei made changes -
            QA Contact Original: Gaoyun Pei [ gpei ] New: Yunfei Jiang [ yunjiang-1 ]
            OpenShift Prow Bot made changes -
            Status Original: New [ 10016 ] New: POST [ 15726 ]
            Rafael Fonseca dos Santos made changes -
            Release Note Text New: N/A
            OpenShift Jira Bot made changes -
            Release Note Status New: In Progress [ 30960 ]
            Rafael Fonseca dos Santos made changes -
            Release Note Type New: Release Note Not Required [ 31862 ]
            Rafael Fonseca dos Santos made changes -
            Target Backport Versions Original: 4.17.z [ 12428296 ] New: 4.17.z, 4.16.z [ 12428296, 12428304 ]
            Rafael Fonseca dos Santos made changes -
            Target Backport Versions New: 4.17.z [ 12428296 ]
            Rafael Fonseca dos Santos made changes -
            Target Version New: 4.18.0 [ 12431397 ]
            OpenShift Prow Bot made changes -
            Remote Link New: This issue links to "openshift/installer#9106: OCPBUGS-43439: permissions: add ec2:DescribeInstanceTypes requirement (Web Link)" [ 1800154 ]
            Rafael Fonseca dos Santos made changes -
            Link New: This issue is triggered by CORS-3571 [ CORS-3571 ]
            Rafael Fonseca dos Santos made changes -
            Assignee New: Rafael Fonseca dos Santos [ rdossant ]
            Rafael Fonseca dos Santos made changes -
            Labels New: aws
            Rafael Fonseca dos Santos made changes -
            QA Contact New: Gaoyun Pei [ gpei ]
            Rafael Fonseca dos Santos created issue -

              rdossant Rafael Fonseca dos Santos
              rdossant Rafael Fonseca dos Santos
              Yunfei Jiang Yunfei Jiang
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: