From 402bfe62152d5182608f74d651f18e13e1207450 Mon Sep 17 00:00:00 2001 From: Adam Williamson Date: Tue, 15 Dec 2015 11:30:13 -0800 Subject: [PATCH] openqa_server: use guestfs direct backend for creating disks this avoids the need to start and stop libvirtd. --- roles/openqa/server/tasks/main.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/roles/openqa/server/tasks/main.yml b/roles/openqa/server/tasks/main.yml index 2f0395f3ab..5f20cbac29 100644 --- a/roles/openqa/server/tasks/main.yml +++ b/roles/openqa/server/tasks/main.yml @@ -82,38 +82,42 @@ - /var/lib/openqa/share/factory/hdd - /var/lib/openqa/share/factory/repo -- name: Start libvirt service - service: name=libvirtd state=started - # NOTE: this is very hacky, but we can't do much better with the current # disk creation script, I will try and make it better. We'll have to bump -# this hardcoded release number every so often. +# this hardcoded release number every so often. Much better createhdds +# is in review: https://phab.qadevel.cloud.fedoraproject.org/D687 +# LIBGUESTFS_BACKEND is to avoid the need to run libvirt just for this - name: Create hard disk images (this may take a long time!) command: "/root/openqa_fedora_tools/tools/createhdds.sh 23" args: creates: /var/lib/openqa/share/factory/hdd/disk_full_mbr.img chdir: /var/lib/openqa/share/factory/hdd/ + environment: + LIBGUESTFS_BACKEND: direct - name: Create N-2 desktop x86_64 disk image (this may take a long time!) command: "/root/openqa_fedora_tools/tools/createhdds.sh 22 desktop_64bit" args: creates: /var/lib/openqa/share/factory/hdd/disk_f22_desktop_x86_64.img chdir: /var/lib/openqa/share/factory/hdd/ + environment: + LIBGUESTFS_BACKEND: direct - name: Create N-2 desktop i686 disk image (this may take a long time!) command: "/root/openqa_fedora_tools/tools/createhdds.sh 22 desktop_32bit" args: creates: /var/lib/openqa/share/factory/hdd/disk_f22_desktop_i686.img chdir: /var/lib/openqa/share/factory/hdd/ + environment: + LIBGUESTFS_BACKEND: direct - name: Create N-2 minimal x86_64 disk image (this may take a long time!) command: "/root/openqa_fedora_tools/tools/createhdds.sh 22 minimal_64bit" args: creates: /var/lib/openqa/share/factory/hdd/disk_f22_minimal_x86_64.img chdir: /var/lib/openqa/share/factory/hdd/ - -- name: Stop libvirt service - service: name=libvirtd state=stopped + environment: + LIBGUESTFS_BACKEND: direct - name: Create exports file copy: src=exports dest=/etc/exports.d/openqa.exports owner=root group=root mode=0644