Hi there, On 02/20/2018 10:31 AM, Adrian Schröter wrote:
On Dienstag, 20. Februar 2018, 09:18:39 CET wrote Eike Waldt:
On Montag, 19. Februar 2018, 10:29:57 CET wrote Eike Waldt:
Hi there,
now that I figured out which repos to use and which rpms to build by hand, my kiwi build is stuck again... Again, I can repdoduce this at my local OBS instance and also on build.opensuse.org.
Something with creating lvs is broken. This config works fine on SLES12 kiwi builds.
<systemdisk name='local'> <volume name='@root' size='10240M'/> </systemdisk>
Sadly I also did not find any recent examples for a LVM scenario in any of you git repos (except for the schema docs, which tell me that this is right).
https://build.opensuse.org/package/show/home:waldt:branches:SUSE:Templates:I... https://build.opensuse.org/package/live_build_log/home:waldt:branches:SUSE:T...
[ 237s] [ DEBUG ]: 09:19:55 | EXEC: [pvcreate /dev/mapper/loop0p3] [ 237s] [ DEBUG ]: 09:19:55 | EXEC: [vgcreate local /dev/mapper/loop0p3] [ 237s] [ INFO ]: 09:19:55 | Creating volumes(ext4) [ 237s] [ DEBUG ]: 09:19:55 | EXEC: [du -s --apparent-size --block-size 1 /usr/src/packages/KIWI-oem/build/image-root] [ 238s] [ DEBUG ]: 09:19:55 | EXEC: [bash -c find /usr/src/packages/KIWI-oem/build/image-root | wc -l] [ 238s] [ INFO ]: 09:19:55 | --> volume LVRoot with 2680 MB [ 238s] [ DEBUG ]: 09:19:55 | EXEC: [lvcreate -L 2680 -n LVRoot local] [ 238s] [ DEBUG ]: 09:19:55 | EXEC: Failed with stderr: WARNING: Failed to connect to lvmetad. Falling back to device scanning. [ 238s] /dev/local/LVRoot: not found: device not cleared [ 238s] Aborting. Failed to wipe start of new LV. [ 238s] , stdout: (no output on stdout)
Have you check with kiwi developers? Because this looks more like a problem in kiwi or lvm tools in first place ... okay, maybe they rely now on some more running daemon, but I would check with them first. The kiwi dev told me that this is not a kiwi issue, but an issue with
On 02/19/2018 10:47 AM, Adrian Schröter wrote: the OBS worker.
https://github.com/SUSE/kiwi/issues/631
schaefi: "Oh and I see you build in obs, then it's clear. The obs workers do not support creating lvm devices You could report this to the obs team like I did some time ago. A possible solution could be to use kernel-default instead of kernel-obs-build for the obs worker (untested though).
instead is not an option, but you could try to add it additionly, if this is about missing kernel modules.
Just add
Support: kernel-default
to your project config to test.
I figured it out. To sum it up, udev is not running in the kvm build vm. As soon as it runs, the lvcreate commands go through and create e.g. /dev/mapper/local/root. To get udev running in the kvm build vm I had to do the following... - Add "VMInstall: udev libkmod2" to prjconf - udev is not enough, as it does not depend on missing libkmod2 - Patch /usr/lib/build/build-vm --- build-vm 2018-02-21 00:22:22.597466464 +0000 +++ build-vm.new.udev 2018-02-21 07:43:02.025211086 +0000 @@ -581,7 +581,8 @@ vm_start_statistics if test ! -e /dev/.udev ; then - echo "WARNING: udev not running, creating extra device nodes" + echo "WARNING: udev not running, trying to start it" + /sbin/udevd --daemon test -e /dev/fd || ln -sf /proc/self/fd /dev/fd test -e /etc/mtab || ln -sf /proc/mounts /etc/mtab fi Is this something that can be fixed for all of us (as the kiwi dev said, it's broken in OBS for all LVM builds) or is building lvm enabled kiwi images a corner case?
I think this can be setup in the prjconf" ^-- Would this help something, what do you think? Is there on equivalent to "VMInstall:" which I could use to get rid of "kernel-obs-build"?
do not get rid of it, since the modules need to match the kernel version.
schaefi: "yes none of osc build or build in obs can deal with lvm builds. For an unknown reason the device paths created by the lvm tools does not work inside of the chroot or worker environment from obs. I guess the kernel or the udev rules or a combination of both prevents that this works. You can try to just build with kiwi on the host instead of osc build and this under normal conditions works well as I also test this pretty often.
k, chroot might not work, but you could try
osc build --vm-type=kvm ...
But be aware the above mentioned issues for lvm also applies if you build from a "normal" host. The most annoying thing here is the lvmetad which I usually replace by a /usr/bin/true when I want to use the host as build host for lvm images (yes nasty but works)"
-- Eike Waldt Linux Consultant & Trainer Tel.: +49-175-7241189 Mail: waldt@b1-systems.de B1 Systems GmbH Osterfeldstraße 7 / 85088 Vohburg / http://www.b1-systems.de GF: Ralph Dehner / Unternehmenssitz: Vohburg / AG: Ingolstadt,HRB 3537