-
Notifications
You must be signed in to change notification settings - Fork 18
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
Make JAILER_BASE_DIR dependend on execution root #481
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
github-actions
bot
added
the
BLACK
This PR has critical implications and must be reviewed by a senior engineer.
label
Nov 22, 2023
hoh
reviewed
Nov 22, 2023
I had the impression this path variable wasn't seems to be used
consistantly, I.e. we using depending wether we use jailer or not. So doing
it this way I feel this is more flexible for latter refactor.
Le mer. 22 nov. 2023, 11:04, Hugo Herter ***@***.***> a
écrit :
… ***@***.**** commented on this pull request.
------------------------------
In src/aleph/vm/hypervisors/firecracker/microvm.py
<#481 (comment)>:
> @@ -95,9 +94,13 @@ def __str__(self):
return f"vm-{self.vm_id}"
@Property
- def namespace_path(self):
+ def jailer_base_directory(self) -> Path:
+ return self.execution_root_folder / "jailer"
Why use this approach instead of building this path in the settings ?
—
Reply to this email directly, view it on GitHub
<#481 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAUERCZ7S3SQ36OSGUX323YFXEZTAVCNFSM6AAAAAA7V5QXQ6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTONBUGAYDKNBTGM>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
I'm pondering if we should just make a directory per VM and just pass it to
the MicroVm under the principle that that class won't make any
modifications on disk outside of it. What do you think?
Le mer. 22 nov. 2023, 17:57, Olivier Le Thanh Duong ***@***.***> a
écrit :
… I had the impression this path variable wasn't seems to be used
consistantly, I.e. we using depending wether we use jailer or not. So doing
it this way I feel this is more flexible for latter refactor.
Le mer. 22 nov. 2023, 11:04, Hugo Herter ***@***.***> a
écrit :
> ***@***.**** commented on this pull request.
> ------------------------------
>
> In src/aleph/vm/hypervisors/firecracker/microvm.py
> <#481 (comment)>:
>
> > @@ -95,9 +94,13 @@ def __str__(self):
> return f"vm-{self.vm_id}"
>
> @Property
> - def namespace_path(self):
> + def jailer_base_directory(self) -> Path:
> + return self.execution_root_folder / "jailer"
>
> Why use this approach instead of building this path in the settings ?
>
> —
> Reply to this email directly, view it on GitHub
> <#481 (review)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAAUERCZ7S3SQ36OSGUX323YFXEZTAVCNFSM6AAAAAA7V5QXQ6VHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTONBUGAYDKNBTGM>
> .
> You are receiving this because you authored the thread.Message ID:
> ***@***.***>
>
|
After discussion with @nesitor did the modification with the settings approach |
nesitor
approved these changes
Nov 23, 2023
hoh
reviewed
Nov 23, 2023
it was hardcoded before on /var/lib/aleph so it wasn't respecting the proper user settings and was failling if the user didn't have the correct permission for this folder and was producing warning
hoh
force-pushed
the
olethanh-jail-respect-execution-root-settings
branch
from
November 24, 2023 11:38
e8785cd
to
08ba8aa
Compare
hoh
pushed a commit
that referenced
this pull request
Mar 12, 2024
Make JAILER_BASE_DIR dependend on execution root it was hardcoded before on /var/lib/aleph so it wasn't respecting the proper user settings and was failling if the user didn't have the correct permission for this folder and was producing warning Pass the settings to MicroVM instead of importing it so this module can stay separate
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
it was hardcoded before on /var/lib/aleph so it wasn't respecting the proper user settings and was failling if the user didn't have the correct permission for this folder and was producing warning