-
Notifications
You must be signed in to change notification settings - Fork 38
Infer path of bootbanks #255
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
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #255 +/- ##
=======================================
Coverage 44.89% 44.89%
=======================================
Files 26 26
Lines 3535 3535
=======================================
Hits 1587 1587
Misses 1948 1948
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
acquire/acquire.py
Outdated
| if dir_path.is_symlink() and dir_path.exists(): | ||
| dst = dir_path.readlink() | ||
| fs = dst.get().top.fs | ||
| fs = dst.get().entries.top.fs |
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.
I don´t see this pattern being used anywhere else for getting the underlying fs, which is giving me some pause.
I wonder what the canonical method is. The semantics of top (and entries) is a bit unclear to me.
The algorithm here is to deduplicate bootbanks based on the filesystem they are on.
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.
dir_path.samefile should be used.
acquire/acquire.py
Outdated
| if dir_path.is_symlink() and dir_path.exists(): | ||
| dst = dir_path.readlink() | ||
| fs = dst.get().top.fs | ||
| fs = dst.get().entries.top.fs |
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.
dir_path.samefile should be used.
acquire/acquire.py
Outdated
|
|
||
| for _, mountpoint, uuid, _ in iter_esxi_filesystems(target): | ||
| for bootbank_path, boot_vol in boot_fs: | ||
| if bootbank_path.samefile(mountpoint): |
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.
samefile doesn't work as intended with a string path yet. The issue is described here: fox-it/dissect.target#1289
bootbank_path.samefile(target.fs.path(mountpoint)) does not give that issue, besides for python3.9. The _accessor is still missing.
Close #204