Skip to content

Conversation

@schaefi
Copy link
Collaborator

@schaefi schaefi commented Jul 17, 2025

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

schaefi added 3 commits July 17, 2025 10:37
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
@schaefi schaefi self-assigned this Jul 17, 2025
@schaefi
Copy link
Collaborator Author

schaefi commented Jul 17, 2025

@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

@schaefi
Copy link
Collaborator Author

schaefi commented Jul 17, 2025

@Conan-Kudo please let us wait for feedback from @uecasm prior merge

@schaefi
Copy link
Collaborator Author

schaefi commented Jul 17, 2025

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
@schaefi schaefi requested a review from davidcassany July 17, 2025 10:57
For testing a bit more complex resize procedure, update
the lvm integration test to run more resize actions
with required device locking
@schaefi
Copy link
Collaborator Author

schaefi commented Jul 17, 2025

Did a Staging build with these changes and run some tests, for me things are working.

Copy link
Collaborator

@davidcassany davidcassany left a 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 👍

@schaefi schaefi merged commit b1116bd into main Jul 18, 2025
14 checks passed
@schaefi schaefi deleted the repart_fixes branch July 18, 2025 11:59
paolo-depa added a commit to paolo-depa/kiwi that referenced this pull request Oct 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants