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

AWS: Dedicated hosts management #66

Merged
merged 31 commits into from
Jun 17, 2024
Merged

AWS: Dedicated hosts management #66

merged 31 commits into from
Jun 17, 2024

Conversation

sparshev
Copy link
Collaborator

@sparshev sparshev commented May 8, 2024

This change enables dedicated hosts management on AWS and a couple of other useful things

Description

  • AWS: Integrated one-node dedicated host pool manager. It can spin-up the hosts when needed and will monitor the usage to release the host when not needed anymore. Now label definition could have pool option which will utilize the pre-defined dedicated pool to allocate or reuse the allocated host.

  • AWS: Updated SDK dependency to the latest versions

  • AWS: Switched to create objects instead of references and utilized more aws functions to convert to/from aws types

  • AWS: Added retries for the API communication, due to the issues with utilizing Host in Allocation after it becomes Available: https://docs.aws.amazon.com/ec2/latest/devguide/eventual-consistency.html

  • "Driver: AWS" wiki page was updated

Related Issue

#60

Motivation and Context

It's really needed

How Has This Been Tested?

Manual & Automatic tests

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@sparshev sparshev added the enhancement New feature or request label May 8, 2024
@sparshev sparshev self-assigned this May 8, 2024
@sparshev sparshev marked this pull request as draft May 9, 2024 22:23
@sparshev sparshev added this to the v0.7.3 milestone May 13, 2024
@sparshev sparshev marked this pull request as ready for review June 7, 2024 20:23
* CodeQL workflow:
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, github/codeql-action/init@v2, github/codeql-action/analyze@v2. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

CodeQL Action v2 will be deprecated on December 5th, 2024. Please update all occurrences of the CodeQL Action in your workflow files to v3. For more information, see https://github.blog/changelog/2024-01-12-code-scanning-deprecation-of-codeql-action-v2/

* Build workflow:
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-go@v4, actions/upload-artifact@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.

Deprecation notice: v1, v2, and v3 of the artifact actions
The following artifacts were uploaded using a version of actions/upload-artifact that is scheduled for deprecation: "binaries".
Please update your workflow to use v4 of the artifact actions.
Learn more: https://github.blog/changelog/2024-04-16-deprecation-notice-v3-of-the-artifact-actions/
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/setup-go@v4. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
@sparshev sparshev changed the title AF-60 AWS: Dedicated hosts management AWS: Dedicated hosts management Jun 13, 2024
@sparshev sparshev requested a review from svenevs June 14, 2024 15:32
lib/drivers/aws/config.go Show resolved Hide resolved
lib/drivers/aws/config.go Outdated Show resolved Hide resolved
lib/drivers/aws/dedicated_pool.go Show resolved Hide resolved
lib/drivers/aws/dedicated_pool.go Outdated Show resolved Hide resolved
lib/drivers/aws/dedicated_pool.go Outdated Show resolved Hide resolved
svenevs
svenevs previously approved these changes Jun 14, 2024
…ecture

When the host is changing state from Pending to Available - it doesn't
mean that it's actually available for the instance (sic). The allocation
can easily fail because distributed architecture of AWS doesn't allow a
certain knowledge of the state and there is no such a thing as priority
in syncing state update messages to update API & Dashboard last, when
the region internally is updated. So we could easily see an error even
if the automation is perfect.

So I'm adding automatic retries to all the AWS calls with pain in my
heart. Maybe someday will be a better way of AWS will fix the issue...
@sparshev sparshev merged commit e8463e2 into main Jun 17, 2024
5 checks passed
@sparshev sparshev deleted the AF-60 branch June 17, 2024 18:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants