diff --git a/mirrord/agent/src/steal/ip_tables/output.rs b/mirrord/agent/src/steal/ip_tables/output.rs index fa9c534d413..bd045166eb6 100644 --- a/mirrord/agent/src/steal/ip_tables/output.rs +++ b/mirrord/agent/src/steal/ip_tables/output.rs @@ -20,9 +20,11 @@ where { const ENTRYPOINT: &'static str = "OUTPUT"; - #[tracing::instrument(skip(ipt), level = "debug", ret)] // TODO: change to trace. + #[tracing::instrument(skip(ipt), level = tracing::Level::DEBUG)] // TODO: change to trace. pub fn create(ipt: Arc, chain_name: String, pod_ips: Option<&str>) -> Result { - let managed = IPTableChain::create(ipt, chain_name)?; + let managed = IPTableChain::create(ipt, chain_name.clone()).inspect_err( + |e| tracing::error!(%e, "Could not create iptables chain \"{chain_name}\"."), + )?; let exclude_source_ips = pod_ips .map(|pod_ips| format!("! -s {pod_ips}")) diff --git a/mirrord/agent/src/steal/ip_tables/prerouting.rs b/mirrord/agent/src/steal/ip_tables/prerouting.rs index 8eb7a78f954..71f835805ae 100644 --- a/mirrord/agent/src/steal/ip_tables/prerouting.rs +++ b/mirrord/agent/src/steal/ip_tables/prerouting.rs @@ -25,9 +25,11 @@ where Self::create(ipt, "INPUT") } - #[tracing::instrument(level = "debug", skip(ipt), ret)] + #[tracing::instrument(skip(ipt), level = tracing::Level::DEBUG)] // TODO: change to trace. pub fn create(ipt: Arc, chain_name: &'static str) -> Result { - let managed = IPTableChain::create(ipt, IPTABLE_PREROUTING.to_string())?; + let managed = IPTableChain::create(ipt, IPTABLE_PREROUTING.to_string()).inspect_err( + |e| tracing::error!(%e, "Could not create iptables chain \"{chain_name}\"."), + )?; Ok(PreroutingRedirect { managed, diff --git a/tests/src/utils.rs b/tests/src/utils.rs index 3d39176dfa5..1ca299fe02e 100644 --- a/tests/src/utils.rs +++ b/tests/src/utils.rs @@ -589,7 +589,7 @@ pub async fn run_exec( // base_env.insert("MIRRORD_AGENT_IMAGE", "test"); base_env.insert( "MIRRORD_AGENT_IMAGE", - "docker.io/t4lz/mirrord-agent:2024-12-30_1", + "docker.io/t4lz/mirrord-agent:2024-12-30_2", ); base_env.insert("MIRRORD_AGENT_TTL", "180"); // TODO: delete base_env.insert("MIRRORD_CHECK_VERSION", "false");