Skip to content

Utilize metadata service to get Linode info; Wait for Volume Active on Creation#146

Merged
zliang-akamai merged 7 commits intolinode:mainfrom
zliang-akamai:zhiwei/get-linode-info-from-metadata-service
Apr 10, 2024
Merged

Utilize metadata service to get Linode info; Wait for Volume Active on Creation#146
zliang-akamai merged 7 commits intolinode:mainfrom
zliang-akamai:zhiwei/get-linode-info-from-metadata-service

Conversation

@zliang-akamai
Copy link
Member

@zliang-akamai zliang-akamai commented Apr 3, 2024

📝 Description

This is to implement logic that retrieve Linode info from metadata service, and if failed, fall back to original hacking way for the regions that don't have metadata services enabled.

✔️ How to Test

Automated Testing

You can do make int-test if we can merge #145 before this PR.

Manually Testing

  • Create a Linode in a new site (e.g. us-mia) and a Linode in an old site (e.g. us-central).
  • Logging into these 2 Linode.
  • Install docker, git, make, and any other necessary tool.
  • Clone the repository and checkout to this feature branch.
  • Run LINODE_TOKEN=<YOUR_TOKEN> PLUGIN_VERSION=dev make test
  • Or manual testing
    • make build
    • docker plugin set linode/docker-volume-linode:latest linode-token=<YOUR_TOKEN>
    • docker plugin enable linode/docker-volume-linode:latest
    • Run the commands to create volumes manually, e.g. docker volume create -d linode/docker-volume-linode:latest -o delete-on-remove=true test-volume-default-size

@zliang-akamai zliang-akamai requested a review from a team as a code owner April 3, 2024 03:36
@zliang-akamai zliang-akamai requested review from jriddle-linode and lgarber-akamai and removed request for a team April 3, 2024 03:36
@zliang-akamai zliang-akamai changed the title Utilize metadata service to get Linode info Utilize metadata service to get Linode info; Wait for Volume Active on Creation Apr 3, 2024
Copy link
Contributor

@lgarber-akamai lgarber-akamai left a comment

Choose a reason for hiding this comment

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

Works well on my end, nice work!

Copy link
Collaborator

@jriddle-linode jriddle-linode left a comment

Choose a reason for hiding this comment

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

LGTM. works locally

@zliang-akamai zliang-akamai merged commit fdcb6a0 into linode:main Apr 10, 2024
@zliang-akamai zliang-akamai deleted the zhiwei/get-linode-info-from-metadata-service branch April 10, 2024 15:30
@lgarber-akamai lgarber-akamai added the new-feature for new features in the changelog. label Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-feature for new features in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants