Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

vmm: fix tmpfs bind dir empty #138

Merged
merged 1 commit into from
Jul 23, 2024
Merged

Conversation

morningtzh
Copy link
Contributor

When the mounted hostpath is tmpfs or when mounting a secret, the container cannot access the data. These two types of mounts are tmpfs, and due to memory isolation between the host and the virtual machine, the virtual machine will reallocate tmpfs, resulting in empty data.

Fix:Except for empty dir allocated by memory, all other tmpfs are bind-mounted into the virtual machine.

@morningtzh morningtzh requested a review from a team as a code owner June 24, 2024 12:07
@morningtzh morningtzh force-pushed the fix-tmpfs branch 2 times, most recently from 79f0124 to 7fded46 Compare July 23, 2024 01:53
vmm/sandbox/src/storage/mod.rs Outdated Show resolved Hide resolved
When the mounted hostpath is tmpfs or when mounting a secret, the container cannot access the data. These two types of mounts are tmpfs, and due to memory isolation between the host and the virtual machine, the virtual machine will reallocate tmpfs, resulting in empty data.

Fix:Except for empty dir allocated by memory, all other tmpfs are bind-mounted into the virtual machine.

Signed-off-by: MorningTZH <morningtzh@yeah.net>
@Burning1020
Copy link
Member

LGTM

@Burning1020 Burning1020 merged commit bb47ca1 into kuasar-io:main Jul 23, 2024
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants