Skip to content
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

chore: gracefully handle returning servers when dns not configured #1334

Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion packages/services/ds/src/util/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,18 @@ pub fn build_ds_hostname(
datacenter_id: Uuid,
) -> GlobalResult<String> {
// TODO: Change lobby -> server
let domain_job = unwrap_ref!(config.server()?.rivet.dns()?.domain_job);
let Some(domain_job) = config
.server()?
.rivet
.dns
.as_ref()
.and_then(|x| x.domain_job.as_ref())
else {
tracing::warn!(
"unable to get dns.domain_job to build actor hostname, returning invalid hostname. configure dns or switch to host networking."
);
return Ok("rivet-dns-not-configured.invalid".into());
};
Ok(format!(
"{}-{}.lobby.{}.{}",
server_id, port_name, datacenter_id, domain_job
Expand Down
Loading