From 8be2853eac1dbf5484ab3038517833316898304e Mon Sep 17 00:00:00 2001 From: "Adam H. Leventhal" Date: Wed, 14 Aug 2024 22:33:34 -0700 Subject: [PATCH] cleanup --- .github/buildomat/jobs/deploy.sh | 3 +- Cargo.lock | 53 +------------------------------- Cargo.toml | 1 - clients/oxide-client/src/lib.rs | 1 + dns-server/Cargo.toml | 1 - dns-server/src/bin/dns-server.rs | 9 ------ dns-server/src/lib.rs | 1 + dns-server/tests/basic_test.rs | 1 + internal-dns/src/resolver.rs | 4 ++- nexus/src/app/external_dns.rs | 1 + smf/internal-dns/config.toml | 2 +- 11 files changed, 10 insertions(+), 67 deletions(-) diff --git a/.github/buildomat/jobs/deploy.sh b/.github/buildomat/jobs/deploy.sh index 95d81baf41..8820378e1c 100755 --- a/.github/buildomat/jobs/deploy.sh +++ b/.github/buildomat/jobs/deploy.sh @@ -13,8 +13,7 @@ #: "%/pool/ext/*/crypt/debug/global/oxide-sled-agent:default.log.*", #: "%/pool/ext/*/crypt/debug/oxz_*/oxide-*.log.*", #: "%/pool/ext/*/crypt/debug/oxz_*/system-illumos-*.log.*", -#: "!/pool/ext/*/crypt/debug/oxz_propolis-server_*/*.log.*", -#: "%/pool/ext/*/crypt/zone/oxz_internal_dns_*/root/var/tmp/trace" +#: "!/pool/ext/*/crypt/debug/oxz_propolis-server_*/*.log.*" #: ] #: skip_clone = true #: diff --git a/Cargo.lock b/Cargo.lock index 42a93057a7..16036b3cc9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2082,7 +2082,6 @@ dependencies = [ "thiserror", "tokio", "toml 0.8.19", - "tracing-subscriber", "uuid", ] @@ -5414,16 +5413,6 @@ version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "61807f77802ff30975e01f4f071c8ba10c022052f98b3294119f3e615d13e5be" -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - [[package]] name = "nu-ansi-term" version = "0.50.0" @@ -6619,12 +6608,6 @@ dependencies = [ "syn 1.0.109", ] -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - [[package]] name = "owo-colors" version = "4.0.0" @@ -8144,7 +8127,7 @@ dependencies = [ "crossterm 0.27.0", "fd-lock", "itertools 0.12.1", - "nu-ansi-term 0.50.0", + "nu-ansi-term", "serde", "strip-ansi-escapes", "strum", @@ -9136,15 +9119,6 @@ dependencies = [ "keccak", ] -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - [[package]] name = "shell-words" version = "1.1.0" @@ -10603,31 +10577,6 @@ dependencies = [ "valuable", ] -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "nu-ansi-term 0.46.0", - "sharded-slab", - "smallvec 1.13.2", - "thread_local", - "tracing-core", - "tracing-log", -] - [[package]] name = "trust-dns-proto" version = "0.22.0" diff --git a/Cargo.toml b/Cargo.toml index 63fb22b085..ebeed3c6fe 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -566,7 +566,6 @@ tokio-util = { version = "0.7.11", features = ["io", "io-util"] } toml = "0.8.19" toml_edit = "0.22.20" tough = { version = "0.17.1", features = [ "http" ] } -tracing-subscriber = "0.3.18" trybuild = "1.0.99" tufaceous = { path = "tufaceous" } tufaceous-lib = { path = "tufaceous-lib" } diff --git a/clients/oxide-client/src/lib.rs b/clients/oxide-client/src/lib.rs index 7068dcdb37..249ea18146 100644 --- a/clients/oxide-client/src/lib.rs +++ b/clients/oxide-client/src/lib.rs @@ -50,6 +50,7 @@ impl CustomDnsResolver { bind_addr: None, }); let mut resolver_opts = ResolverOpts::default(); + // Enable edns for potentially larger records resolver_opts.edns0 = true; let resolver = diff --git a/dns-server/Cargo.toml b/dns-server/Cargo.toml index 333b7b9514..b4516b8b77 100644 --- a/dns-server/Cargo.toml +++ b/dns-server/Cargo.toml @@ -33,7 +33,6 @@ tempfile.workspace = true thiserror.workspace = true tokio = { workspace = true, features = [ "full" ] } toml.workspace = true -tracing-subscriber.workspace = true uuid.workspace = true omicron-workspace-hack.workspace = true diff --git a/dns-server/src/bin/dns-server.rs b/dns-server/src/bin/dns-server.rs index 77a2f48604..9e8d098ee2 100644 --- a/dns-server/src/bin/dns-server.rs +++ b/dns-server/src/bin/dns-server.rs @@ -35,15 +35,6 @@ pub struct Config { #[tokio::main] async fn main() -> Result<(), anyhow::Error> { - std::fs::write("/var/tmp/trace", "xxx\n").unwrap(); - use tracing_subscriber::fmt::format::FmtSpan; - tracing_subscriber::fmt() - .with_thread_names(true) - .with_span_events(FmtSpan::ENTER) - .with_max_level(tracing_subscriber::filter::LevelFilter::TRACE) - .with_writer(std::fs::File::create("/var/tmp/trace").unwrap()) - .init(); - let args = Args::parse(); let config_file = &args.config_file; let config_file_contents = std::fs::read_to_string(config_file) diff --git a/dns-server/src/lib.rs b/dns-server/src/lib.rs index 3769e71489..8abd3b945e 100644 --- a/dns-server/src/lib.rs +++ b/dns-server/src/lib.rs @@ -171,6 +171,7 @@ impl TransientServer { bind_addr: None, }); let mut resolver_opts = ResolverOpts::default(); + // Enable edns for potentially larger records resolver_opts.edns0 = true; let resolver = TokioAsyncResolver::tokio(resolver_config, resolver_opts); diff --git a/dns-server/tests/basic_test.rs b/dns-server/tests/basic_test.rs index b7075d09fa..fa5bfea468 100644 --- a/dns-server/tests/basic_test.rs +++ b/dns-server/tests/basic_test.rs @@ -383,6 +383,7 @@ async fn init_client_server( bind_addr: None, }); let mut resolver_opts = ResolverOpts::default(); + // Enable edns for potentially larger records resolver_opts.edns0 = true; let resolver = TokioAsyncResolver::tokio(resolver_config, resolver_opts); diff --git a/internal-dns/src/resolver.rs b/internal-dns/src/resolver.rs index 4e4807a4aa..b3dadf16d2 100644 --- a/internal-dns/src/resolver.rs +++ b/internal-dns/src/resolver.rs @@ -57,6 +57,7 @@ impl Resolver { log: slog::Logger, ) -> Result { let (rc, mut opts) = hickory_resolver::system_conf::read_system_conf()?; + // Enable edns for potentially larger records opts.edns0 = true; let resolver = TokioAsyncResolver::tokio(rc, opts); @@ -83,6 +84,7 @@ impl Resolver { }); } let mut opts = ResolverOpts::default(); + // Enable edns for potentially larger records opts.edns0 = true; opts.use_hosts_file = false; opts.num_concurrent_reqs = dns_server_count; @@ -326,7 +328,7 @@ impl Resolver { // (1) it returns `IpAddr`'s rather than `SocketAddr`'s // (2) it doesn't actually return all the addresses from the Additional // section of the DNS server's response. - // See bluejekyll/hickory-dns#1980 + // See hickory-dns/hickory-dns#1980 // // (1) is not a huge deal as we can try to match up the targets ourselves // to grab the port for creating a `SocketAddr` but (2) means we need to do diff --git a/nexus/src/app/external_dns.rs b/nexus/src/app/external_dns.rs index 9e268a9a08..4732146ce2 100644 --- a/nexus/src/app/external_dns.rs +++ b/nexus/src/app/external_dns.rs @@ -31,6 +31,7 @@ impl Resolver { }); } let mut opts = ResolverOpts::default(); + // Enable edns for potentially larger records opts.edns0 = true; opts.use_hosts_file = false; // Do as many requests in parallel as we have configured servers diff --git a/smf/internal-dns/config.toml b/smf/internal-dns/config.toml index c7fdee546d..b090d3391e 100644 --- a/smf/internal-dns/config.toml +++ b/smf/internal-dns/config.toml @@ -5,7 +5,7 @@ request_body_max_bytes = 104857600 [log] # Show log messages of this level and more severe -level = "debug" +level = "info" mode = "file" path = "/dev/stdout" if_exists = "append"