-
Notifications
You must be signed in to change notification settings - Fork 363
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
Use blivet's "device ID" as a unique device identifier #5435
Use blivet's "device ID" as a unique device identifier #5435
Conversation
Hello @vojtechtrefny! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:
Comment last updated at 2024-07-31 12:52:41 UTC |
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.
Looks good to me code wise, but I'm afraid I can't really judge the full context of this change in regards to Blivet & Web UI. :P
804ac0b
to
8dba5f2
Compare
If I create biosboot partition, boot partition and btrfs volume with a subvolume in terminal:
Then rescan the storage, go to mount points assignment, assign the partitions with reformatting I get failure in:
I think it happens because the recreated subvolume is not found here: It used to work (at least got past this point as I checked) but I am not 100% sure my use case makes sense. (Maybe the issue is that the volume is recreated as well because the only subvolume is destroyed so the uuids are new?) |
Yes, the issue here seems that if the volume is destroyed together with the subvolume and then recreated, finding the subvolume by device_id containing uuid of the former subvolume fails. I don't hit the issue if the volume contains 2 subvolumes and I reformat one of them in mount point assignment. I'll update the webui tests for this PR, add a test for this specific case. |
@rvykydal I've added a new commit that should fix this issue. |
Thank you, I have just a few nitpicks. |
pyanaconda/modules/storage/partitioning/manual/manual_partitioning.py
Outdated
Show resolved
Hide resolved
pyanaconda/modules/storage/partitioning/manual/manual_partitioning.py
Outdated
Show resolved
Hide resolved
537b079
to
ffd316a
Compare
ffd316a
to
98db250
Compare
This PR is stale because it has been open 60 days with no activity. |
98db250
to
3270ab2
Compare
3270ab2
to
2f1b9a3
Compare
3b6955b
to
c107e89
Compare
651f24c
to
922df8c
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.
Should be mark in the specfile tha tthis current anaconda-core is incomptatible with the current version of the Web UI package?
tests/unit_tests/pyanaconda_tests/modules/storage/test_module_storage.py
Show resolved
Hide resolved
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.
Looks good to me.
922df8c
to
9176e7d
Compare
Anaconda currently uses name to identify devices internally which causes a lot of problems because multiple devices can share the same name. To fix this blivet introduced a new "device ID" which is unique even for devices with the same name (for technologies that support multiple devices with the same name and for devices sharing the same name but using a different storage technology).
We can't use the device factory in the manual partitioning because when it removes the last subvolume it also removes the volume which want to keep untouched when just recreating the subvolume.
We want to show device name (or description) in the reclaim space dialog but use the unique device ID internally.
This should cover all places where name was used as device identifier in the storage, advanced storage and custom spokes.
9176e7d
to
2489951
Compare
/kickstart-test --testtype smoke |
We use destroy only for plain partition mountpoints as we can't destroy lv or btrfs subvolume - it would not free space for the new one (and its vg or btrfs volume). For lvs and btrfs subvols we reuse reformat from mount point assignment (real erase would be perhaps better, even for mount point assignment as recreating the device complicates the logic) TODO: + unify biosboot partition with other stuff (configurable) + look at all roots + test with plain + test with lvm + test with thin lvm + --remove should fail silently? - kickstart support (--erase --reuse --remove) - kickstart tests - reuse fstab mount options (/home is missing compression) + add checks that the device found is unique (including biosboot/efi) - checks for recreate only on plain partition? - create check for usability of the /home reuse (for UI) - update unit tests - luks ? - efi partitions, we have only biosboot so far - update for device_id: rhinstaller#5435 - add better mount point assignment kickstart tests, we update code there (fedora, lvm, plain)
We use destroy only for plain partition mountpoints as we can't destroy lv or btrfs subvolume - it would not free space for the new one (and its vg or btrfs volume). For lvs and btrfs subvols we reuse reformat from mount point assignment (real erase would be perhaps better, even for mount point assignment as recreating the device complicates the logic) TODO: + unify biosboot partition with other stuff (configurable) + look at all roots + test with plain + test with lvm + test with thin lvm + --remove should fail silently? - kickstart support (--erase --reuse --remove) - kickstart tests - reuse fstab mount options (/home is missing compression) + add checks that the device found is unique (including biosboot/efi) - checks for recreate only on plain partition? - create check for usability of the /home reuse (for UI) - update unit tests - luks ? - efi partitions, we have only biosboot so far - update for device_id: rhinstaller#5435 - add better mount point assignment kickstart tests, we update code there (fedora, lvm, plain)
/build-image --live |
Images built based on commit 2489951:
Download the images from the bottom of the job status page. |
/build-image |
Images built based on commit 2489951:
Download the images from the bottom of the job status page. |
We use destroy only for plain partition mountpoints as we can't destroy lv or btrfs subvolume - it would not free space for the new one (and its vg or btrfs volume). For lvs and btrfs subvols we reuse reformat from mount point assignment (real erase would be perhaps better, even for mount point assignment as recreating the device complicates the logic) TODO: + unify biosboot partition with other stuff (configurable) + look at all roots + test with plain + test with lvm + test with thin lvm + --remove should fail silently? + kickstart support (--erase --reuse --remove) - kickstart tests - reuse fstab mount options (/home is missing compression) + add checks that the device found is unique (including biosboot/efi) - checks for recreate only on plain partition? - create check for usability of the /home reuse (for UI) - update unit tests - luks ? - efi partitions, we have only biosboot so far - update for device_id: rhinstaller#5435 - add better mount point assignment kickstart tests, we update code there (fedora, lvm, plain)
We use destroy only for plain partition mountpoints as we can't destroy lv or btrfs subvolume - it would not free space for the new one (and its vg or btrfs volume). For lvs and btrfs subvols we reuse reformat from mount point assignment (real erase would be perhaps better, even for mount point assignment as recreating the device complicates the logic) TODO: + unify biosboot partition with other stuff (configurable) + look at all roots + test with plain + test with lvm + test with thin lvm + --remove should fail silently? + kickstart support (--erase --reuse --remove) - kickstart tests - reuse fstab mount options (/home is missing compression) + add checks that the device found is unique (including biosboot/efi) - checks for recreate only on plain partition? - create check for usability of the /home reuse (for UI) - update unit tests - luks ? - efi partitions, we have only biosboot so far - update for device_id: rhinstaller#5435 - add better mount point assignment kickstart tests, we update code there (fedora, lvm, plain)
We use destroy only for plain partition mountpoints as we can't destroy lv or btrfs subvolume - it would not free space for the new one (and its vg or btrfs volume). For lvs and btrfs subvols we reuse reformat from mount point assignment (real erase would be perhaps better, even for mount point assignment as recreating the device complicates the logic) TODO: + unify biosboot partition with other stuff (configurable) + look at all roots + test with plain + test with lvm + test with thin lvm + --remove should fail silently? + kickstart support (--erase --reuse --remove) - kickstart tests - reuse fstab mount options (/home is missing compression) + add checks that the device found is unique (including biosboot/efi) - checks for recreate only on plain partition? - create check for usability of the /home reuse (for UI) - update unit tests - luks ? - efi partitions, we have only biosboot so far - update for device_id: rhinstaller#5435 - add better mount point assignment kickstart tests, we update code there (fedora, lvm, plain)
We use destroy only for plain partition mountpoints as we can't destroy lv or btrfs subvolume - it would not free space for the new one (and its vg or btrfs volume). For lvs and btrfs subvols we reuse reformat from mount point assignment (real erase would be perhaps better, even for mount point assignment as recreating the device complicates the logic) TODO: + unify biosboot partition with other stuff (configurable) + look at all roots + test with plain + test with lvm + test with thin lvm + --remove should fail silently? + kickstart support (--erase --reuse --remove) - kickstart tests - reuse fstab mount options (/home is missing compression) + add checks that the device found is unique (including biosboot/efi) - checks for recreate only on plain partition? - create check for usability of the /home reuse (for UI) - update unit tests - luks? .. same as mount-point-assignment ? - efi partitions, we have only biosboot so far + update for device_id: rhinstaller#5435 - add better mount point assignment kickstart tests, we update code there (fedora, lvm, plain)
We use destroy only for plain partition mountpoints as we can't destroy lv or btrfs subvolume - it would not free space for the new one (and its vg or btrfs volume). For lvs and btrfs subvols we reuse reformat from mount point assignment (real erase would be perhaps better, even for mount point assignment as recreating the device complicates the logic) TODO: + unify biosboot partition with other stuff (configurable) + look at all roots + test with plain + test with lvm + test with thin lvm + --remove should fail silently? + kickstart support (--erase --reuse --remove) - kickstart tests - reuse fstab mount options (/home is missing compression) + add checks that the device found is unique (including biosboot/efi) - checks for recreate only on plain partition? - create check for usability of the /home reuse (for UI) - update unit tests - luks? .. same as mount-point-assignment ? - efi partitions, we have only biosboot so far + update for device_id: rhinstaller#5435 - add better mount point assignment kickstart tests, we update code there (fedora, lvm, plain)
Anaconda currently uses name to identify devices internally which causes a lot of problems because multiple devices can share the same name. To fix this blivet introduced a new "device ID" which is unique even for devices with the same name (for technologies that support multiple devices with the same name and for devices sharing the same name but using a different storage technology).
This is not yet finished, but it should be usable for testing and further development on the WebUI side. The blivet change (storaged-project/blivet#1182) is merged but not yet released. Unit tests should be passing on this, I also tried running manual installation with mount point assignment in TUI and also running (most of) kickstart tests and everything seems to be working so far. The Gtk custom partitioning is not yet adjusted to this change but is somewhat working if you ignore the weird "names" displayed in the UI.