Accepting request 1095504 from home:tserong:branches:filesystems:ceph
- Remove _constraints file, add README-constraints.txt and pre_checkin.env OBS-URL: https://build.opensuse.org/request/show/1095504 OBS-URL: https://build.opensuse.org/package/show/filesystems:ceph/ceph?expand=0&rev=347
This commit is contained in:
parent
2de59afc34
commit
69d2544357
@ -23,9 +23,3 @@ files for Ceph would be tricky, error-prone, and labor-intensive.
|
||||
|
||||
Nathan Cutler
|
||||
April 17, 2017
|
||||
|
||||
|
||||
Addendum: ceph-test also requires more disk space to build than ceph.
|
||||
The pre_checkin.sh script writes #!BuildConstraint lines to both spec
|
||||
files to set things up correctly. See the comments in _constraints for
|
||||
more details.
|
||||
|
31
README-constraints.txt
Normal file
31
README-constraints.txt
Normal file
@ -0,0 +1,31 @@
|
||||
2023-06-13 - Tim Serong <tserong@suse.com>
|
||||
|
||||
Ceph needs plenty of disk space and RAM in order to build. To set
|
||||
minimum requirements for these, we're using #!BuildConstraint directives
|
||||
in ceph.spec and ceph-test.spec. We were previously using a _constraints
|
||||
file, but this was shown to not always work correctly with _multibuild.
|
||||
For more information about #!BuildConstraint directives see
|
||||
https://github.com/openSUSE/obs-docu/pull/285, and in particular Darix's
|
||||
comment that you shouldn't mix _constraints and #!BuildConstraint.
|
||||
|
||||
The #!BuildConstraint directives are added to the spec files automatically
|
||||
by the pre_checkin.sh script. If the disk and memory constraints need to
|
||||
be changed in future, adjust the variables in the pre_checkin.env file and
|
||||
re-run pre_checkin.sh.
|
||||
|
||||
The current constraints are based on builds of ceph 16.2.7 on build.suse.de,
|
||||
which showed the following resource usage (in MB):
|
||||
|
||||
ceph aarch64 max disk: 41568 max mem: 13698 (on ibs-centriq-6:3 disk: 65536 mem: 18432)
|
||||
ceph x86_64 max disk: 41621 max mem: 9852 (on sheep74:2 disk: 51200 mem: 12500)
|
||||
ceph ppc64le max disk: 42005 max mem: 8754 (on ibs-power9-10:1 disk: 61440 mem: 20480)
|
||||
ceph s390x max disk: 40698 max mem: 8875 (on s390zl36:1 disk: 51200 mem: 10240)
|
||||
ceph-test x86_64 max disk: 51760 max mem: 16835 (on sheep94:2 disk: 112640 mem: 16384)
|
||||
|
||||
Based on the above, and to hopefully provide a little wiggle room for
|
||||
the future while at the same time not being too demanding of workers,
|
||||
the minimum disk size is 50GB for ceph and 60GB for ceph-test. Memory
|
||||
requirements remain at 8GB and 10GB respectively as they were before I
|
||||
did the above tests - despite the memory usage shown above, AFAIK we
|
||||
haven't run out of memory during builds, and this keeps the pool of
|
||||
possible workers noticeably larger than it would be if we required 16GB.
|
72
_constraints
72
_constraints
@ -1,72 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<constraints>
|
||||
|
||||
<sandbox>kvm</sandbox>
|
||||
|
||||
<!--
|
||||
|
||||
2023-05-23 - Tim Serong <tserong@suse.com>
|
||||
|
||||
The <overwrite><conditions><package>... construct only works for
|
||||
standalone packages in the build service. This was fine when ceph-test
|
||||
existed as a _link back to ceph. Now that we're using _multibuild to
|
||||
build ceph-test, the constraints specified in this file can't be applied
|
||||
correctly to ceph-test anymore, so I've removed them from this file in
|
||||
favour of "#!BuildConstraint" directives in the spec files.
|
||||
|
||||
This _constraints file remains as a source of documentation. If the
|
||||
disk and memory constraints need to be changed in future, adjust the
|
||||
two `set_build_constraints` lines at the end of pre_checkin.sh and
|
||||
rerun that script to update the spec files.
|
||||
|
||||
|
||||
2022-03-31 - Tim Serong <tserong@suse.com>
|
||||
|
||||
Builds of ceph 16.2.7 on IBS showed the following resource usage (in MB):
|
||||
|
||||
ceph aarch64 max disk: 41568 max mem: 13698 (on ibs-centriq-6:3 disk: 65536 mem: 18432)
|
||||
ceph x86_64 max disk: 41621 max mem: 9852 (on sheep74:2 disk: 51200 mem: 12500)
|
||||
ceph ppc64le max disk: 42005 max mem: 8754 (on ibs-power9-10:1 disk: 61440 mem: 20480)
|
||||
ceph s390x max disk: 40698 max mem: 8875 (on s390zl36:1 disk: 51200 mem: 10240)
|
||||
ceph-test x86_64 max disk: 51760 max mem: 16835 (on sheep94:2 disk: 112640 mem: 16384)
|
||||
|
||||
Based on the above (and to hopefully provide a little wiggle room for
|
||||
the future while at the same time not being too demanding of workers)
|
||||
I've set the disk constraints to 50GB for ceph and 60GB for ceph-test.
|
||||
Memory requirements remain at 8GB and 10GB respectively as they were
|
||||
previously - despite the memory usage shown above, AFAIK we haven't
|
||||
run out of memory during builds, and this keeps the pool of possible
|
||||
workers noticeably larger than it would be if we required 16GB.
|
||||
|
||||
Note to future hackers: please add comments here to describe any further
|
||||
changes made. Thank you!
|
||||
|
||||
-->
|
||||
|
||||
<!-- Can't do the following anymore - see comments above
|
||||
|
||||
<hardware>
|
||||
<disk>
|
||||
<size unit="G">50</size>
|
||||
</disk>
|
||||
<physicalmemory>
|
||||
<size unit="G">8</size>
|
||||
</physicalmemory>
|
||||
</hardware>
|
||||
|
||||
<overwrite>
|
||||
<conditions>
|
||||
<package>ceph-test</package>
|
||||
</conditions>
|
||||
<hardware>
|
||||
<disk>
|
||||
<size unit="G">60</size>
|
||||
</disk>
|
||||
<physicalmemory>
|
||||
<size unit="G">10</size>
|
||||
</physicalmemory>
|
||||
</hardware>
|
||||
</overwrite>
|
||||
|
||||
-->
|
||||
</constraints>
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 27 01:08:52 UTC 2023 - Tim Serong <tserong@suse.com>
|
||||
|
||||
- Remove _constraints file, add README-constraints.txt and pre_checkin.env
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 24 06:26:03 UTC 2023 - Tim Serong <tserong@suse.com>
|
||||
|
||||
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 27 01:08:52 UTC 2023 - Tim Serong <tserong@suse.com>
|
||||
|
||||
- Remove _constraints file, add README-constraints.txt and pre_checkin.env
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 24 06:26:03 UTC 2023 - Tim Serong <tserong@suse.com>
|
||||
|
||||
|
5
pre_checkin.env
Normal file
5
pre_checkin.env
Normal file
@ -0,0 +1,5 @@
|
||||
# build constraints in GB (see README-constraints.txt)
|
||||
CEPH_BUILD_DISK_SIZE_GB="50"
|
||||
CEPH_BUILD_MEMORY_SIZE_GB="8"
|
||||
CEPH_TEST_BUILD_DISK_SIZE_GB="60"
|
||||
CEPH_TEST_BUILD_MEMORY_SIZE_GB="10"
|
@ -283,6 +283,15 @@ function set_build_constraints {
|
||||
PACKAGE="ceph-test"
|
||||
SPEC_FILE="ceph.spec"
|
||||
|
||||
source ./pre_checkin.env
|
||||
if [ -z "$CEPH_BUILD_DISK_SIZE_GB" -o \
|
||||
-z "$CEPH_BUILD_MEMORY_SIZE_GB" -o \
|
||||
-z "$CEPH_TEST_BUILD_DISK_SIZE_GB" -o \
|
||||
-z "$CEPH_TEST_BUILD_MEMORY_SIZE_GB" ]; then
|
||||
echo "ERROR: build constraints not set (see README-constraints.txt)";
|
||||
exit 1
|
||||
fi
|
||||
|
||||
files=`packages_files $SPEC_FILE $PACKAGE`
|
||||
if [[ "$?" == "1" ]]; then
|
||||
echo "ERROR: "
|
||||
@ -302,5 +311,5 @@ insert_line_before "$PACKAGE.spec" "Source96: pre_checkin.sh" "^Source97:"
|
||||
insert_line_before "$PACKAGE.spec" "Source95: checkin.sh" "^Source96:"
|
||||
insert_line_before "$PACKAGE.spec" "Source94: ceph-rpmlintrc" "^Source95:"
|
||||
copy_changes_file $PACKAGE
|
||||
set_build_constraints $SPEC_FILE "hardware:disk:size unit=G 50" "hardware:memory:size unit=G 8"
|
||||
set_build_constraints "$PACKAGE.spec" "hardware:disk:size unit=G 60" "hardware:memory:size unit=G 10"
|
||||
set_build_constraints $SPEC_FILE "hardware:disk:size unit=G ${CEPH_BUILD_DISK_SIZE_GB}" "hardware:memory:size unit=G ${CEPH_BUILD_MEMORY_SIZE_GB}"
|
||||
set_build_constraints "$PACKAGE.spec" "hardware:disk:size unit=G ${CEPH_TEST_BUILD_DISK_SIZE_GB}" "hardware:memory:size unit=G ${CEPH_TEST_BUILD_MEMORY_SIZE_GB}"
|
||||
|
Loading…
Reference in New Issue
Block a user