-
Notifications
You must be signed in to change notification settings - Fork 180
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
Allow EKG_HOST to use IPv4 and Host/Domain names #1834
Allow EKG_HOST to use IPv4 and Host/Domain names #1834
Conversation
This reverts commit 7bc4734.
Other thoughts: isvalidIPv4 correctly invalidating non IPv4 addresses could be chained to an isNameResolvable function. Not included in this PR because it is beyond scope of the issues being addressed. However this could enable logic if pool registration happens on an online node via the function:
Then when entering an A or AAAA record the check could verify the record can be resolved and notify the operator when the relay would appear to not be reachable, something like:
To avoid suggesting that a resolvable hostname like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to comment added, topologyupdater script also needs to be updated.
Fixed. Although, just for clarification the original isValidIPv4 and the new split for isValidIPv4 and isValidHostnameOrDomain essentially bypasses IPv4 validity because an invalidIPv4 address is a valid Host/Domain name based on the original regex. i.e. 127.0.0.1.2, 10.256.384.512 and 256.512.768.1024 are all valid under the prior isValidIPv4 regex for hostnames, as well as the new isValidHostnameOrDomain (which only inherited the prior regex into a separate function). |
This is true, Not sure how to best deal with that. I dont really think it matters, it will just fail to work and you have to fix your config. |
The worst thing and what we dont want to happen is that we prevent valid input. If bad data slips through, thats fine. |
902f238
to
7528b0f
Compare
7528b0f
to
700d252
Compare
Changes applied, comments responded to.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
relays_ip_enter
.Where should the reviewer start?
a. Should
[d] A or AAAA DNS record
perform host/domain record validation?b. Should
[i] IPv4/v6 address
accept a host or domain name or be changed to only accept IPv4 and IPv6 addresses?Motivation and context
Which issue it fixes?
Closes #1832
Closes #1833
How has this been tested?
[sync|leaderlog|validatre]
no longer errors on valid hostnames or IPv6 and can connect via EKG.EKG_HOST=cardano-node
pass. The cncli.sh sync, leaderlog, & validate subcommands all work as expected.