From 4e4adb69dc6dd06652dc4a55f0fa139d42d0eade Mon Sep 17 00:00:00 2001 From: Aviram Hassan Date: Thu, 28 Nov 2024 23:54:08 +0200 Subject: [PATCH] Fix race condition with container run caused by regression (#2945) * .. * Fix race condition with container run caused by regression --- changelog.d/2944.fixed.md | 1 + mirrord/cli/src/container.rs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelog.d/2944.fixed.md diff --git a/changelog.d/2944.fixed.md b/changelog.d/2944.fixed.md new file mode 100644 index 00000000000..f5bf0cfb1b7 --- /dev/null +++ b/changelog.d/2944.fixed.md @@ -0,0 +1 @@ +Fix race condition with container run caused by regression diff --git a/mirrord/cli/src/container.rs b/mirrord/cli/src/container.rs index 1a2afa27a76..0b5042a65ac 100644 --- a/mirrord/cli/src/container.rs +++ b/mirrord/cli/src/container.rs @@ -435,7 +435,9 @@ pub(crate) async fn container_command( .status() .await; - let _ = composed_config_file.close(); + if let Err(err) = composed_config_file.keep() { + tracing::warn!(?err, "failed to keep composed config file"); + } match runtime_command_result { Err(err) => {