oxidecomputer / omicron

Omicron: Oxide control plane
Mozilla Public License 2.0
252 stars 40 forks source link

schema-updater: use DNS #4508

Open smklein opened 1 year ago

smklein commented 1 year ago

See: https://github.com/oxidecomputer/omicron/blob/ca9d90a79c2a7a9ffdca12a705d007d7f28ce61f/nexus/src/bin/schema-updater.rs#L34

If we could:

This would improve the usability of this tool, as it wouldn't require a manual lookup of the CRDB address.

bnaecker commented 1 year ago

Note: same thing applies here:

https://github.com/oxidecomputer/omicron/blob/ca9d90a79c2a7a9ffdca12a705d007d7f28ce61f/oximeter/collector/src/bin/clickhouse-schema-updater.rs#L39-L41

davepacheco commented 1 year ago

Yeah, this would be great. We might be able to take an approach like omdb uses (which basically hardcodes the rack subnet), though I understand the rack subnets may not all be fixed at some point in the future.

Either way I think it's probably very important that the tool say what it's doing (the way omdb does) and provide ways to override either the DNS server or the CockroachDB node that it uses.

rmustacc commented 1 year ago

So, I think there's a fairly straightforward path here. Right now we have https://github.com/oxidecomputer/omicron/issues/2122 open. If we had filled in at least a few of the resolvers in /etc/resolv.conf, that'd be enough to bootstrap and determine the full set of resolvers to use and also solve this. Note that we can't guess based on the IP address, but it seems like having that populated is worthwhile anyways. The same would be true of the GZ.

While there is the caveat that there is a limited number of resolvers that can be populated and used, as long as consuming software uses this for bootstrap (ala some of the features in this regard for cueball) it should probably be alright to get started?