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

Support metaldata metadata provider #3593

Merged
merged 1 commit into from
Jan 22, 2021
Merged

Conversation

the-maldridge
Copy link
Contributor

Signed-off-by: Michael Aldridge aldridge.mac@gmail.com

- What I did

I added a new metadata provider that supports the metaldata API provided by ResinStack MetalData. This provider uses a DNS name which greatly simplifies the network topology by allowing the remote network to resolve a DNS name, optionally after canonicalizing it against a search domain.

- How I did it

I copied components of existing providers (AWS and Vultr) and modifying them to suit the API handled by MetalData.

- How to verify it

Get a metaldata server spun up (or don't, the API can be satisfied with a carefully laid out folder structure on disk) and configure your DNS to handle a request for 'metaldata' to point back to wherever this webserver is. Once you've done this you can boot a machine and observe that the metaldata probe succeeds and information is summoned.

- Description for the changelog

Support MetalData metadata source.

the-maldridge added a commit to resinstack/metaldata that referenced this pull request Jan 18, 2021
The AWS connection strategy relies on making a magic address routable,
which is fine in a cloud env where that is the norm, but is not fine
in a hardware based environment where it may not be practical to add
arbitrary magic addresses.

Since this commit is in sync with linuxkit/linuxkit#3593 it also
breaks compat with the AWS API.
@deitch
Copy link
Collaborator

deitch commented Jan 18, 2021

This is ok. Is there any way to add tests to this?

@the-maldridge
Copy link
Contributor Author

Given that none of the other providers presently have tests, is there a mechanism you'd prefer to set the precedent with? Spinning up a server inside of the test is a non-starter since it expects the server on port 80, but it might be possible to fake out the http.Client.

@deitch
Copy link
Collaborator

deitch commented Jan 18, 2021

I guess I really cannot complain, then, can I?

@deitch
Copy link
Collaborator

deitch commented Jan 18, 2021

I will build and push out the signed packages; is this ready from your perspective?

@the-maldridge
Copy link
Contributor Author

I'd like to let it sit till the end of the week. I'm reasonably satisfied with it, but I want to make sure there aren't any major corner cases I haven't accounted for yet.

@deitch
Copy link
Collaborator

deitch commented Jan 18, 2021

OK, post here when ready and I will push them out.

@the-maldridge
Copy link
Contributor Author

@deitch this has been running for a few days now and I'm relatively satisfied that there's no major corner cases in it. Feel free to merge and push out packages at your leisure.

@deitch
Copy link
Collaborator

deitch commented Jan 21, 2021

Needs a rebase, and then I can push the images out and kick off CI

@deitch
Copy link
Collaborator

deitch commented Jan 21, 2021

Pushed out and signed. Please update the hashes with scripts/update-component-sha.sh linuxkit/metadata:2cf1db0f0d2c9916b4894318bd76f1c97d8c8f7b, amend commit and push out.

Signed-off-by: Michael Aldridge <aldridge.mac@gmail.com>
@the-maldridge
Copy link
Contributor Author

Done.

@deitch deitch merged commit 4cdf6bc into linuxkit:master Jan 22, 2021
@the-maldridge the-maldridge deleted the metaldata branch January 9, 2022 22:26
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