From f2d06ecf670c8192acc84ae9d8b05514b4b5615a Mon Sep 17 00:00:00 2001 From: Ryan Houdek Date: Fri, 19 Nov 2021 15:35:42 -0800 Subject: [PATCH] RootFS: Keep rootfs around while in container For some reason the full container path isn't actually setup right now. Until this problem is resolved, keep the FEX rootfs configuration around. This lets applications still execute albeit still wrapped with the FEX rootfs rather than the container's --- Source/Common/RootFSSetup.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) diff --git a/Source/Common/RootFSSetup.cpp b/Source/Common/RootFSSetup.cpp index 9759ebae9..9b30c779d 100644 --- a/Source/Common/RootFSSetup.cpp +++ b/Source/Common/RootFSSetup.cpp @@ -221,12 +221,18 @@ bool Setup(char **const envp) { // If it is setup to use a squashfs then we need to do something more complex FEX_CONFIG_OPT(LDPath, ROOTFS); - auto ContainerPrefix = FEXCore::Config::FindContainerPrefix(); - if (!ContainerPrefix.empty()) { - // If we are inside of a rootfs/container then drop the rootfs path - // Root is already our rootfs - FEXCore::Config::Erase(FEXCore::Config::CONFIG_ROOTFS); - return true; + // XXX: Disabled for now. Causing problems due to weird filesystem problems + // Can reproduce by attempting to run an application under pressure-vessel + // Will fail once trying to jump in to the chroot with bwrap + // eg: FEXInterpreter ./run-in-soldier /usr/bin/ls + if constexpr (false) { + auto ContainerPrefix = FEXCore::Config::FindContainerPrefix(); + if (!ContainerPrefix.empty()) { + // If we are inside of a rootfs/container then drop the rootfs path + // Root is already our rootfs + FEXCore::Config::Erase(FEXCore::Config::CONFIG_ROOTFS); + return true; + } } if (FEX::FormatCheck::IsSquashFS(LDPath())) {