Commit Graph

92 Commits

Author SHA1 Message Date
John Mulligan
7edc4309f4 run-make-check: use get_processors in run-make-check script
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2023-02-07 14:17:10 -05:00
John Mulligan
70bf755f9e script: reorganize build scripts
In preparation for running builds and tests in containers, make some
organizational changes to the run-make-*.sh scripts.

Original version of the patch can be found at https://github.com/ceph/ceph/pull/46071

Original-version-by: Ernesto Puerta <epuertat@redhat.com>
Co-authored-by: Ernesto Puerta <epuertat@redhat.com>
Co-authored-by: John Mulligan <jmulligan@redhat.com>
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
Signed-off-by: John Mulligan <jmulligan@redhat.com>
2023-02-07 14:17:09 -05:00
Casey Bodley
51e09d1c8a build: temporarily disable WITH_RADOSGW_MOTR in make check
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2022-08-11 13:50:42 -04:00
Deepika Upadhyay
93e5d787ef cmake: add rbd-mirror executable to run-make-check
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
(cherry picked from commit e2b46020317e4d4e37c281a6b1817711e0826a37)
2022-07-26 13:50:29 +05:30
Ilya Dryomov
0f1634a21f run-make-check.sh: enable RBD persistent caches
This was attempted in commit 69a7ed4eab ("run-make-check: enable
WITH_RBD_RWL when WITH_PMEM is true") but never completed.  We soon
bumped the requirement on libpmem, so WITH_SYSTEM_PMDK=ON wouldn't
have worked anyway.

Enable the RWL mode conditionally based on WITH_RBD_RWL variable.
Enable the SSD mode unconditionally as it has no special dependencies
and can be built on any architecture.

Fixes: https://tracker.ceph.com/issues/55285
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2022-04-19 11:21:06 +02:00
David Galloway
57edb76ea4 build: Add some debugging messages
Having a unique string like "CI_DEBUG" will help me know where we are in the build process in Jenkins logs.

Signed-off-by: David Galloway <dgallowa@redhat.com>
2022-04-01 13:33:36 -04:00
Andriy Tkachuk
bf24c479b9 rgw: add CORTX Motr SAL implementation
To build with Motr backend, use -DWITH_RADOSGW_MOTR=YES cmake
option. cortx-motr-devel rpm should be installed beforehand.

To connect to Motr cluster, add the following configuration
parameters to ceph.conf:

    [client]
            ...
            rgw backend store = motr
            motr profile fid  = 0x7000000000000001:0x4f
            motr ha endpoint  = inet:tcp:10.0.0.1@2001
    ...
    [client.rgw.8000]
            ...
            motr my endpoint  = inet:tcp:10.0.0.1@5001
            motr my fid       = 0x7200000000000001:0x29

The correct values for the Motr connection parameters can be
taken from `hctl status` cmd output after Motr cluster is
bootstrapped. In the example above, the values were taken from
the following output:

    Profile:
        0x7000000000000001:0x4f
    Services:
        centos8n1
        [started] hax       0x7200000000000001:0x6  inet:tcp:10.0.0.1@5001
        ...
        [unknown] m0_client 0x7200000000000001:0x29 inet:tcp:10.0.0.1@5001

Motr pkgs for the build/run can be taken from
https://github.com/Seagate/cortx-motr/releases/tag/2.0.0-rgw.

Co-authored-by: Sining Wu <sining.wu@seagate.com>

Signed-off-by: Andriy Tkachuk <andriy.tkachuk@seagate.com>
2022-01-27 10:45:25 +00:00
Radoslaw Zarzynski
bf727b0f3b tests/crimson: don't be so verbose when run by the 'make check' bot.
This commit is a try to balance crimson's debug facilities with overwhelming
some hosts the `make check` bot runs on with huge number of log entries;
see https://jenkins.ceph.com/job/ceph-pull-requests-arm64/17127/ for an
exemplification of the problem.

This is achieved by differentiating debug levels depending upon the
`FOR_MAKE_CHECK` env variable. It's a hack / a makeshift solution
only. IMHO ultimately we should introduce a dedicated target for
the bot while leaving `ninja test` for humans which would allow for more
debugs and maybe also for running `vstart.sh`-dependent tests.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2021-09-17 16:00:42 +00:00
Deepika Upadhyay
4636835dd5
Merge pull request #42842 from ideepika/wip-werror-testing
run-make-check.sh: fix run-make-check.sh skipping cmake options 

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-08-20 12:00:49 +05:30
Deepika Upadhyay
9baf075c9f run-make-check: fix do_cmake not consuming run-make-check opts
run-make-check.sh uses run-make.sh to `prepare`(install dependencies)
and `configure` cmake options, without quotes these options containing
special characters(hypens mostly) are skipped, hence we see not all
options supplied at cmake configure step.

Resolves(focused to solve issues in jenkins build env):
 - missing cmake options:
    cmake_opts+=" -DCMAKE_CXX_COMPILER=$cxx_compiler -DCMAKE_C_COMPILER=$c_compiler"
    cmake_opts+=" -DCMAKE_CXX_FLAGS_DEBUG=\-Werror"
 - Ninja not being used as cmake generator

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-08-19 18:28:56 +05:30
David Galloway
e1b55f6878 run-make-check.sh: Increase failure output log size
Fixes: https://tracker.ceph.com/issues/43566

Signed-off-by: David Galloway <dgallowa@redhat.com>
2021-08-18 14:01:05 -04:00
Kefu Chai
ba5d5488cf run-make-check: pass -Werror when compiling C++ code
to raise the bar so we can identify potential issues earlier.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-08-16 17:37:01 +08:00
Radoslaw Zarzynski
0a4034c10f build: switch the make check bot to Clang.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2021-08-16 14:23:17 +08:00
Aashish Sharma
e9bd94515f mgr/dashboard: monitoring: replace Grafana JSON with Grafonnet based Code
This PR intends to add grafonnet to generate grafana JSON files

Fixes: https://tracker.ceph.com/issues/45184
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
2021-08-11 19:23:54 +05:30
Kefu Chai
bcd596994f run-make-check.sh: do not specify -DWITH_PYTHON=3
should leave it to do_cmake.sh to decide which python3 version to use,
there is case that we have multiple python3 installed, but only one of them
is fully supported by the distro, in the sense that python3-* packages
are packaged for that python3.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-19 12:04:18 +08:00
Kefu Chai
69a7ed4eab run-make-check: enable WITH_RBD_RWL when WITH_PMEM is true
so we can at least build-test the rwl cache plugin in "make check" run.

this is an opt-in option which is only enabled if WITH_PMEM is "true",
we will set it in the corresponding ceph-build job.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-08 17:16:46 +08:00
Kefu Chai
48ba39987d run-make-check.sh: let ctest generate XML output
to enable XUnit plugin of jenkins to consume the ctest output and
publish it in the dashboard, we need to

* let ctest generate XML output instead of plain text output
* do not fail the test if any test case fails. this allows the publisher
  to do its job by checking the XML output.
* prevent ctest from compressing the output. see
  https://issues.jenkins.io/browse/JENKINS-21737

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-25 17:14:09 +08:00
Kefu Chai
e8fd4b3a13 run-make-check.sh: increase fs.aio-max-nr
without this change the seastar based tests fail on host with 48 cores,
because the /proc/sys/fs/aio-nr used by the tests is greater than
1048576. if run-make-check.sh is used to launch the test, the default
job number is `$(nproc) / 2`, and the peak number of /proc/sys/fs/aio-nr
when running ctest was 3190848 when testing on the 48-core host.

so we need to increase fs.aio-max-nr accordingly to the available cores
on the host.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-19 16:24:33 +08:00
Brad Hubbard
e70483133d run-make-check.sh: Make sure a build failure will exit
We 'set -e' but that is ignored because 'build tests' is executed in a
'&&' list (see 'man set') so move the echo to the following line.

Follow-up to 03ff2146f9

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2020-11-26 15:32:35 +10:00
Brad Hubbard
03ff2146f9 run-make-check.sh: Don't run tests if build fails
When run-make was taken out we lost the 'set -e' call and therefore
continue after an error.

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2020-11-26 11:20:06 +10:00
Kefu Chai
77cc91a4ba run-make-check.sh: fix syntax error
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-22 10:17:56 +08:00
Kefu Chai
21dd995ad2 run-make-check.sh: pass -DWITH_ZBD=ON to cmake if $WITH_ZBD
run-make-check.sh is used by ceph-build/ceph-pull-requests/build/build
to run "make check". this change prepares run-make-check.sh so that we
can enable ZBD build on demand once ceph-build is updated accordingly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-17 14:45:11 +08:00
Ilya Dryomov
113629cb9a run-make-check.sh: fix the log message
With 5e9a1d95c9 ("run-make-check.sh: extract run-make.sh"), this log
message is actively confusing.  At this point we just have the binaries,
no tests have run yet (and if -N is passed through CHECK_MAKEOPTS, none
will).

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2020-07-08 14:11:45 +02:00
Kefu Chai
72a0ed4275 run-make-check.sh: WITH_SEASTAR on demand
don't compile WITH_SEASTAR=ON unless required

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-04 22:18:50 +08:00
Kefu Chai
5fc657b40d cmake: drop WITH_PYTHON2 option
* drop WITH_PYTHON2 option
* print warning message if WITH_PYTHON3 is disabled
* drop MGR_PYTHON_VERSION option, as we don't support use different
  python version for python binding and ceph-mgr embedded python
  interpreter anymore. as before switching to python3-only build,
  we can build python3 and python2 python bindings, and ceph-mgr
  can use either of them. but after switching to python3-only
  build, ceph-mgr has to use whatever python version used to
  build python binding.
* move WITH_PYTHON3 option to $top_srcdir/CMakeLists.txt, as ceph-mgr
  and python binding will share this option.
* hardware ${PYTHON_VERSION} to 3
* hardware ${Python${PYTHON_VERSION}_VERSION_MAJOR} to 3
* only build boost library with python3
* s/Python_EXECUTABLE/Python3_EXECUTABLE/
* update the build scripts and packagings accordingly
* rename all cython${PYTHON_VERSION}_* targets to cython_*
* update distutils_install_module() so it does not take python_version
  parameter anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-19 10:58:58 +08:00
Kefu Chai
5e9a1d95c9 run-make-check.sh: extract run-make.sh
so we can reuse run-make.sh for building the artifact used by other
tests than "make check", for instance, dashboard's E2E test and
crimson's performance test.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-09-05 21:07:37 +08:00
Kefu Chai
3234fb3982 cmake,run-make-check.sh,deb,rpm: disable SPDK by default
but we still enable it in `run-make-check.sh`

* cmake: disable SPDK by default
* run-make-check.sh: enable WITH_SPDK so at least we can ensure it
  builds
* deb,rpm: add uuid-dev / libuuid-devel as a "make check" dependency

Fixes: https://tracker.ceph.com/issues/41330
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-20 15:38:33 +08:00
Kefu Chai
11f9aae4ca run-make-check.sh: run sudo with absolute path
there is chance that `/sbin` is not listed in `secure_path`, see
sudoers(5) for more details

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-20 10:51:36 +08:00
Varsha Rao
e90d58208d
cephfs-shell: Add tox for testing with flake8
Fixes: https://tracker.ceph.com/issues/39947
Signed-off-by: Varsha Rao <varao@redhat.com>
2019-07-30 10:34:24 -07:00
Kefu Chai
694495f621 install-deps.sh: selectively enable deps on deb distros
on debian derivatives, only enable required dependencies on demand.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-17 02:27:07 +08:00
Nathan Cutler
a691122a4e build/ops: do_cmake.sh: automate py3 build options for certain distros
Before this patch, run-make-check.sh was setting the cmake options for
py3 build based only on the absence of a python2 binary in the system.
This was not sufficiently deterministic, and it didn't help folks who
run do_cmake.sh directly.

With this patch, we explicitly force the py3 build in do_cmake.sh, for
those OS types/versions we know need it.

Fixes: https://tracker.ceph.com/issues/37330
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-11-21 16:51:16 +01:00
Kefu Chai
79b55473ef run-make-check,do_cmake: set BOOST_J if !WITH_SYSTEM_BOOS
it's also more readable if we can set the number of make jobs
in a single place.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-11 22:22:47 +08:00
Kefu Chai
f0d7616b37 install-deps,run-make-check: use ceph-libboost repo
ceph-libboost1.67 repo is setup to satisfy the libboost dependencies
used when building ceph. now it offers arm64 and amd64 builds for xenial.

* install-deps.sh: add ceph-libboost1.67 repo hosted on chacra if the
  building host does not have any of the listed ceph-libboost1.67
  packages installed
* run-make-check.sh: add "-DWITH_SYSTEM_BOOST=ON
  -DBOOST_ROOT=/opt/ceph" if include/boost/config.hpp is found
  under /opt/ceph

See-also: http://tracker.ceph.com/issues/25186
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-11 22:22:47 +08:00
Kefu Chai
b2ef5ddb9a run-make-check: should use sudo for running sysctl
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-23 19:47:11 +08:00
Kefu Chai
b928c7777c run-make-check: increase fs.aio-max-nr to 1048576
the solution was suggested by Yingxin Cheng. otherwise we could have
EAGAIN returned by io_setup(2).

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-22 19:52:46 +08:00
Erwan Velu
d1a807a277 run-make-check: Showing configuration before the build
The actual code is resetting the statistics before doing the actual compilation and prints them after the build.

That is nice to understand how much the cache was used but doesn't help understanding how much it _could_ have been used.

This patch is adding a reporting (-s) when cleaning the statistics so we can estimate :
- the actual number of files in cache
- the actual size of the cache

With this two missing information, its now possible estimate if there is some miss-usage of the cache.

Signed-off-by: Erwan Velu <erwan@redhat.com>
2018-08-17 10:16:58 +02:00
Kefu Chai
8bec1035ba run-make-check: drop CMAKE_PYTHON_OPTS variable
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-02 17:23:11 +08:00
Kefu Chai
cee0122780 cmake,run-make-check: always enable WITH_GTEST_PARALLEL
now that https://github.com/google/gtest-parallel/pull/63 has been
merged, we can now use gtest-parallel with py2 and also py3.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-02 17:13:14 +08:00
Kefu Chai
45bca777aa run-make-check: set WITH_SEASTAR with a non-empty string
otherwise "test -n $WITH_SEASTAR" fails, and the dependencies won't be
installed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-18 10:25:21 +08:00
Kefu Chai
f1f1526166 run-make-check.sh: enable WITH_SEASTAR
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-12 17:51:22 +08:00
Nathan Cutler
693beaa8f3 run-make-check.sh: fill in missing DRY_RUN and add doc hint
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-09 14:29:05 +02:00
Nathan Cutler
458a0a6e62 run-make-check.sh: reset trap after sourcing install-deps.sh
Since we source install-deps.sh, it replaces our trap with its own,
so we have to reinstate our trap after it finishes.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-09 14:29:04 +02:00
Nathan Cutler
b79b463f90 cleanup: run-make-check.sh: no space between -D and name of cmake option
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-09 14:29:04 +02:00
Nathan Cutler
3d6909b0f3 run-make-check.sh: gtest-parallel only with Python 2
Fixes: http://tracker.ceph.com/issues/24817
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-09 14:29:04 +02:00
Nathan Cutler
f9c0691f84 run-make-check.sh: inform user of make -j setting
This can help the user figure out why the build is so slow.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-09 14:29:04 +02:00
Nathan Cutler
43fe00e90c doc: cleanup: wordsmith a comment in run-make-check.sh
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-09 14:29:04 +02:00
Nathan Cutler
2315928acd run-make-check.sh: ccache goodness for everyone
Since run-make-check.sh already ensures that ccache is installed,
it makes sense to let everyone benefit from the ccache
tweaks introduced by 4cb5a59053

Note 1: The previous solution using "date" would cause build tools to reset
their timestamps after 24 hours, on subsequent runs of run-make-check.sh.
In order to maximize ccache effectiveness, this commit sets SOURCE_DATE_EPOCH
to a fixed value: the number of seconds elapsed since the Unix epoch as at
January 1, 2000 (chosen to commemorate Y2K armageddon).

Note 2: this commit introduces "set -e". This was actually in effect
before, via "source install-deps.sh". Better to make it explicit.

Fixes: http://tracker.ceph.com/issues/24777
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-09 14:29:01 +02:00
Nathan Cutler
c8691cd9a3 run-make-check.sh: drop workaround for undeclared jq build dependency
jq build dependency is properly declared now.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-09 14:25:40 +02:00
Erwan Velu
4cb5a59053 run-make-check.sh: Adding ccache tuning for the CI
When run-make-check is run by the CI, some tuning can be performed to
speedup the build.

This commit :
- Detect jenkins by searching JENKINS_HOME env variable
- Defines the SOURCE_DATE_EPOCH to enforce a stable date across builds
- Ask cmake not to use the git versioning which adds useless entropy for a temporary build (ENABLE_GIT_VERSION=OFF)
- Define the ccache slopiness to increase efficiency
- Increase the ccache size to save multiple builds to maximise cache hit between PRs
- Print ccache statistics to evaluate ccache efficiency

Signed-off-by: Erwan Velu <erwan@redhat.com>
2018-07-04 11:55:43 +02:00
Kefu Chai
eb615410d3 run-make-check: enable WITH_GTEST_PARALLEL
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-06-15 15:55:27 +02:00