-
Notifications
You must be signed in to change notification settings - Fork 171
dracut kiwi-repart fixes #2861
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
dracut kiwi-repart fixes #2861
Conversation
The partition id metadata file is used in the kiwi-repart module. If a user wants to use the kiwi repart module permanently, this metadata file needs to stay in the system. Therefore it should not be automatically deleted by the cleanup. A disk.sh hook script can be used to force the deletion of the file though. This is related #2851
The kiwi-repart implementation requires a metadata file named config.partids which holds information about partition ids and more stored at the time the image was built. Depending on the complexity of the image and the resize request some of the information can be rebuilt in case the metadata file is missing. This commit adds the rebuild of the minimum required information to run a standard resize and therefore allows the kiwi-repart dracut module to work also without config.partids to be present in the system
Using sfdisk for relocation and verification makes this part more consistent. We also want to move away from gdisk. This is related to #2851
|
@uecasm some followup changes to the topic we also discussed on the forum I was not able to reproduce the issue you explained that after relocation of the backup header the warning still persists. Maybe you can give it a try too ? Thanks |
|
@Conan-Kudo please let us wait for feedback from @uecasm prior merge |
|
There are more issues, we need to udevadm lock certain operations to prevent clashes with udev. Expect another commit soon |
Several commands during repart, resize and other actions require a proper lock to be set for udev such that other events knows about the locked state of a device and do not mess with it until the command for which the lock persists has completed. This commit applies proper udev locks to all commands that requires it. In addition incorrect code that was expected to prevent such race conditions got dropped from the implementation. This is related to bsc#1242987
For testing a bit more complex resize procedure, update the lvm integration test to run more resize actions with required device locking
|
Did a Staging build with these changes and run some tests, for me things are working. |
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 👍
This change is many fold
extend integration test for testing more of the resize code
Use the lvm integration test as an example for a bit more complex resize testing
apply proper udev locking
Several commands during repart, resize and other actions require a proper lock to be set for udev such that other events knows about the locked state of a device and do not mess with it until the command for which the lock persists has completed. This commit applies proper udev locks to all commands that requires it. In addition incorrect code that was expected to prevent such race conditions got dropped from the implementation.
This is related to https://bugzilla.suse.com/show_bug.cgi?id=1242987#c124
relocate GPT at the end of disk using sfdisk
Using sfdisk for relocation and verification makes this part more consistent. We also want to move away from gdisk. This is related to #2851
Do not strictly require config.partids in repart
The kiwi-repart implementation requires a metadata file named config.partids which holds information about partition ids and more stored at the time the image was built. Depending on the complexity of the image and the resize request some of the information can be rebuilt in case the metadata file is missing. This commit adds the rebuild of the minimum required information to run a standard resize and therefore allows the kiwi-repart dracut module to work also without config.partids to be present in the system
Do not drop /config.partids
The partition id metadata file is used in the kiwi-repart module. If a user wants to use the kiwi repart module permanently, this metadata file needs to stay in the system. Therefore it should not be automatically deleted by the cleanup. A disk.sh hook script can be used to force the deletion of the file though. This is related #2851