Skip to content

Commit

Permalink
much work on DNS
Browse files Browse the repository at this point in the history
  • Loading branch information
davepacheco committed Sep 15, 2023
1 parent 3a2ad21 commit 44dc1f0
Show file tree
Hide file tree
Showing 9 changed files with 273 additions and 64 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions common/src/api/external/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -652,6 +652,12 @@ impl From<&Generation> for i64 {
}
}

impl From<u32> for Generation {
fn from(value: u32) -> Self {
Generation(u64::from(value))
}
}

impl TryFrom<i64> for Generation {
type Error = anyhow::Error;

Expand Down
2 changes: 1 addition & 1 deletion nexus/db-queries/src/db/datastore/dns.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ impl DataStore {

/// List all DNS names in the given DNS zone at the given group version
/// (paginated)
async fn dns_names_list(
pub async fn dns_names_list(
&self,
opctx: &OpContext,
dns_zone_id: Uuid,
Expand Down
2 changes: 2 additions & 0 deletions nexus/src/app/background/common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,8 @@ impl Driver {
self.tasks.keys()
}

// XXX-dap helper function

/// Returns a summary of what this task does (for developers)
pub fn task_description(&self, task: &TaskHandle) -> &str {
// It should be hard to hit this in practice, since you'd have to have
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/rack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl super::Nexus {
.collect();
let mut dns_update = DnsVersionUpdateBuilder::new(
DnsGroup::External,
format!("create silo: {:?}", silo_name),
format!("create silo: {:?}", silo_name.as_str()),
self.id.to_string(),
);
dns_update.add_name(silo_dns_name(silo_name), dns_records)?;
Expand Down
2 changes: 1 addition & 1 deletion nexus/src/app/silo.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl super::Nexus {
let silo_name = &new_silo_params.identity.name;
let mut dns_update = DnsVersionUpdateBuilder::new(
DnsGroup::External,
format!("create silo: {:?}", silo_name),
format!("create silo: {:?}", silo_name.as_str()),
self.id.to_string(),
);
dns_update.add_name(silo_dns_name(silo_name), dns_records)?;
Expand Down
1 change: 1 addition & 0 deletions omdb/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ humantime.workspace = true
nexus-client.workspace = true
nexus-db-model.workspace = true
nexus-db-queries.workspace = true
nexus-types.workspace = true
omicron-common.workspace = true
# See omicron-rpaths for more about the "pq-sys" dependency.
pq-sys = "*"
Expand Down
Loading

0 comments on commit 44dc1f0

Please sign in to comment.