From 4dc044bcaecadea44c75500ea8056b167542a922 Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Oct 12 2023 16:21:06 +0000 Subject: copr-be: relax SWAP check if we have enough memory The large instances discussed here https://github.com/fedora-copr/copr/issues/2241 have large RAM memory segments, and no default disks. So we don't pay attention to have additional volumes explicitly just for swap. --- diff --git a/roles/copr/backend/files/provision/provision_builder_tasks.yml b/roles/copr/backend/files/provision/provision_builder_tasks.yml index a2babb0..dc064ac 100644 --- a/roles/copr/backend/files/provision/provision_builder_tasks.yml +++ b/roles/copr/backend/files/provision/provision_builder_tasks.yml @@ -236,11 +236,11 @@ gather_subset: - hardware -- name: Make sure that at least 135G of swap is available +- name: Make sure that we have 140G memory or SWAP for Mock caches assert: that: - - ansible_memory_mb.swap.free >= 1024 * 135 - fail_msg: "Swap is not available, the builder is unusable" - success_msg: "Swap seems to be available for this builder" + - ansible_memory_mb.swap.free + ansible_memory_mb.real.free >= 1024 * 140 + fail_msg: "Not enough memory+swap, the builder is unusable" + success_msg: "Builder has enough memory/swap!" when: - prepare_base_image is not defined