Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug 1945467: aws: allow use of unknown regions in known partitions #4807

Conversation

staebler
Copy link
Contributor

@staebler staebler commented Apr 1, 2021

This is a manual cherry-pick of #4801.

Allow the user to specify a region that is not known to the instatller but does match the regex of a known partition without requiring the user to specify custom service endpoints. This is needed to support new regions that are added to known partitions.

Without this, it is not possible to use an unknown region is the standard partition. Terraform will not create the IAM roles correctly when specifying custom endpoints for a region in the standard partition because the request will try to create the role in the cluster's region rather than in us-east-1.

This seems like the behavior that was desired when the check for whether custom service endpoints are needed was added in cf79a75.

In addition to relaxing the service endpoint validation, the validation around whether an AMI must be specified has been tightened. The user must specify an AMI when the RHCOS stream does not contain an AMI for the region, rather than when the ASK SDK knows about the region.

https://bugzilla.redhat.com/show_bug.cgi?id=1944268

Allow the user to specify a region that is not known to the instatller
but does match the regex of a known partition without requiring the
user to specify custom service endpoints. This is needed to support
new regions that are added to known partitions.

Without this, it is not possible to use an unknown region is the
standard partition. Terraform will not create the IAM roles correctly
when specifying custom endpoints for a region in the standard partition
because the request will try to create the role in the cluster's region
rather than in us-east-1.

This seems like the behavior that was desired when the check for
whether custom service endpoints are needed was added in
openshift@cf79a75.

In addition to relaxing the service endpoint validation, the validation
around whether an AMI must be specified has been tightened. The user
must specify an AMI when the RHCOS stream does not contain an AMI
for the region, rather than when the ASK SDK knows about the region.

https://bugzilla.redhat.com/show_bug.cgi?id=1944268
@openshift-ci-robot openshift-ci-robot added bugzilla/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Apr 1, 2021
@openshift-ci-robot
Copy link
Contributor

@staebler: This pull request references Bugzilla bug 1945467, which is invalid:

  • expected dependent Bugzilla bug 1944268 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE), but it is POST instead

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

In response to this:

Bug 1945467: aws: allow use of unknown regions in known partitions

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.

@staebler
Copy link
Contributor Author

staebler commented Apr 6, 2021

/cherry-pick release-4.6

@openshift-cherrypick-robot

@staebler: once the present PR merges, I will cherry-pick it on top of release-4.6 in a new PR and assign it to you.

In response to this:

/cherry-pick release-4.6

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.

Copy link
Contributor

@jstuever jstuever left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Apr 22, 2021
@openshift-bot
Copy link
Contributor

/retest

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

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/bugzilla refresh

Recalculating validity in case the underlying Bugzilla bug has changed.

@openshift-ci-robot
Copy link
Contributor

@openshift-bot: This pull request references Bugzilla bug 1945467, which is invalid:

  • expected dependent Bugzilla bug 1944268 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE), but it is ON_QA instead
  • expected dependent Bugzilla bug 1948923 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE), but it is POST instead

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

In response to this:

/bugzilla refresh

Recalculating validity in case the underlying Bugzilla bug has changed.

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-bot
Copy link
Contributor

/retest

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

5 similar comments
@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

Improve the validation around whether a custom AMI has been provided
by the user in the regions where one is required.

The install config is valid if any of the following are satisifed.
* The RHCOS stream metadata has an AMI for the region.
* The region is in the standard AWS partition. In this caes, the AMI
can be copied from us-east-1.
* The custom AMI has been specified at the platform level.
* The custom AMI has been specified in the default machine platform.
* A custom AMI has been specified for each machine pool that has
replicas.

https://bugzilla.redhat.com/show_bug.cgi?id=1948923
@openshift-ci-robot openshift-ci-robot removed the lgtm Indicates that a PR is ready to be merged. label Apr 23, 2021
@staebler
Copy link
Contributor Author

Cherry-picked the commit from #4846.

@staebler staebler requested a review from jstuever April 23, 2021 23:04
@staebler
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci-robot
Copy link
Contributor

@staebler: This pull request references Bugzilla bug 1945467, which is invalid:

  • expected dependent Bugzilla bug 1944268 to be in one of the following states: VERIFIED, RELEASE_PENDING, CLOSED (ERRATA), CLOSED (CURRENTRELEASE), but it is ON_QA instead

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

In response to this:

/bugzilla refresh

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-bot
Copy link
Contributor

/retest

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

22 similar comments
@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-bot
Copy link
Contributor

/retest

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

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 14, 2021

@staebler: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-crc 6fbcedd link /test e2e-crc

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@mfojtik mfojtik added the cherry-pick-approved Indicates a cherry-pick PR into a release branch has been approved by the release branch manager. label Jun 16, 2021
@mfojtik
Copy link
Member

mfojtik commented Jun 16, 2021

[patch-manager] 🚀 Approved for z-stream by score: 1.00

approved

@openshift-merge-robot openshift-merge-robot merged commit a4cc97b into openshift:release-4.7 Jun 16, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 16, 2021

@staebler: All pull requests linked via external trackers have merged:

Bugzilla bug 1945467 has been moved to the MODIFIED state.

In response to this:

Bug 1945467: aws: allow use of unknown regions in known partitions

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-cherrypick-robot

@staebler: #4807 failed to apply on top of branch "release-4.6":

Applying: aws: allow use of unknown regions in known partitions
Applying: aws: improve ami validation
Using index info to reconstruct a base tree...
M	pkg/asset/installconfig/aws/validation.go
M	pkg/asset/installconfig/aws/validation_test.go
Falling back to patching base and 3-way merge...
Auto-merging pkg/asset/installconfig/aws/validation_test.go
CONFLICT (content): Merge conflict in pkg/asset/installconfig/aws/validation_test.go
Auto-merging pkg/asset/installconfig/aws/validation.go
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 aws: improve ami validation
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

In response to this:

/cherry-pick release-4.6

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/severity-high Referenced Bugzilla bug's severity is high for the branch this PR is targeting. 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants