Skip to content

Switch zone services need per-rack distinction in DNS #5201

Open
@internet-diglett

Description

@internet-diglett

Currently we do not differentiate switch zone services by rack, nor do we differentiate them by which switch "slot" (0/1, top or bottom) they manage. However, this information is required since the switch configuration per-rack and per-slot will not necessarily be the same. We are currently getting around the lack of per-slot identification in DNS by querying the co-resident MGS service and learning the location from it, but we should resolve both of these problems by changing how we register the services in DNS.

Example of how we do it today:

// lookup switch zones via DNS
// TODO in the future this will need to be need to be done per rack
let switch_zone_addresses = match self
.resolver
.lookup_all_ipv6(ServiceName::Dendrite)
.await
{
Ok(addrs) => addrs,
Err(e) => {
error!(log, "failed to resolve addresses for Dendrite services"; "error" => %e);
continue;
},
};
// TODO in the future this will need to be need to be done per rack
let mappings =
map_switch_zone_addrs(log, switch_zone_addresses).await;
// TODO in the future this will need to be need to be done per rack
// build sled agent clients
let sled_agent_clients = build_sled_agent_clients(&mappings, log);

Possible solution:
Dendrite and MGS are both in the same zone, and IIUC Dendrite registers itself with DNS. Dendrite (and other services like it) could first query MGS to learn what slot / location they manage, and provide that as part of the information / name registered to DNS. If we could figure out a way to provide a rack ID to the sled-agents / switch zones upon startup, the switch zone service could also provide that information during their registration to DNS.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions