Commit Graph

1548 Commits

Author SHA1 Message Date
Ken Dreyer
7cfe523c7f Merge PR #47153 into main
* refs/pull/47153/head:
	build: fix atomic linking with LTO on s390x

Reviewed-by: Justin Caratzas <jcaratza@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2022-09-26 13:47:11 -04:00
Michael Fritch
f756b3cfcc rpm, debian: use cmake to install the cephadm binary
Signed-off-by: Michael Fritch <mfritch@suse.com>
2022-09-13 12:17:20 -04:00
Tim Serong
b660b79bf5 ceph.spec.in: Use gcc11-c++ on openSUSE Leap 15.x
Fixes: 80949babab
Fixes: https://tracker.ceph.com/issues/57497
Signed-off-by: Tim Serong <tserong@suse.com>
2022-09-12 11:13:28 +10:00
Aswin Toni
2e0e684fc2 ceph-mixin: Remove jsonnet building
Signed-off-by: Aswin Toni <aswin.toni@cern.ch>
2022-08-17 12:08:56 +02:00
Kefu Chai
ee8ccbfc9e
Merge pull request #47548 from cbodley/wip-57073
install-deps: fix centos 8's use of gcc-toolset-11

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2022-08-11 08:14:11 +08:00
Casey Bodley
a46db91ef4 ceph.spec.in: install gcc-toolset-11-libatomic-devel in x86_64 also
otherwise after enabling gcc-toolset-11, cmake fails with:

- Performing Test HAVE_LIBATOMIC - Failed
CMake Error at cmake/modules/CheckCxxAtomic.cmake:66 (message):
  Host compiler /opt/rh/gcc-toolset-11/root/usr/bin/g++ requires libatomic,
  but it is not found

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2022-08-10 18:23:44 -04:00
David Galloway
fcf48cda0a ceph.spec.in: disable system_pmdk on aarch64
Signed-off-by: David Galloway <dgallowa@redhat.com>
2022-08-10 14:36:43 -04:00
Kefu Chai
215c07ba8b ceph.spec.in: always use stock compiler on el9
as RHEL/CentOS 9, we have the access to GCC-11, which is good enough for
compiling main HEAD even with WITH_SEASTAR=ON.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-08-10 23:47:02 +08:00
Kefu Chai
53302f5f7f ceph.spec.in: define %gts_prefix
less repeatings this way, also  allow maintainer to use other version of GTS.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-08-10 22:49:43 +08:00
Kefu Chai
75dd923533 ceph.spec.in: %enable_devtoolset11 only if the macro is defined
there is chance that we are using `yum-builddep` to prepare the
build dependencies. in that case, gcc-toolset-11-build is not
installed. it's like a chicken-egg dilemma, but the point is
`yum-builddep` is able to pull in the gcc-toolset-11-build. once
gcc-toolset-11-build is installed, we will have the %enable_devtoolset11
rpm macro.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-08-10 22:37:48 +08:00
Casey Bodley
7ef6250a93
Merge pull request #47504 from cbodley/wip-57050
rgw/cmake: stop building all of radosgw a shared lib

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
2022-08-09 17:12:03 -04:00
Kefu Chai
14ab202bd1
Merge pull request #47500 from tchaikov/wip-no-more-distutils
pybind/mgr/dashboard: do not use distutils.version.StrictVersion

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
2022-08-09 23:02:07 +08:00
Kefu Chai
075b31c1c7 pybind/mgr/dashboard: do not use distutils.version.StrictVersion
replace `distutils.version.StrictVersion` with
`pkg_resources.parse_version()`

as the former is deprecated, see https://peps.python.org/pep-0632/.
let's use `pkg_resources` instead. this change also addresses
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1010894.
we have this issue when testing with an ubuntu jammy test node.
see https://bugs.launchpad.net/ubuntu/+source/ceph/+bug/1967139

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-08-09 21:04:34 +08:00
Casey Bodley
69a231888e rgw/cmake: stop building all of radosgw a shared lib
Fixes: https://tracker.ceph.com/issues/57050

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2022-08-08 11:10:11 -07:00
Kefu Chai
7e122341d9 ceph.spec.in: add libatomic to BuildRequires on fedora
otherwise we'd have failures like

/opt/compiler-explorer/gcc-trunk-20220808/bin/../lib/gcc/x86_64-linux-gnu/13.0.0/../../../../x86_64-linux-gnu/bin/ld:
/tmp/ccVlMbVh.o: in function `std::atomic<tagged_ptr>::store(tagged_ptr,
std::memory_order)':
/opt/compiler-explorer/gcc-trunk-20220808/include/c++/13.0.0/atomic:273:
undefined reference to `__atomic_store_16'

when generating the building system using CMake on fedora 36.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-08-08 20:40:54 +08:00
Tim Serong
afb684b60f
Merge pull request #47436 from SUSE/wip-mib-snmp-dir
ceph.spec.in: ceph-mib: require snmp-mibs on SUSE distros

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
Reviewed-by: Justin Caratzas <jcaratza@redhat.com>
2022-08-08 15:46:20 +10:00
Tim Serong
69997b3b0c ceph.spec.in: ceph-mib: specify "%dir %{_datadir}/snmp"
Without this, the openSUSE build fails with:

  ceph-mib-17.0.0-[...].noarch.rpm: directories not owned by a package:
    - /usr/share/snmp

Fixes: 183e347506
Signed-off-by: Tim Serong <tserong@suse.com>
2022-08-05 13:12:50 +10:00
Kefu Chai
c1062a0df2
Merge pull request #47449 from tchaikov/rpm-gts-11
ceph.spec.in: build with gcc-toolset-11

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2022-08-04 21:30:51 +08:00
Kefu Chai
3811e8835d ceph.spec.in: BuildRequires gcc-toolset-11-libatomic-devel for aarch64
to address following failure when generating the building system
using CMake:

```
-- Performing Test HAVE_LIBATOMIC
-- Performing Test HAVE_LIBATOMIC - Failed
CMake Error at cmake/modules/CheckCxxAtomic.cmake:66 (message):
  Host compiler /opt/rh/gcc-toolset-11/root/usr/bin/c++ requires libatomic,
but it is not found
```

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-08-04 12:15:03 +08:00
Kefu Chai
336fe86af8 ceph.spec.in: call %enable_devtoolset11 on centos8
before this change %enable_devtoolset11 is called only when building
with crimson on centos8.

after this change %enable_devtoolset11 is called when building on
centos8. because we've started using gcc-toolset-11 for building
rpm packages on centos8 after the C++20 migration. so, to build
with gcc-11, we need to enable it.

also, because gcc-toolset-11 is used, we have to disable
annotated_build.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-08-04 11:02:16 +08:00
Avan Thakkar
d7226fcc45 exporter: per node metric exporter
Fixes: https://tracker.ceph.com/issues/55046

Signed-off-by: Pere Diaz Bou <pdiazbou@redhat.com>
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
2022-08-03 13:13:49 +02:00
Tim Serong
80949babab ceph.spec.in: set BuildRequires: gcc-c++ >= 11 for SUSE distros
This is much simpler than explicitly requiring gcc 11, and
anyway, openSUSE Tumbleweed is up to gcc 12 now.

Signed-off-by: Tim Serong <tserong@suse.com>
2022-08-03 15:20:25 +10:00
Casey Bodley
46a1aa4874 ceph.spec.in: add gcc-toolset-11-annobin-plugin-gcc
gcc-toolset-11-annobin is already installed, but ceph.spec.in adds
"-specs=/usr/lib/rpm/redhat/redhat-annobin-cc1" which needs the gcc
plugin too

resolves this failure during the cmake configure step:

