[opensuse-buildservice] KVM worker setup
Hi, how do I need to configure an OBS worker to use KVM instead of a chroot? I checked the documentation but did not find information about that topic. I tried the following settings in /etc/sysconfig/obs-server and restarted the obsworker: OBS_VM_TYPE="kvm" OBS_VM_KERNEL="/boot/vmlinuz" OBS_VM_INITRD="/boot/initrd" OBS_VM_DISK_AUTOSETUP_ROOT_FILESIZE="4096" OBS_VM_DISK_AUTOSETUP_SWAP_FILESIZE="1024" OBS_VM_DISK_AUTOSETUP_FILESYSTEM="ext4" OBS_VM_DISK_AUTOSETUP_MOUNT_OPTIONS="" OBS_VM_USE_TMPFS="no" OBS_VM_CUSTOM_OPTION="" The OBS_WORKER_* settings are empty, I don't know what they are about. The WebUI tells me "scheduled" with overlay "waiting for <n> compliant workers <n> of them are bad". In screen -x I see fetching sources, packages, building... VM_ROOT: /mnt/ramdisk/obs/worker/root_1/root, VM_SWAP: /mnt/ramdisk/obs/worker/root_1/swap Creating /mnt/ramdisk/obs/worker/root_1/root (4096M) 0+0 records in 0+0 records out 0 bytes copied, 2.8003e-05 s, 0.0 kB/s fallocate: fallocate failed: No space left on device (the path is actually not a ramdisk, just an ordinary file system, everything there belongs to root who is also owner of the obsworker processes and there are 80GB disk free). I also see the following messages: send_state http://<myserver>: 404 remote error: Not Found They even appear when I use the build chroot configuration (which works so far - unless packages use ports in the %check section and collide with other build instances). Best regards, Mark -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Hello Mark,
On Monday, 16 September, 2019 at 08:11 PM, Morschhäuser, Mark <Mark.Morschhaeuser@dsa.de> wrote: Hi,
how do I need to configure an OBS worker to use KVM instead of a chroot? I checked the documentation but did not find information about that topic.
This is what I have been doing: # grep -v -e "^$" -e "^#" -e '=""' /etc/sysconfig/obs-server ... OBS_VM_INITRD="none" OBS_VM_KERNEL="none" OBS_VM_TYPE="auto" ... (/etc/init.d/obsworker will check availability of XEN or KVM if OBS_VM_TYPE is set to "auto") Then I install KVM (especially, qemu-kvm) on the worker and make sure the kernel modules are loaded at boot. When the worker starts with KVM as the sandbox. Regards, Srinidhi. -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
Hello Srinidhi, Am 18.09.19 um 08:15 schrieb Srinidhi B:
Hello Mark,
On Monday, 16 September, 2019 at 08:11 PM, Morschhäuser, Mark <Mark.Morschhaeuser@dsa.de> wrote: Hi,
how do I need to configure an OBS worker to use KVM instead of a chroot? I checked the documentation but did not find information about that topic.
This is what I have been doing:
# grep -v -e "^$" -e "^#" -e '=""' /etc/sysconfig/obs-server ... OBS_VM_INITRD="none" OBS_VM_KERNEL="none" OBS_VM_TYPE="auto" ...
(/etc/init.d/obsworker will check availability of XEN or KVM if OBS_VM_TYPE is set to "auto")
Then I install KVM (especially, qemu-kvm) on the worker and make sure the kernel modules are loaded at boot. When the worker starts with KVM as the sandbox.
where does the worker know which image to use for boot and build ???
Regards, Srinidhi.
-- Christian ------------------------------------------------------------ https://join.worldcommunitygrid.org?recruiterId=177038 ------------------------------------------------------------ http://www.sc24.de - Sportbekleidung ------------------------------------------------------------
Am 31.10.19 um 21:41 schrieb Christian:
where does the worker know which image to use for boot and build ???
check the dist/obsworker init script: if [ -n "$OBS_VM_KERNEL" -a "$OBS_VM_KERNEL" != "none" -a "$OBS_VM_TYPE" != "openstack" ] ; then OBS_WORKER_OPT="$OBS_WORKER_OPT --vm-kernel $OBS_VM_KERNEL" fi "--vm-kernel" is handled by src/backend/bs_worker and just passed on to build.rpm's /usr/bin/build If --vm-kernel is not passed to build, then it does some magic. (all following applies to KVM x86/x86_64 build, have not looked at all the other places) If available, it will use the kernel and initrd from kernel-obs-build.rpm (this is why this package is VMInstall:'ed in all recent distributions). Else it will fall back to /boot/vmlinuz (which is the kernel of the obs worker host!). So this: OBS_VM_INITRD="none" OBS_VM_KERNEL="none" basically means "use the magic in /usr/bin/build to find a usable kernel". HTH, seife -- Stefan Seyfried "For a successful technology, reality must take precedence over public relations, for nature cannot be fooled." -- Richard Feynman -- To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-buildservice+owner@opensuse.org
participants (4)
-
Christian
-
Morschhäuser, Mark
-
Srinidhi B
-
Stefan Seyfried