From 6163c3565712aa9ab59ec43a2ddaecc9e4070e82 Mon Sep 17 00:00:00 2001 From: Wedson Almeida Filho Date: Thu, 20 Apr 2023 09:42:43 -0300 Subject: [PATCH] agent: skip mount options that start with "io.katacontainers." This is so that file systems don't fail when we pass kata-specific options from the snapshotter to kata. Fixes: #7536 Signed-off-by: Wedson Almeida Filho --- src/agent/src/mount.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/agent/src/mount.rs b/src/agent/src/mount.rs index d80aea4c6d..a6bf6b4ff2 100644 --- a/src/agent/src/mount.rs +++ b/src/agent/src/mount.rs @@ -813,10 +813,14 @@ fn parse_mount_flags_and_options(options_vec: Vec<&str>) -> (MsFlags, String) { } } None => { + if opt.starts_with("io.katacontainers.") { + continue; + } + if !options.is_empty() { options.push_str(format!(",{}", opt).as_str()); } else { - options.push_str(opt.to_string().as_str()); + options.push_str(opt); } } };