openshift / installer

Install an OpenShift 4.x cluster
https://try.openshift.com
Apache License 2.0
1.44k stars 1.39k forks source link

OCPBUGS-44745: aws: user right perm for untagging BYO IAM profiles #9222

Closed r4f4 closed 4 days ago

r4f4 commented 5 days ago

The resource is untagged via the more generic sdk call UntagResources. This should fix the following error when using minimal permisssions:

time="2024-11-19T12:22:19Z" level=info msg="untag shared resources: AccessDeniedException: User: arn:aws:iam::460538899914:user/ci-op-y8wbktiq-e515e-minimal-perm is not authorized to perform: tag:UntagResources because no identity-based policy allows the tag:UntagResources action\n\tstatus code: 400, request id: 464de6ab-3de5-496d-a163-594dade11619"
openshift-ci-robot commented 5 days ago

@r4f4: This pull request references Jira Issue OCPBUGS-44745, which is invalid:

Comment /jira refresh to re-evaluate validity if changes to the Jira bug are made, or edit the title of this pull request to link to a different bug.

The bug has been updated to refer to the pull request using the external bug tracker.

In response to [this](https://github.com/openshift/installer/pull/9222): >The resource is untagged via the more generic sdk call `UntagResources`. This should fix the following error when using minimal permisssions: >``` >time="2024-11-19T12:22:19Z" level=info msg="untag shared resources: AccessDeniedException: User: arn:aws:iam::460538899914:user/ci-op-y8wbktiq-e515e-minimal-perm is not authorized to perform: tag:UntagResources because no identity-based policy allows the tag:UntagResources action\n\tstatus code: 400, request id: 464de6ab-3de5-496d-a163-594dade11619" >``` Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Finstaller). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
r4f4 commented 5 days ago

/jira refresh

openshift-ci-robot commented 5 days ago

@r4f4: This pull request references Jira Issue OCPBUGS-44745, which is valid. The bug has been moved to the POST state.

3 validation(s) were run on this bug * bug is open, matching expected state (open) * bug target version (4.18.0) matches configured target version for branch (4.18.0) * bug is in the state New, which is one of the valid states (NEW, ASSIGNED, POST)

Requesting review from QA contact: /cc @gpei

In response to [this](https://github.com/openshift/installer/pull/9222#issuecomment-2488279797): >/jira refresh Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Finstaller). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
r4f4 commented 5 days ago

/test e2e-aws-ovn-custom-iam-profile

r4f4 commented 5 days ago

/label platform/aws

r4f4 commented 5 days ago

/test e2e-aws-ovn-custom-iam-profile

r4f4 commented 5 days ago

It works

time="2024-11-20T19:38:25Z" level=debug msg="Search for and remove tags in us-east-1 matching kubernetes.io/cluster/ci-op-h3ih7jty-83e11-5tt5d: shared"
time="2024-11-20T19:38:25Z" level=debug msg="Nothing to clean for shared iam resource" arn="arn:aws:iam::460538899914:instance-profile/ci-op-h3ih7jty-83e11-byo-profile-worker"
time="2024-11-20T19:38:25Z" level=debug msg="Nothing to clean for shared iam resource" arn="arn:aws:iam::460538899914:instance-profile/ci-op-h3ih7jty-83e11-byo-profile-master"
time="2024-11-20T19:38:25Z" level=info msg="Removed tag kubernetes.io/cluster/ci-op-h3ih7jty-83e11-5tt5d: shared" arn="arn:aws:iam::460538899914:instance-profile/ci-op-h3ih7jty-83e11-byo-profile-worker"
time="2024-11-20T19:38:25Z" level=info msg="Removed tag kubernetes.io/cluster/ci-op-h3ih7jty-83e11-5tt5d: shared" arn="arn:aws:iam::460538899914:instance-profile/ci-op-h3ih7jty-83e11-byo-profile-master"
patrickdillon commented 5 days ago

/approve

but there is a minor capitalizatoin issue

openshift-ci[bot] commented 5 days ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: patrickdillon

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

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[pkg/asset/installconfig/aws/OWNERS](https://github.com/openshift/installer/blob/master/pkg/asset/installconfig/aws/OWNERS)~~ [patrickdillon] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment
patrickdillon commented 5 days ago

/lgtm

r4f4 commented 4 days ago

/label acknowledge-critical-fixes-only

r4f4 commented 4 days ago

/retest-required

openshift-ci[bot] commented 4 days ago

@r4f4: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/e2e-aws-ovn-shared-vpc-edge-zones 369b41a0aea1e2c8d8661769fb38521c183ac2ca link false /test e2e-aws-ovn-shared-vpc-edge-zones
ci/prow/e2e-aws-ovn-edge-zones 369b41a0aea1e2c8d8661769fb38521c183ac2ca link false /test e2e-aws-ovn-edge-zones

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository. I understand the commands that are listed [here](https://go.k8s.io/bot-commands).
openshift-ci-robot commented 4 days ago

@r4f4: Jira Issue OCPBUGS-44745: All pull requests linked via external trackers have merged:

Jira Issue OCPBUGS-44745 has been moved to the MODIFIED state.

In response to [this](https://github.com/openshift/installer/pull/9222): >The resource is untagged via the more generic sdk call `UntagResources`. This should fix the following error when using minimal permisssions: >``` >time="2024-11-19T12:22:19Z" level=info msg="untag shared resources: AccessDeniedException: User: arn:aws:iam::460538899914:user/ci-op-y8wbktiq-e515e-minimal-perm is not authorized to perform: tag:UntagResources because no identity-based policy allows the tag:UntagResources action\n\tstatus code: 400, request id: 464de6ab-3de5-496d-a163-594dade11619" >``` Instructions for interacting with me using PR comments are available [here](https://prow.ci.openshift.org/command-help?repo=openshift%2Finstaller). If you have questions or suggestions related to my behavior, please file an issue against the [openshift-eng/jira-lifecycle-plugin](https://github.com/openshift-eng/jira-lifecycle-plugin/issues/new) repository.
r4f4 commented 4 days ago

/cherry-pick release-4.17

openshift-cherrypick-robot commented 4 days ago

@r4f4: new pull request created: #9228

In response to [this](https://github.com/openshift/installer/pull/9222#issuecomment-2491507063): >/cherry-pick release-4.17 Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes-sigs/prow](https://github.com/kubernetes-sigs/prow/issues/new?title=Prow%20issue:) repository.
openshift-bot commented 4 days ago

[ART PR BUILD NOTIFIER]

Distgit: ose-installer-altinfra This PR has been included in build ose-installer-altinfra-container-v4.19.0-202411211638.p0.gca17038.assembly.stream.el9. All builds following this will include this PR.

openshift-bot commented 4 days ago

[ART PR BUILD NOTIFIER]

Distgit: ose-baremetal-installer This PR has been included in build ose-baremetal-installer-container-v4.19.0-202411211638.p0.gca17038.assembly.stream.el9. All builds following this will include this PR.

openshift-bot commented 4 days ago

[ART PR BUILD NOTIFIER]

Distgit: ose-installer-terraform-providers This PR has been included in build ose-installer-terraform-providers-container-v4.19.0-202411211638.p0.gca17038.assembly.stream.el9. All builds following this will include this PR.

openshift-bot commented 4 days ago

[ART PR BUILD NOTIFIER]

Distgit: ose-installer-artifacts This PR has been included in build ose-installer-artifacts-container-v4.19.0-202411211638.p0.gca17038.assembly.stream.el9. All builds following this will include this PR.