-
Notifications
You must be signed in to change notification settings - Fork 564
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
Fix load_devices() lsblk #2565
Fix load_devices() lsblk #2565
Conversation
Thanks for the fix, @codefiles the PR is in draft, is there anything left? |
After submitting I noticed that when a user has an existing btrfs partition and it is not mounted then Maybe using |
Looking at #1993 I'm wondering if archinstall was run multiple times? If a ISO gets booted and archinstall is run for the first time then this error shouldn't happen as all disks are most likely there and can be found without issues.
I didn't have time to play around with it, but could a potential wait for a couple of seconds before continuing resolve that problem? |
I wonder if enforcing a restart after a successful installation or at least preventing to run it multiple installations might be worth exploring? |
@svartkanin, in regards to the linked issue, I do not agree with your conclusions or suggestions but thanks. |
cf222a3
to
a76d996
Compare
I figured out how to reproduce the bug. I added an additional commit and with that the bug should be fixed. This is ready to be merged. |
Nicely done, was it tricky to reproduce the bug? |
From #2536 (comment) the traceback shows this bug happens during an lsblk call in
The function diff --git a/archinstall/lib/disk/device_handler.py b/archinstall/lib/disk/device_handler.py
index 8d38dbc8..6db3d94b 100644
--- a/archinstall/lib/disk/device_handler.py
+++ b/archinstall/lib/disk/device_handler.py
@@ -38,7 +38,8 @@ class DeviceHandler(object):
def __init__(self):
self._devices: Dict[Path, BDevice] = {}
- self.load_devices()
+ while True:
+ self.load_devices()
@property
def devices(self) -> List[BDevice]: With this patch I am able to produce the bug with the commit previous to this merge by executing archinstall and letting this loop run until the error is raised. It takes a relatively short amount of time till the error is raised. I then used that same process to check this pull request with a small addition. I used |
Fixes #1993