OSInside / kiwi

KIWI - Appliance Builder Next Generation
https://osinside.github.io/kiwi
GNU General Public License v3.0
300 stars 152 forks source link

Fix method ineffective #2561

Closed schaefi closed 4 months ago

schaefi commented 4 months ago

Make sure BootLoaderConfig fixes are effective

The BootLoaderConfigGrub2 class has methods to fix the grub-mkconfig generated files. It does that by mounting the system and changing the respective files after the mkconfig call. However, after the change the class instance stays open in combination with BootLoaderInstallGrub2 instance which itself under certain circumstances also mounts the system to call grub-install. At the time grub-install is called it cannot be guaranteed that all changes has been written unless an explicit umount in the BootLoaderConfigGrub2 class instance happened. This commit address the potential race condition.

schaefi commented 4 months ago

This needs to wait for the integration tests to pass

Conan-Kudo commented 4 months ago

Once the tests pass, I'll merge it.