-- Check for working CXX compiler: /opt/rh/gcc-toolset-11/root/usr/bin/c++
-- Check for working CXX compiler: /opt/rh/gcc-toolset-11/root/usr/bin/c++ - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:59 (message):
  The C++ compiler

    "/opt/rh/gcc-toolset-11/root/usr/bin/c++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-11497-gfae772b8/rpm/el8/BUILD/ceph-17.0.0-11497-gfae772b8/x86_64-redhat-linux-gnu/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_09421/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_09421.dir/build.make CMakeFiles/cmTC_09421.dir/build
    gmake[1]: Entering directory '/home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-11497-gfae772b8/rpm/el8/BUILD/ceph-17.0.0-11497-gfae772b8/x86_64-redhat-linux-gnu/CMakeFiles/CMakeTmp'
    Building CXX object CMakeFiles/cmTC_09421.dir/testCXXCompiler.cxx.o
    /opt/rh/gcc-toolset-11/root/usr/bin/c++   -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection  -o CMakeFiles/cmTC_09421.dir/testCXXCompiler.cxx.o -c /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-11497-gfae772b8/rpm/el8/BUILD/ceph-17.0.0-11497-gfae772b8/x86_64-redhat-linux-gnu/CMakeFiles/CMakeTmp/testCXXCompiler.cxx
    cc1plus: fatal error: inaccessible plugin file plugin/annobin.so expanded from short plugin name annobin: No such file or directory
    compilation terminated.

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2022-07-30 13:02:16 +08:00
Casey Bodley
610c0d5111 rpm: BuildRequires gcc-toolset-10-gcc-c++ >= 10.2
Signed-off-by: Casey Bodley <cbodley@redhat.com>
2022-07-30 13:02:15 +08:00
Ilya Dryomov
a421cfc2aa
Merge pull request #47014 from ktdreyer/no-system-pmdk-s390x
ceph.spec.in: disable system_pmdk on s390x

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2022-07-24 09:37:55 +02:00
Kefu Chai
579a9fe32a
Merge pull request #47124 from tchaikov/spec-mibs
ceph.spec.in: correct "%files mib" section

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Justin Caratzas <jcaratza@redhat.com>
2022-07-22 23:54:03 +08:00
Tim Serong
93b9e3d5de ceph.spec.in: use BuildRequires libndctl-devel for SUSE distros
Fixes: b6b24852a6
Signed-off-by: Tim Serong <tserong@suse.com>
2022-07-21 18:08:59 +10:00
Ken Dreyer
fbb1ccc963 build: fix atomic linking with LTO on s390x
Prior to this change, Fedora and RHEL 9 on s390x would incorrectly pass
the HAVE_CXX11_ATOMIC check. As a consequence, the rest of Ceph would
fail to link because of missing atomic methods "__atomic_load_16",
"__atomic_store_16", "__atomic_compare_exchange_16".

Mark this method so that it is not optimized out, even with LTO. With
this change, s390x properly fails HAVE_CXX11_ATOMIC and falls back to
HAVE_LIBATOMIC.

Move the "BuildRequires: libatomic" RPM line out from the seastar+fedora
conditional and into the main fedora+rhel conditional so that the
HAVE_LIBATOMIC check will pass.

Fixes: https://tracker.ceph.com/issues/54514
Fixes: https://tracker.ceph.com/issues/56492

Co-authored-by: Kaleb S. Keithley <kkeithle@redhat.com>
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2022-07-18 15:19:02 -04:00
Kefu Chai
183e347506 ceph.spec.in: correct "%files mib" section
* create the destination directory when installing the MIBs file
* no need to set the file permission bits of a directory not owned by us
* the MIBs installed by us are not config files, and should not be
  marked with `%config`, they are just immutable files not supposed to
  be edited by user.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-07-16 19:04:55 +08:00
Justin Caratzas
fddb7dd2b0 ceph.spec.in: fix path for mib file and properly mark in %files
Fixes typos introduced in https://github.com/ceph/ceph/pull/46918

Signed-off-by: Justin Caratzas <jcaratza@redhat.com>
2022-07-15 08:41:24 -04:00
Ilya Dryomov
795daff95e
Merge pull request #46260 from CongMinYin/wip-enable-ndctl
cmake: enable ndctl when building PMDK for WITH_BLUESTORE_PMEM

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
2022-07-14 15:21:29 +02:00
Justin Caratzas
23a849e3d0
Merge pull request #46918 from bigjust/wip-jcaratza-mib-rpm
monitoring:package SNMP MIB file as an rpm
2022-07-13 12:56:53 -04:00
Yin Congmin
b6b24852a6 cmake: add findndctl and finddaxctl function
In order to support the character device of pmem usage in bluestore via
libpmem built by Ceph itself, we need to enable daxctl and ndctl
dependency. add the installation of ndctl and find it. the version of
ndctl and daxctl library requires >63. "apt-get install" meet the version
under ubuntu focal.

the installation of ndctl-devel in ceph.spec.in has not been verified.

Signed-off-by: Yin Congmin <congmin.yin@intel.com>
2022-07-12 10:32:57 +08:00
Kefu Chai
40039e7b00 ceph.spec.in: disable WITH_JAEGER if "with seastar"
this is an intermediate solution for building crimson rpm packages.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-07-10 20:22:58 -04:00
Kefu Chai
be0b9534db ceph.spec.in: enable WITH_SEASTAR if "with seastar"
Signed-off-by: Kefu Chai <tchaikov@gmail.com>
2022-07-10 20:22:58 -04:00
Adam King
a658cec56c
Merge pull request #45643 from rkachach/fix_issue_52514
ceph.spec: fixing cephadm build deps

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2022-07-07 18:04:13 -04:00
Ken Dreyer
426c761f3a ceph.spec.in: disable system_pmdk on s390x
The pwl_cache plugin depends on libpmem. This is not available on s390x
for RHEL 8, RHEL 9, or Fedora.

Fixes: https://tracker.ceph.com/issues/56491
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2022-07-07 12:01:36 -04:00
Justin Caratzas
deb7412d6f ceph.spec.in: review changes for mibs package
Signed-off-by: Justin Caratzas <jcaratza@redhat.com>
2022-07-06 14:40:54 -04:00
Justin Caratzas
3a7c8c6022 package SNMP MIB file as an rpm
Adds a new subpackage 'ceph-mib' that installs the Ceph MIB file in a
standard location '/usr/share/snmp/CEPH-MIB.txt'. This allows users to
use their own snmp manager in order to receive events from Ceph

Fixes: https://tracker.ceph.com/issues/56433
Signed-off-by: Justin Caratzas <jcaratza@redhat.com>
2022-06-30 17:37:03 -04:00
Kefu Chai
89a6a2d802 ceph.spec.in: use %enable_devtoolset11 to enable GTS-11
%enable_devtoolset11 redefines %___build_pre by appending
`source scl_source enable gcc-toolset-11` to it. `___build_pre` should
be able to populate this setting to both %build and %install. and hence
address the FTBFS where we need to use the tool chain from GTS-11.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 49459d92fe)
2022-06-28 12:44:26 +00:00
Radoslaw Zarzynski
f05b671798 ceph.spec.in: enable toolset 11 also in install
This can be surprising but we actually compile things during
the `install` stage of `rpm-build`. The example is the pybind's
`setup.py` which builds `rados_dummy.c`.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2022-06-28 12:44:26 +00:00
Radoslaw Zarzynski
ddf3721a96 ceph.spec.in: move and undef _annotated_build only for rhels.
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2022-06-28 12:44:26 +00:00
Radosław Zarzyński
13f3653f59 ceph.spec.in: use gcc-toolset-11 for building crimson
Signed-off-by: Radosław Zarzyński <rzarzyns@redhat.com>
2022-06-28 12:44:26 +00:00
Venky Shankar
c34fd00339
Merge pull request #46295 from dparmar18/tracker3998
mds: split up mdstypes

Reviewed-by: Venky Shankar <vshankar@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Neeraj Pratap Singh <neesingh@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Nikhilkumar Shelke <nshelke@redhat.com>
Reviewed-by:  Rishabh Dave <ridave@redhat.com>
2022-06-20 09:59:53 +05:30
Tim Serong
265d24f09e ceph.spec.in: turn jaeger off by default for SUSE distros
Building with jaeger by default pulls in opentelemetry, and
cmake/modules/BuildOpentelemetry.cmake tries to go get
https://github.com/ideepika/opentelemetry-cpp.git at build
time, which doesn't work on SUSE's build service (no internet
access at build time).  Also, since WITH_JAEGER now defaults
to ON in CMakeLists.txt, we need to flip the logic when
setting -DWITH_JAEGER.

Fixes: 644c99826d
Fixes: 7be8be6350
Signed-off-by: Tim Serong <tserong@suse.com>
2022-06-09 16:23:50 +10:00
Redouane Kachach
2c4b31601f
ceph.spec: fixing cephadm build deps
Fixes: https://tracker.ceph.com/issues/52514

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2022-06-08 11:43:23 +02:00
dparmar18
f2bfea5bfd mds: add include/cephfs/types.h path in spec files
Signed-off-by: Dhairya Parmar <dparmar@redhat.com>
2022-06-08 11:49:17 +05:30
Yuval Lifshitz
042f3c7978
Merge pull request #44684 from zenomri/wip-omri-tracing-compiled
tracer: set tracing compiled in by default
2022-06-02 20:22:17 +03:00
Adam King
832457a4ac
Merge pull request #46272 from sshambar/bug-55664
cephadm: preserve cephadm user during RPM upgrade

Reviewed-by: Kefu Chai <tchaikov@gmail.com>
Reviewed-by: Michael Fritch <mfritch@suse.com>
2022-06-01 17:44:54 -04:00
Kefu Chai
b7b8838a56
Merge pull request #35598 from tchaikov/wip-cephfs-java
rpm,install-dep.sh: build cephfs java binding

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2022-05-28 13:29:25 +08:00