From 3ae02f9202b3305cc526b928c41d0562256c6f63 Mon Sep 17 00:00:00 2001 From: David Esparza Date: Thu, 13 Jul 2023 16:20:03 -0600 Subject: [PATCH] metrics: use rm -f to remove older continerd config file. In order to run kata metrics we need to check that the containerd config file is properly set. When this is not the case, we need to remove that file, and generate a valid one. This PR runs rm -f in order to ignore errors in case the file to delete does not exist. Fixes: #7336 Signed-off-by: David Esparza --- tests/common.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/common.bash b/tests/common.bash index ab1ee6d470..6eaf39c5be 100644 --- a/tests/common.bash +++ b/tests/common.bash @@ -257,7 +257,7 @@ function create_symbolic_links() { # Configures containerd function overwrite_containerd_config() { containerd_config="/etc/containerd/config.toml" - sudo rm "${containerd_config}" + sudo rm -f "${containerd_config}" sudo tee "${containerd_config}" << EOF version = 2 [plugins."io.containerd.grpc.v1.cri".containerd.runtimes.runc.options]