mirror of
https://github.com/kata-containers/kata-containers.git
synced 2026-01-25 22:54:29 +00:00
agent: Ensure MS_REMOUNT is respected
When updating ephemeral storages, MS_REMOUNT is explicitly passed as, for instance, `/dev/shm` should be remounted after memory is hotplugged. Till now Kata Containers has been explicitly ignoring such updates, leading to the containers' `/dev/shm` having the size of "half of the memory allocated, during the startup time", which goes against the expected behaviour. Signed-off-by: Fabiano Fidêncio <fidencio@northflank.com>
This commit is contained in:
committed by
Fabiano Fidêncio
parent
830d15d4c8
commit
fb326b53df
@@ -88,7 +88,7 @@ pub fn baremount(
|
||||
|
||||
let destination_str = destination.to_string_lossy();
|
||||
if let Ok(m) = get_linux_mount_info(destination_str.deref()) {
|
||||
if m.fs_type == fs_type {
|
||||
if m.fs_type == fs_type && !flags.contains(MsFlags::MS_REMOUNT) {
|
||||
slog_info!(logger, "{source:?} is already mounted at {destination:?}");
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user