From 41deca1de9a17d40c9de0f47e5beb262b7fa9b6c Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Mon, 16 May 2022 17:14:17 +0200 Subject: [PATCH] copr-be-dev: start Power9 VMs with 4 CPUs --- roles/copr/backend/templates/provision/libvirt-new | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/roles/copr/backend/templates/provision/libvirt-new b/roles/copr/backend/templates/provision/libvirt-new index 0c472c414b..89882f9bf4 100755 --- a/roles/copr/backend/templates/provision/libvirt-new +++ b/roles/copr/backend/templates/provision/libvirt-new @@ -98,9 +98,14 @@ class LibvirtSpawner: playbook = "{{ provision_directory }}/libvirt-provision.yml" def __init__(self, resalloc_pool_id, log): - _, self.connection, self.arch = get_hv_identification_from_pool_id( + host_id, self.connection, self.arch = get_hv_identification_from_pool_id( resalloc_pool_id) + # The Power9 machine has not enough storage to host 2CPU/VM. Let's + # double the quote on CPU (at least for now). + if host_id in [6]: + cpu_count = 4 + self.workdir = tempfile.mkdtemp() self.script_path = os.path.dirname(os.path.realpath(__file__)) self.log = log