fedora-copr / copr

RPM build system - upstream for https://copr.fedorainfracloud.org/
113 stars 61 forks source link

rpmbuilds: dynamically specify tmp_fs size #3408

Closed nikromen closed 2 months ago

nikromen commented 2 months ago

This allows us to specify tpm fs size to rpmbuild in order to be able to automatically generate its size for performance builders.

before merge (please review):

Fixes #3268

nikromen commented 2 months ago

"deployed" on dev and works

powerful: https://copr.stg.fedoraproject.org/coprs/g/copr/powerful-test/build/2918769/

normal: https://copr.stg.fedoraproject.org/coprs/nikromen/not-pulp/build/2918768/

powerful builders have 320GB volume (304 swap). (how do I confirm the max_fs size of 280gb?)

FrostyX commented 2 months ago

LGTM. The only thing worth pointing out is the hardcoded volume size numbers but I think it's fine.

praiskup commented 2 months ago

powerful builders have 320GB volume (304 swap). (how do I confirm the max_fs size of 280gb?)

On my system I run: mount | grep mock

mock_chroot_tmpfs on /var/lib/mock/fedora-40-x86_64-bootstrap/root type tmpfs (rw,relatime,seclabel,size=146800640k,nr_inodes=0,mode=755,inode64)
mock_chroot_tmpfs on /var/lib/mock/fedora-40-x86_64/root type tmpfs (rw,relatime,seclabel,size=146800640k,nr_inodes=0,mode=755,inode64)
mock_chroot_tmpfs on /var/lib/mock/fedora-rawhide-ppc64le-bootstrap/root type tmpfs (rw,relatime,seclabel,size=146800640k,nr_inodes=0,mode=755,inode64)
mock_chroot_tmpfs on /var/lib/mock/fedora-rawhide-ppc64le/root type tmpfs (rw,relatime,seclabel,size=146800640k,nr_inodes=0,mode=755,inode64)
mock_chroot_tmpfs on /var/lib/mock/fedora-39-ppc64le-bootstrap/root type tmpfs (rw,relatime,seclabel,size=146800640k,nr_inodes=0,mode=755,inode64)
mock_chroot_tmpfs on /var/lib/mock/fedora-41-x86_64-bootstrap/root type tmpfs (rw,relatime,seclabel,size=146800640k,nr_inodes=0,mode=755,inode64)
mock_chroot_tmpfs on /var/lib/mock/fedora-39-ppc64le/root type tmpfs (rw,relatime,seclabel,size=146800640k,nr_inodes=0,mode=755,inode64)
mock_chroot_tmpfs on /var/lib/mock/fedora-41-x86_64/root type tmpfs (rw,relatime,seclabel,size=146800640k,nr_inodes=0,mode=755,inode64)
mock_chroot_tmpfs on /var/lib/mock/fedora-38-ppc64le-bootstrap/root type tmpfs (rw,relatime,seclabel,size=146800640k,nr_inodes=0,mode=755,inode64)
mock_chroot_tmpfs on /var/lib/mock/fedora-38-ppc64le/root type tmpfs (rw,relatime,seclabel,size=146800640k,nr_inodes=0,mode=755,inode64)
mock_chroot_tmpfs on /var/lib/mock/rhel+epel-9-ppc64le-bootstrap/root type tmpfs (rw,relatime,seclabel,size=146800640k,nr_inodes=0,mode=755,inode64)
mock_chroot_tmpfs on /var/lib/mock/rhel+epel-9-ppc64le/root type tmpfs (rw,relatime,seclabel,size=146800640k,nr_inodes=0,mode=755,inode64)

I believe the size=* mount argument is related.

praiskup commented 2 months ago

update resalloc cloud providers - https://github.com/fedora-copr/resalloc-ibm-cloud/pull/28

Not needed right now IMVHO, or has s390x support been requested?

nikromen commented 2 months ago

Not needed right now IMVHO, or has s390x support been requested?

this needs to be done for every arch that has on_demand_powerful supported - so even s390x

praiskup commented 2 months ago

this needs to be done for every arch that has on_demand_powerful supported - so even s390x

Not really, we can have different configurations for different architectures; but it seems the original requestor wanted to have support for all the architectures.

praiskup commented 2 months ago

Please provide the configuration file as %config(noreplace) in the RPM file, and self-document the option. Something like:

---
# Configure special mock configuration snippets per given set of tags.
#tags_to_mock_snippets:
#  - tags:
#      - on_demand_powerful
#      - arch_x86_64
#    snippet: |
#        config_opts['plugin_conf']['tmpfs_opts']['max_fs_size'] = '140g'
praiskup commented 2 months ago

This is in a good shape, thank you for the update! Two small things that would make it perfect :) but basically good to go.

praiskup commented 2 months ago

Fun -> I thought we had broken Fedora Copr! But the testsuite hangs on tests/test_base.py::TestProvider::test_create_rpmmacros for some reason (and eats more and more memory till it fails).