Skip to content
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 libstorage-ng probing #10

Merged
merged 2 commits into from
Jul 28, 2022
Merged

Fix libstorage-ng probing #10

merged 2 commits into from
Jul 28, 2022

Conversation

ancorgs
Copy link
Contributor

@ancorgs ancorgs commented Jul 25, 2022

Problem

libstorage-ng probing didn't exactly work because it was not able to recognize it was running in a chroot. For example, the mount points were calculated with the full path from the host system (eg. /mnt/home).

Solution

Set rootprefix for libstorage-ng, so mount points and other aspects are calculated correctly thanks to the changes introduced recently at libstorage-ng like:

Related changes

For probing to work, the container must contain several basic tools. Almost for sure the package e2fsprogs will be needed since it includes the command lsattr. But apart from that, the lvm2 package is needed if LVM is used in the system, btrfsprogs is needed if there is some Btrfs file-system, and so on.

This adds a reasonable set of tools to the container images and is very likely needed for libstorage-ng probing to actually work:
https://build.opensuse.org/request/show/991060

Testing

Tested manually with modules like yast2-bootloader and yast2-kdump and with the Partitioner.

@jreidinger
Copy link
Member

In general code looks good, but if you want full list of needed software for now for storage, you can check list used in d-installer - basically starting with btrfstools https://build.opensuse.org/package/view_file/YaST:Head:Containers/d-installer-all/Dockerfile?expand=1

@ancorgs
Copy link
Contributor Author

ancorgs commented Jul 26, 2022

Regarding the needed tools for storage, I only added the minimal ones for a reasonable probing. If we want a libstorage-ng that is able to perform commit (which currently doesn't work) we will indeed need to add some extra tools. But maybe at that point we want to discuss whether it's better to have a separate container or something like this.

So I'm going intentionally step by step here.

@lslezak lslezak merged commit d2fc660 into yast:master Jul 28, 2022
@yast-bot
Copy link

✔️ Public Jenkins job #9 successfully finished

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.

4 participants