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.
This commit is contained in:
Pavel Raiskup 2023-10-12 18:21:06 +02:00
parent 9204908652
commit 4dc044bcae

View file

@ -236,11 +236,11 @@
gather_subset: gather_subset:
- hardware - 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: assert:
that: that:
- ansible_memory_mb.swap.free >= 1024 * 135 - ansible_memory_mb.swap.free + ansible_memory_mb.real.free >= 1024 * 140
fail_msg: "Swap is not available, the builder is unusable" fail_msg: "Not enough memory+swap, the builder is unusable"
success_msg: "Swap seems to be available for this builder" success_msg: "Builder has enough memory/swap!"
when: when:
- prepare_base_image is not defined - prepare_base_image is not defined