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

enos_vault_start: support configuring the retry_join block in storage #18

Merged
merged 14 commits into from
Jul 26, 2024

Conversation

ryancragun
Copy link
Contributor

How to read this pull request

In order to support forcing retry_join to resolve using IPV6 we need
to include the address type in the auto_join stanza. Historically we
have handled the retry_join stanza in the enos_vault_start resource
and did not have a way to define the retry_join block.

This does just that by supporting retry_join in the storage schema by
using a dynamic pseudo type for storage in the config.

I've tested the resource with no retry_join defined and added a new
variant to our test scenarios to test with it set or null. All work just
fine.

Along the way I also updated our linter configuration and resolved new issues.

I also updated most Go deps. We are not on the latest terraform-plugin-go
because it requires new updates to the server to support provider functions.

Checklist

  • The commit message includes an explanation of the changes
  • Manual validation of the changes have been performed (if possible)
  • New or modified code has requisite test coverage (if possible)
  • I have performed a self-review of the changes
  • I have made necessary changes and/or pull requests for documentation
  • I have written useful comments in the code
  • Version file/release label updated, if release needed

In order to support forcing `retry_join` to resolve using IPV6 we need
to include the address type in the `auto_join` stanza. Historically we
have handled the `retry_join` stanza in the `enos_vault_start` resource
and did not have a way to define the `retry_join` block.

This does just that by supporting `retry_join` in the storage schema by
using a dynamic pseudo type for `storage` in the config.

I've tested the resource with no `retry_join` defined and added a new
variant to our test scenarios to test with it set or null. All work just
fine.

Signed-off-by: Ryan Cragun <me@ryan.ec>
Signed-off-by: Ryan Cragun <me@ryan.ec>
Signed-off-by: Ryan Cragun <me@ryan.ec>
@ryancragun ryancragun requested a review from a team as a code owner July 2, 2024 22:47
Signed-off-by: Ryan Cragun <me@ryan.ec>
Signed-off-by: Ryan Cragun <me@ryan.ec>
@ryancragun ryancragun force-pushed the ryan/retry-join-vault branch from 86dbb39 to 9c78bc2 Compare July 3, 2024 16:31
Signed-off-by: Ryan Cragun <me@ryan.ec>
@ryancragun
Copy link
Contributor Author

The failure here appears to be an issue with Terraform 1.9. We could temporarily pin to Terraform 1.8 in our tests or admin merge as it's a very subtle thing that should have minimal real impact in scenarios.

Signed-off-by: Ryan Cragun <me@ryan.ec>
Signed-off-by: Ryan Cragun <me@ryan.ec>
Build the artifacts in parallel to speed up the build workflow and to
make it easier to only download the artifacts necessary when testing.

Signed-off-by: Ryan Cragun <me@ryan.ec>
@ryancragun ryancragun force-pushed the ryan/retry-join-vault branch from 67ba79f to 0f54acb Compare July 11, 2024 20:43
Signed-off-by: Ryan Cragun <me@ryan.ec>
@ryancragun ryancragun force-pushed the ryan/retry-join-vault branch from 0f54acb to 9cee3bb Compare July 11, 2024 20:44
Signed-off-by: Ryan Cragun <me@ryan.ec>
@ryancragun ryancragun force-pushed the ryan/retry-join-vault branch from c4b116a to 78ffeca Compare July 11, 2024 20:47
Signed-off-by: Ryan Cragun <me@ryan.ec>
@ryancragun ryancragun force-pushed the ryan/retry-join-vault branch from ab6f644 to cafab63 Compare July 11, 2024 21:07
…before running tests

Signed-off-by: Ryan Cragun <me@ryan.ec>
@ryancragun ryancragun force-pushed the ryan/retry-join-vault branch from 1792729 to adc56ed Compare July 11, 2024 21:46

resource "aws_instance" "remotehost" {
ami = data.aws_ami.ubuntu.id
instance_type = "t3.small"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Some tests were flaky because they connect to this machine. I boosted the size to give it more CPU credits.

}

resource "enos_remote_exec" "wait" {
inline = ["sudo cloud-init status --wait"]
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I also added this so our tests timeout while waiting for the instance to actually be available.

@ryancragun ryancragun merged commit 106479b into main Jul 26, 2024
19 checks passed
@ryancragun ryancragun deleted the ryan/retry-join-vault branch July 26, 2024 15:40
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.

2 participants