-
Notifications
You must be signed in to change notification settings - Fork 54
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
Add support for docker containers as children #441
Conversation
18aa10b
to
87ab5e8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delayed response. Internally we are looking at creating a separate LayerFilesystem
(name pending :)) that can be used independent of the RootFilesystem
. Which is a different direction of what this PR is trying to achieve, since it builds on top of the RootFilesystem
.
The benefit of having a separate LayerFilesystem
is that it would give us the ability to more cleanly map files to different paths in loaders, instead of how it is done currently.
In order to accomplish this, we need to do some refactoring of the current VirtualFilesystem
implementation, too able to use layers. After that we are going to look and see if that approach is what we want.
With that said, I think the best course of action would be to keep this PR open (unmerged). So that improvements can still be made and be used by other users, until we decided on how to move forward with this.
Thanks for the consideration @Horofic. In the meantime, could you review the new log parsing functions in this PR? I can split the children functionality in a separate PR if needed. |
Can you split that into a different PR, please? That would aid the review, and likely get that merged in sooner! |
introduces dependency on fox-it#507.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #441 +/- ##
==========================================
- Coverage 74.02% 74.00% -0.02%
==========================================
Files 285 287 +2
Lines 23578 23627 +49
==========================================
+ Hits 17454 17486 +32
- Misses 6124 6141 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
@Horofic Can you share any update in regards to this PR and/or the |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #441 +/- ##
==========================================
+ Coverage 75.05% 75.09% +0.04%
==========================================
Files 288 291 +3
Lines 24588 24700 +112
==========================================
+ Hits 18454 18549 +95
- Misses 6134 6151 +17
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
In light of #575 it might be nice to base this on top of that. Additionally, I think any logic that is currently in the loader should be transferred to a Other thought I had was if our current "overlay filesystem" behaves 1:1 with overlay2? Is there no additional logic necessary to deal with edge cases from overlay2? Something like deleted files, for example. I'm not sure if I ever wrote this on GitHub before, but we plan to migrate to a "DirectoryEntry" kind of approach in the future, where concepts like deleted files can more easily be integrated. It might be fine to ignore dealing with deleted files for now in overlay2, but and keep that as something to deal with in the future. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Last small bits, good to go after.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you check why the tests are failing? I think it may have to do with the change in dir.py
.
Two things break the tests:
I believe we previously reported |
After some experimentation I've decided to revert the I'll take a look at the 3.9 behavior. |
Thanks for looking into this.
Unfortunately this will break the overlay filesystem implementation as
|
Tried to do a ninja edit but you beat me to it. I noticed the failure too, but I still think the |
Perhaps we need an |
Unfortunately that doesn't solve the underlying problem that |
The failing 3.9 tests might be related to these issues: https://bugs.python.org/issue41511, https://bugs.python.org/issue21041 (and this fix in 3.10: https://github.com/python/cpython/pull/21799/files#diff-fa525485738fc33d05b06c159172ff1f319c26e88d8c6bb39f7dbaae4dc4105cR636). |
Nice, that was indeed it. I've backported a fix for 3.9. |
This PR adds child target support to Dissect for docker containers and depends on #507.
To demonstrate:
Commands such as
target-shell
'senter
also work when provided the path to the overlay2 mount folder.Uses the
LayerFilesystem
functionality of #575 to map every overlay2 layer on top of each other in a singleOverlay2Filesystem
. Deleted or moved files will still exist in the final reconstructed filesystem.