Shorten peering ids, filter out IPv6/ARPA names #569
Merged
+161
−17
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Improve peering identities in IPv6 environments: ignore special ARPA hostnames of reversed IPv6 addresses, and prefer the actual hostnames of the pods/machine.
Previously, pseudo-hostnames like
1.0.0.0.....0.0.ip6.arpa
were selected, as this is how stdlib works withsocker.getfqdn()
— it is not very suited for IPv6, only IPv4.As a side effect of having our own implementation, also drop useless suffixes like
.local
for Mac OS — also to improve the readability of the peering ids.And also, convert timestamps of the operator start time to just a long number.
Was:
nolar@1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa/2020-10-21T20:51:11.618987/vy08ew
Now:
nolar@SV-Pro/20201021205056/dqp
These peering ids are visible in the messages about conflicting operators:
Generally, a peering id MUST be a unique string; SHOULD help the developers to identify where the operator runs (or who does that). No other obligations regarding the structure or hostname accessibility. Therefore, by changing the internal structure of the peering ids, the backward compatibility is not affected.