Skip to content

Conversation

@olethanh
Copy link
Collaborator

…separate partion

The prepare step for jailer was failing because it couldn't create a link to rootfs file when the CACHE and EXECUTION were not on the same partition

This was due do trying to make a hardlink instead of as soft symlink (contrary to what the docstring indicated)

Solution: Make a symlink

…separate partion

The prepare step for jailer was failing because it couldn't create a link to rootfs file
when the CACHE and EXECUTION were not on the same partition

This was due do trying to make a hardlink instead of as soft symlink (contrary to what the docstring indicated)

Solution: Make a symlink
@codecov
Copy link

codecov bot commented Aug 23, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 5 lines in your changes missing coverage. Please review.

Project coverage is 61.31%. Comparing base (0b4fbfd) to head (35f6227).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
src/aleph/vm/hypervisors/firecracker/microvm.py 16.66% 5 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #682      +/-   ##
==========================================
- Coverage   61.43%   61.31%   -0.12%     
==========================================
  Files          68       68              
  Lines        5985     5990       +5     
  Branches      632      634       +2     
==========================================
- Hits         3677     3673       -4     
- Misses       2155     2163       +8     
- Partials      153      154       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@hoh
Copy link
Member

hoh commented Aug 27, 2024

What would happen if the cache is cleared while a VM is working and using a file stored there then ?
With hardlinks, this would not be an issue since the file would still exist.

@olethanh
Copy link
Collaborator Author

After @nesitor feedback and more testing I have found a workaround: Do a copy if we can't do a link. Tested and it works properly

@olethanh
Copy link
Collaborator Author

What would happen if the cache is cleared while a VM is working and using a file stored there then ? With hardlinks, this would not be an issue since the file would still exist.

While the VM is working the file is open, and as long as a program has a fd to a file Linux won't actually delete it from the disk so it isn't a problem. But anyway we don't use a symlink anymore

@olethanh olethanh requested a review from nesitor September 2, 2024 06:32
@olethanh olethanh closed this Sep 2, 2024
olethanh added a commit that referenced this pull request Oct 17, 2024
…arate partions

Jira Ticket ALEPH-238

Similar issue to #682
That was merged inside #686

We have fixed a variation of this alread but this one triggered for additional volumes only

Explanation:
The prepare step for jailer is failing because it attempt create a hardlink to a file between the CACHE and EXECUTION dir which is not allowed between separate partition

Solution: Make a hardlink
Similiarly to the previous resolution, we cannot make a symlink as it
is not accessible inside the jailer enclave
nesitor pushed a commit that referenced this pull request Oct 17, 2024
#711)

FirecrackerVM drive not working if /var/lib and /var/cache on two separate partions

Jira Ticket ALEPH-238

Similar issue to #682
That was merged inside #686

We have fixed a variation of this alread but this one triggered for additional volumes only

Explanation:
The prepare step for jailer is failing because it attempt create a hardlink to a file between the CACHE and EXECUTION dir which is not allowed between separate partition

Solution: Make a hardlink
Similiarly to the previous resolution, we cannot make a symlink as it
is not accessible inside the jailer enclave
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.

4 participants