Skip to content

Refactor of DNS resolving #112

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

Merged
merged 1 commit into from
Nov 13, 2020
Merged

Refactor of DNS resolving #112

merged 1 commit into from
Nov 13, 2020

Conversation

mzbroch
Copy link
Contributor

@mzbroch mzbroch commented Nov 4, 2020

This PR standardises the process of DNS resolution in the Onboarding Plugin.

In the onboarding task, is it possible to specify a FQDN to be onboarded. Plugin is expected to resolve that name into IP address and use it for connections.

With this PR, a FQDN is resolved once per OT lifetime and rewritten into an ip_address attribute of the model. This assures consistency in all of the code and eliminates the need for accounting for IP/FQDN.

Fixes #106

@glennmatthews
Copy link
Contributor

Looks reasonable. One thing that's not clear to me, does the entered FQDN still get stored anywhere in the final onboarded device?

@mzbroch
Copy link
Contributor Author

mzbroch commented Nov 4, 2020

Looks reasonable. One thing that's not clear to me, does the entered FQDN still get stored anywhere in the final onboarded device?

Not at the moment - We do resolution once the worker picks up the task and save resolved FQDN into the ip_address field.

@mzbroch
Copy link
Contributor Author

mzbroch commented Nov 4, 2020

@jvanderaa Let us know if this change solves your issue

@jvanderaa
Copy link
Contributor

jvanderaa commented Nov 9, 2020

Checking still. In the interim we should also add the unit test that I have added on the branch uploaded. @mzbroch

@mzbroch mzbroch merged commit cf3c4da into develop Nov 13, 2020
@mzbroch mzbroch deleted the mzb-dns branch November 19, 2020 08:18
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.

Onboarding Device Via Name Fails with 2.0
3 participants