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

internal/providers: Run platform Init function before fetching config #1155

Merged
merged 3 commits into from
Jan 6, 2021

Conversation

arithx
Copy link
Contributor

@arithx arithx commented Dec 22, 2020

On AWS we need to run the platform-specific Init function before we
fetch the configuration. This Init function is attempting to fetch the
S3RegionHint which we need to set to the proper value before attempting
to fetch any S3 resources (the region hint defaults to us-east-1 which
would cause failures when running EC2 instances in non-standard
partitions that are attempting to fetch merge / replacement
configurations from S3 resources).

Fixes RHBZ 1892521
Fixes RHBZ 1902996

@arithx
Copy link
Contributor Author

arithx commented Dec 22, 2020

Marked as draft while untested

@arithx arithx force-pushed the s3_config_fix branch 4 times, most recently from b439c5b to eea87aa Compare December 23, 2020 19:43
internal/providers/aws/aws.go Outdated Show resolved Hide resolved
internal/providers/aws/aws.go Outdated Show resolved Hide resolved
internal/providers/util/retry.go Outdated Show resolved Hide resolved
internal/providers/util/backoff.go Show resolved Hide resolved
This function has been dead since 198184c.
@bgilbert
Copy link
Contributor

bgilbert commented Jan 5, 2021

Re second commit message, let's drop for legacy reasons. That makes it sound as though there might be a specific reason we need to avoid changing the behavior, when actually we're doing it out of paranoia.

The value of initialBackoff is increased before the wait is ever
performed. This means that we never actually wait for the default
initialBackoff time. Move it to after the wait but also increase the
current default to mirror what was happening with the previous
functionality.
Copy link
Contributor

@bgilbert bgilbert left a comment

Choose a reason for hiding this comment

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

LGTM generally.

internal/providers/aws/aws.go Outdated Show resolved Hide resolved
internal/providers/aws/aws.go Outdated Show resolved Hide resolved
@arithx
Copy link
Contributor Author

arithx commented Jan 6, 2021

Updated & marking ready for review.

@arithx arithx marked this pull request as ready for review January 6, 2021 05:50
@arithx arithx force-pushed the s3_config_fix branch 2 times, most recently from 81826a2 to 91f8428 Compare January 6, 2021 07:31
On AWS we need to run the platform-specific Init function before we
fetch the configuration. This Init function is attempting to fetch the
S3RegionHint which we need to set to the proper value before attempting
to fetch any S3 resources (the region hint defaults to us-east-1 which
would cause failures when running EC2 instances in non-standard
partitions that are attempting to fetch merge / replacement
configurations from S3 resources).

Fixes [RHBZ 1892521](https://bugzilla.redhat.com/show_bug.cgi?id=1892521)
Fixes [RHBZ 1902996](https://bugzilla.redhat.com/show_bug.cgi?id=1902996)
@arithx arithx merged commit 534c5bb into coreos:master Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants