Commit Graph

1486 Commits

Author SHA1 Message Date
Deepika Upadhyay
879f2056cb
Merge pull request #42913 from yaarith/update-sudoers-smartctl
rpm, debian: move smartmontools and nvme-cli to ceph-base

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-08-30 14:26:03 +05:30
Deepika Upadhyay
69a5ae539f
Merge pull request #42770 from ktdreyer/no-lsb-release
Remove dependency on lsb_release

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-08-30 14:13:02 +05:30
Yaarit Hatuka
7ca39fa92b rpm, debian: move smartmontools and nvme-cli to ceph-base
We wish to be able to scrape SMART and NVMe metrics from OSD and MON
nodes. For this we require / recommend smartmontools and nvme-cli
dependencies for both the ceph-osd and ceph-mon packages.  However, the
sudoers file (which is required for invoking `smartctl` by user 'ceph')
was installed only in the ceph-osd package.  Since different packages
cannot own the same file, and because we want to be able to scrape from
every daemon, we move the dependencies and the sudoers installation to
ceph-base. For generalization, we rename:
	sudoers.d/ceph-osd-smartctl -> sudoers.d/ceph-smartctl

Fixes: https://tracker.ceph.com/issues/50657
Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
2021-08-25 13:20:23 +00:00
Mykola Golub
8ecae46345 doc: add crushdiff(8) man page
Signed-off-by: Mykola Golub <mykola.golub@clyso.com>
2021-08-24 11:09:08 +03:00
Mykola Golub
6c73184b21 tools/crushdiff: new tool to test crushmap change
A tool to test the effect (number of pgs, objects, bytes moved)
of a crushmap change. This is a wrapper around osdmaptool, hardly
relying on its --test-map-pgs-dump option to get the list of
changed pgs.  Additionally it uses pg stats to calculate the
numbers of objects and bytes moved.

Signed-off-by: Mykola Golub <mykola.golub@clyso.com>
2021-08-24 09:20:28 +03:00
Sebastian Wagner
fb7cb4b50d
Merge pull request #42051 from melissa-kun-li/asyncssh
mgr/cephadm: replace execnet and remoto with asyncssh

Reviewed-by: Adam King <adking@redhat.com>
Reviewed-by: Dimitri Savineau <dsavinea@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-08-23 14:29:01 +02:00
Melissa
791d8be5c0 mgr/cephadm: replace instances of remoto/execnet with asyncssh
Fixes: https://tracker.ceph.com/issues/44676
Signed-off-by: Melissa Li <li.melissa.kun@gmail.com>
2021-08-20 14:27:46 -04:00
Ken Dreyer
cbc0127f34 rpm, debian: remove lsb-release
Nothing requires this any more, so we can remove it from the RPM
and Debian packaging.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2021-08-18 13:08:24 -04:00
Kefu Chai
9d05d73374 ceph.spec.in: drop gdbm from build deps
neither gdbm nor libgdbm is used when building ceph, so let's drop it.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-08-18 01:04:42 +08:00
Aashish Sharma
4907c78bb7 mgr/dashboard: fix grafonnet build error
This PR tends to fix the issue caused by #42194

Fixes:https://tracker.ceph.com/issues/52238
Signed-off-by: Aashish Sharma <aasharma@redhat.com>
2021-08-12 17:48:33 +05:30
Ernesto Puerta
afadfede0d
Merge pull request #42194 from rhcs-dashboard/add-grafonnet-grafana
mgr/dashboard: monitoring: replace Grafana JSON with Grafonnet based code
2021-08-11 18:11:59 +02: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
8b94e73e12
Merge pull request #42602 from b-ranto/wip-lto
rados+rpm: Update symver defs and re-enable LTO

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-08-06 13:45:01 +08:00
Boris Ranto
381507a31c rpm: Re-enable LTO on supported systems
We can now use LTO when building ceph. The symver issue was fixed by
using the gcc __symver__ attribute. The systems that support it can now
re-enable LTO.

Fixes: https://tracker.ceph.com/issues/40060
Signed-off-by: Boris Ranto <branto@redhat.com>
2021-08-05 15:46:47 +02:00
Kefu Chai
a17ebc0406
Merge pull request #42575 from tchaikov/wip-venv
*: s/virtualenv/python -m venv/

Reviewed-by: Sebastian Wagner <sewagner@redhat.com>
2021-08-04 18:37:45 +08:00
Kefu Chai
a485fdf161
Merge pull request #42571 from tchaikov/wip-disable-kvs
cmake: disable kvs rados cls by default

Reviewed-by: Neha Ojha <nojha@redhat.com>
2021-08-04 18:31:40 +08:00
Kefu Chai
065ff536a1 cmake: disable kvs rados cls by default
libcls_kvs was introduced back in
73d016fdb3, but we don't have an internal
user so far. to reduce the build time. let's disable the build of it by
default.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-08-04 10:21:10 +08:00
Kefu Chai
3741f57eee rpm, debian: drop virtualenv from build deps
since we've replaced "virtualenv" with "python3 -m venv", there is no
need to have it in the build deps list.

since, on ubuntu, venv modules is not available by default, we need to
install python3-venv.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-07-31 22:34:05 +08:00
Kefu Chai
83cd444a41 rpm: enable dwz
this change reverts 9132269421
back then, we were using rpm < 4.13, which does not support
the feature of "Debugsource and debuginfo sub-packages", but per
https://bugzilla.redhat.com/show_bug.cgi?id=185590. rpm >= 4.13
has this feature. see also http://rpm.org/wiki/Releases/4.13.0

in CentOS 8, RPM v4.14.3 is available. and by inspecting the log
when building ceph packages on CentOS 8, we have:

Wrote: /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-6524-g4e868f9a/rpm/el8/RPMS/x86_64/ceph-debugsource-17.0.0-6524.g4e868f9a.el8.x86_64.rpm
Wrote: /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-6524-g4e868f9a/rpm/el8/RPMS/x86_64/ceph-base-debuginfo-17.0.0-6524.g4e868f9a.el8.x86_64.rpm
Wrote: /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-6524-g4e868f9a/rpm/el8/RPMS/x86_64/ceph-common-debuginfo-17.0.0-6524.g4e868f9a.el8.x86_64.rpm
Wrote: /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-6524-g4e868f9a/rpm/el8/RPMS/x86_64/ceph-mds-debuginfo-17.0.0-6524.g4e868f9a.el8.x86_64.rpm
....
build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos8/DIST/centos8/MACHINE_SIZE/gigantic/release/17.0.0-6524-g4e868f9a/rpm/el8/RPMS/x86_64/ceph-test-debuginfo-17.0.0-6524.g4e868f9a.el8.x86_64.rpm

so, rpmbuild does generate debuginfo package for each binary
package. this should make the life of valgrind a lot easier
when reading the dwz -- no need to read the debuginfo of all
the packages, only the .dwz of the related subpackage is read.

this change should help to decrease the size of debuginfo
rpm packages a little bit. see https://tracker.ceph.com/issues/19099#note-7

this change was inspired by Yuanming Chai <ychai@redhat.com>

See-also: https://tracker.ceph.com/issues/19099
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-07-30 16:35:08 +08:00
Kefu Chai
fa8f07561c
Merge pull request #42286 from dvanders/dvanders_selinux
ceph.spec: selinux scripts respect CEPH_AUTO_RESTART_ON_UPGRADE

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Wido den Hollander <wido@widodh.nl>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-07-24 13:57:19 +08:00
Kefu Chai
ab7e753ab5
Merge pull request #42452 from smithfarm/wip-first-arg-immutable
rpm: drop use of $FIRST_ARG in ceph-immutable-object-cache

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-07-24 13:53:33 +08:00
Kefu Chai
5419131499 ceph.spec.in: build with header only fmt on RHEL
because fmt is packaged in EPEL, while librados is packaged
in RHEL, so we cannot have fmt as a runtime dependency of librados.
to address this issue, we should compile librados either with static library
or with header-only library of fmt. but because the fedora packaging
guideline does no encourage us to package static libraries, and it would
be complicated to package both static and dynamic library for fmt.

the simpler solution would be to compile Ceph with the header-only
version of fmt.

in this change, we compile ceph with the header-only version of fmt
on RHEL to address the runtime dependency issue.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-07-24 02:26:45 +08:00
Nathan Cutler
1cb84a1160 rpm: drop use of $FIRST_ARG in ceph-immutable-object-cache
The use of $FIRST_ARG was probably required because the SUSE-specific
%service_* rpm macros were playing tricks on the shell positional parameters.
This is bad practice and error-prone, so let's assume that no macros should do
that anymore and hence it's safe to assume that positional parameters remain
unchanged after any rpm macro call.

Thanks to Franck Bui for providing the original patch
926433f5d4 that this patch is modeled after.

NOTE: the use of FIRST_ARG had already been eliminated by
926433f5d4 but was re-introduced later by
9466d70985

Fixes: 9466d70985
Fixes: https://tracker.ceph.com/issues/51797
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2021-07-22 22:52:39 +02:00
Kefu Chai
7048172cad
Merge pull request #38783 from ideepika/wip-osd-tracing
cmake/ninja: support ninja for jaegertracing

Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-07-22 15:33:13 +08:00
Deepika Upadhyay
80e82686eb ceph.spec, cmake, debian: use thrift 0.13+ from distro pkg
the change to build and ship libthift was added when we didn't have 0.13.0
version shipped via distro pkgs, now that centos 8 and F34 supports req.
version, we do not need to build and ship it with jaeger library.

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-07-22 10:59:45 +05:30
Deepika Upadhyay
e92b4745ba ceph.spec: enable WITH_JAEGER=ON if --with-jaeger passed
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-07-22 10:58:12 +05:30
Deepika Upadhyay
00f44782af cmake, ceph.spec, debian: use yaml-cpp >= 0.6
* since focal and centos both have yaml-cpp 0.6 available, which dropped
having boost as it's dependency, moving to 0.6 seems a good upgrade.

* cmake: delete Buildyaml, since distro suppilies v0.6 this is not needed

This fixes the build failure, as jaegertracing requires yaml-cpp v0.6+
```
Could NOT find yaml-cpp: Found unsuitable version "", but required is at
  least "0.5.1" (found yaml-cpp_LIBRARY-NOTFOUND)

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2021-07-22 10:58:08 +05:30
Dan van der Ster
092a6e3e83 ceph.spec: selinux scripts respect CEPH_AUTO_RESTART_ON_UPGRADE
In /etc/sysconfig/ceph we allow operators to define if ceph daemons
should be restarted on upgrade: CEPH_AUTO_RESTART_ON_UPGRADE.

But the post selinux scripts will stop ceph.target regardless if this
is set to `no`, leading to operators adding various hacks to prevent
these unexpected or inconvenient daemon restarts. By now, if users
are using rpms directly, they are likely orchestrating their own
daemon restarts so should not rely on the rpm itself to do this.

Fixes: https://tracker.ceph.com/issues/21672
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
2021-07-12 15:35:39 +02:00
Nathan Cutler
b9c14266a7 rpm: remove macro invocation from comment line
In RPM spec files, comment lines should not include macro invocations,
because RPM can and will expand them, with unpredictable results.

Fixes: https://tracker.ceph.com/issues/51622

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2021-07-10 15:04:07 +02:00
Kefu Chai
4a3a74fd46 ceph.spec,debian: drop protobuf dependencies
since Seastar has dropped the protobuf dependencies, there is no
need to prepare them for building crimson anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-07-08 08:49:57 +08:00
Kefu Chai
2026a7f0d3
Merge pull request #41999 from tchaikov/wip-rpm-deb
rpm,debian: cleanups related to python3-setuptools dependencies

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
2021-06-29 16:16:32 +08:00
Kefu Chai
d3d967794c
Merge pull request #41998 from kevinzs2048/arm64-rwl-cache-optional
ceph.spec.in, debian/rules: enable rbd-rwl-cache by default only on x86_64

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-06-27 22:31:23 +08:00
Kefu Chai
7213811dd0 ceph.spec.in: increase memory per core to 3000MB on SUSE distros
in the KVM instance offered by OBS, we have

[  346s] + cat /proc/meminfo
[  347s] MemTotal:       10167736 kB
[  347s] MemFree:         4983964 kB
[  347s] MemAvailable:    9826800 kB
[  347s] Buffers:           85856 kB
[  347s] Cached:          4615192 kB
[  347s] SwapCached:            0 kB
...
[  347s] SwapTotal:       2097148 kB

and its number of hardware threads is

[  346s] ++ /usr/bin/getconf _NPROCESSORS_ONLN
[  346s] + _threads=8

so ($MemTotal+$SwapTotal)/1024/2600 = 4.6, which is less
than the # of threads, so "4" was used for the number of jobs.

but per our recent observation in
38be14bc0f, some compiling jobs could
take up to 3GB. in the OOM failure in OBS, we had

[24915s] [24848.843594] Out of memory: Killed process 16894 (cc1plus) total-vm:4293756kB, anon-rss:2970012kB, file-rss:0kB, shmem-rss:0kB, UID:399 pgtables:8324kB oom_score_adj:0

where 4GiB memory was allocated, in which 3GiB was mapped into
memory. this matches with our findings.

in this change, the memory per core is bumped up to 3000MB
in hope to address the OOB. the downside of this change is
that it would take even longer to finish the build if the
building host is limited in memory.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-25 19:27:34 +08:00
Kevin Zhao
8c7729af08 ceph.spec.in, debian/rules: Set rbd-rwl-cache optional on arm64 and ppc64le
set rwl cache option on arm64 and ppc64le as PMDK is not well supported.
Currently, only 64-bit Linux* and Windows* on x86 are supported PMDK

Reference:
1. Experimental support on Arm64, but lacking of librpmem:
See: https://github.com/pmem/pmdk#experimental-support-for-64-bit-arm
2. No RPM for PMDK on Arm64:
See: https://bugzilla.redhat.com/show_bug.cgi?id=1340635
3. > Does PMDK support ARM64*?
   > Currently only 64-bit Linux* and Windows* on x86 are supported.
See: https://software.intel.com/content/www/us/en/develop/articles/persistent-memory-faq.html
4. Make check fail on Arm64
See: https://github.com/pmem/pmdk/issues/5255

Fixes: https://tracker.ceph.com/issues/51339
Signed-off-by: Kevin Zhao <kevin.zhao@linaro.org>
2021-06-25 11:53:18 +08:00
Kefu Chai
3c1cae8dd5 ceph.spec.in: enable --with-rbd_ssd_cache by default
unlike rbd_rwl_cache, rbd_ssd_cache does not depend on pmdk (libpmem),
so let's enable it on all supported architecture and rpm based distros.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-24 19:54:50 +08:00
Kefu Chai
c4fbf39d2e cmake,deb,rpm: drop ceph-deploy manpage
ceph-deploy is not actively maintained anymore, and it was replaced by
ceph-volume and other high-level tools.

so there is no point to package its manpage anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-24 12:13:17 +08:00
Kefu Chai
e3c770cca8 ceph.spec.in: move ceph_volume python module into ceph-osd
the ceph-volume tool is composed of the cli frontend and ceph_volume
python module. in 02bc369e05, its cli
frontend is moved from ceph-base package to ceph-osd. but the python
module was left in ceph-base.

since the only consumer of ceph_volume python package is ceph-volume,
better off moving this python module into ceph-osd. this also aligns
the rpm packaging with the deb packaging, where ceph-osd deb package
also include ceph_volume python module.

we could extract ceph-volumne into its own package, so it can be an
arch-independent package. let's leave it as a follow-up change.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-24 12:13:17 +08:00
Kefu Chai
99eec32343 ceph.spec.in: move "Requires: python3-setuptools" from ceph-base to ceph-osd
python3-setuptools was originally added to ceph-base as a dependency of
ceph-detect-init, see https://tracker.ceph.com/issues/14864. but since
ceph-disk and ceph-detect-init were replaced by ceph-volume, and were
removed from the debian packaging in
ee6bc23e89.

there is no need to have python3-setuptools in the ceph-base packages
anymore.

but since we are still using pkg_resources module provided by setuptools
in ceph-volume, we need to preserve this runtime dependency in ceph-osd.
as ceph-osd packages ceph-volume.

please note, pkg_resources module is also used by cephadm to poke around
ceph_iscsi python module installed in a container, so python-setuptools
should be installed along with ceph-iscsi if we need a better
interoperability between ceph-iscsi and cephadm. this is not in the
scope of this change.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-24 12:13:17 +08:00
Kefu Chai
e745fc2184 ceph.spec.in: bump up the required version of fmt-devel to 6.2.1
6.2.1 is the version packaged by EPEL8, in other words, this is the
version we've been testing. so to be more consistent with the
known-to-be-good version, let's bump up the required version.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-18 11:14:30 +08:00
Kefu Chai
38be14bc0f ceph.spec.in: increase the mem_per_job to 3GiB
to lower the number of jobs, we are experiencing build failures on
a builder with 48c96t, 193 free mem. the failures were caused by
OOM killer which kills the c++ compiler

[498376.128969] oom-kill:constraint=CONSTRAINT_NONE,nodemask=(null),cpuset=/,mems_allowed=0,global_oom,task_memcg=/system.slice/jenkins.service,task=cc1plus,pid=1387895,uid=1110
[498376.145288] Out of memory: Killed process 1387895 (cc1plus) total-vm:3323312kB, anon-rss:3164568kB, file-rss:0kB, shmem-rss:0kB, UID:1110
[498376.315185] oom_reaper: reaped process 1387895 (cc1plus), now anon-rss:0kB, file-rss:0kB, shmem-rss:0kB
[498377.882072] cc1plus invoked oom-killer: gfp_mask=0x6200ca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0

before this change, we use the total memory to calculate the number
of jobs, and assume that each job takes at most 2.5GiB mem. in the
case above, the # of job is 96.

after this change, we use the free memory, and increse the mem per job
to 3.0GiB. in the case above, the # of job would be 85.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-06-03 21:02:33 +08:00
Misono Tomohiro
f38def9273 ceph.spec.in: install gcc-toolset-9-gcc-c++ for rhel only
Otherwise fedora 33 complains there is no gcc-toolset-9-gcc-c++
when running "WITH_SEASTAR=true ./install_deps.sh"

Related to: 36759b5363
Signed-off-by: Misono Tomohiro <misono.tomohiro@jp.fujitsu.com>
2021-05-26 16:21:34 +09:00
Kefu Chai
1c04ce6f3a doc/man: build and install cephfs-shell manpage
otherwise the manpage of cephfs-shell is not built and installed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-05-05 14:41:50 +08:00
Patrick Donnelly
52faaf848e
Revert "Merge PR #41134 into master"
This reverts commit 93bca2d0e9, reversing
changes made to 7e70b15c43.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-05-04 14:46:47 -07:00
Kefu Chai
5191008aa4 doc/man: build and install cephfs-shell manpage
otherwise the manpage of cephfs-shell is not built and installed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-05-04 15:11:22 +08:00
Kefu Chai
ecb8d2cae2 ceph.spec.in: do not build with system pmdk by default
we need to use libpmem 1.10 in #40493.

without enabling the module stream offering libpmem 1.9.2, we can only
have access to libpmem 1.6.1. and fedora 33 only has libpmem 1.9
packaged. the same applies to openSUSE Tumbleweed and openSUSE Leap. so
let's stop using libpmem packaged by distro by default, until these
distros include libpmem 1.10.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-26 16:38:09 +08:00
Patrick Donnelly
a4d3377ff4
Merge PR #40526 into master
* refs/pull/40526/head:
	spec: add nfs to spec file
	mgr/nfs: Don't enable nfs module by default
	mgr/nfs: check for invalid chars in cluster id
	mgr/nfs: Use CLICommand wrapper
	mgr/nfs: reorg nfs files
	mgr/nfs: Check if transport or protocol are list instance
	mgr/nfs: reorg cluster class and common helper methods
	mgr/nfs: move common export helper methods to ExportMgr class
	mgr/nfs: move validate methods into new ValidateExport class
	mgr/nfs: add custom exception module
	mgr/nfs: create new module for export utils
	mgr/nfs: rename fs dir to export
	mgr/volumes/nfs: Move nfs code out of volumes plugin

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
2021-04-22 09:20:59 -07:00
Kefu Chai
148ede83f6
Merge pull request #40956 from rzarzynski/wip-crimson-depends-on-binutils
ceph.spec.in: crimson depends on binutils b/c of addr2line.

Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-04-22 15:27:54 +08:00
Varsha Rao
8ab4950171 spec: add nfs to spec file
Signed-off-by: Varsha Rao <varao@redhat.com>
2021-04-22 11:38:30 +05:30
Radoslaw Zarzynski
32af87341b ceph.spec.in: crimson depends on binutils b/c of addr2line.
This small utility is needed due to the backtrace processing.
See: d3dcf510c3.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2021-04-21 09:39:02 +00:00
Kefu Chai
f057ea202f
Merge pull request #40749 from tchaikov/wip-python3-spec
ceph.spec: consolidate python3-{setuptools,Cython} builds deps

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
2021-04-19 15:49:37 +08:00
Kefu Chai
5ddda38da4 common: extract options into yaml
extract the options in common/options.cc into separate .yaml.in
files, and preprocess them using CMake before translating them into .cc
files using a python script.

this change paves the road to render the options using sphinx, and
will allow us to further annotate the options to include more metadata.

also, a this YAML file can be consumed by applications like dashboard
and Sphinx to consume these metadata in a simpler way.

* use @variable-name@ for substituting the variables in .yaml.in file
* use cmake variable of `mgr_disabled_modules` instead of C macro
  to define `mgr_disabled_modules` in global.yaml.in
* debian/control, ceph.spec.in, win32_deps_build.sh: add python3-yaml
  as build dep
* add y2c.py (short for YAML to C++) to translate .yaml to .cc file
* common/options/*.yaml.in: extract and split options into .yaml.in
  files, the subvars in it is then replaced with CMake variables,
  and copied to the corresponding .yaml files
* include/config-h.in.cmake: remove MGR_DISABLED_MODULES, as it
  is not a CMake variable.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-13 09:13:47 +08:00
Kefu Chai
65ac18be6a ceph.spec: consolidate python3-{setuptools,Cython} builds deps
the names of these packages are the same across SUSE and fedora/RHEL
distros.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-10 23:08:50 +08:00
Ilya Dryomov
dc55f0bb43 packaging: require ceph-common for immutable object cache daemon
This daemon has a systemd service which starts it with --setuser ceph
--setgroup ceph.  "ceph" user and group are created by ceph-common and
won't be there unless ceph-common is installed.

Fixes: https://tracker.ceph.com/issues/50207
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
2021-04-07 13:11:23 +02:00
Nathan Cutler
404f8b2ce2 rpm: add missing % in %dir directive
de6c8250a6 added an explicit %dir directive for
a new directory added to the ceph-common package, but -- due to a typo --
neglected to include the "%". As a result, RPM builds started to fail with:

Processing files: ceph-common-17.0.0-2787.gde6c8250.el8.x86_64
error: File must begin with "/": {_libdir}/ceph/denc/

RPM build errors:
    File must begin with "/": {_libdir}/ceph/denc/

Fixes: de6c8250a6
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2021-04-05 17:30:04 +02:00
Nathan Cutler
de6c8250a6 rpm: make ceph-common own the new denc directory
2d3c6561b4 introduced a new library directory
"%{_libdir}/ceph/denc/" in ceph-common but did not explicitly state that it
should be owned by the package. This caused OBS builds to fail as follows:

[ 5515s] ceph-common-17.0.0-2786.1.x86_64.rpm: directories not owned by a package:
[ 5515s]  - /usr/lib64/ceph/denc

Fixes: 2d3c6561b4
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2021-04-04 11:02:11 +02:00
Kefu Chai
2d3c6561b4 tools/ceph-dencoder: build dencoders as plugins
to reduce the memory footprint when linking ceph-dencoder.

* src/tools/ceph-dencoder:
  * build dencoders as shared libraries named with the prefix of
    "den-mod-". so ceph-dencoder can find them
  * install dencoders into $prefix/lib/ceph/denc, so ceph-dencoder
    can find them
  * only expose "register_dencoders()" function from plugins.
  * load plugins in specified directory
* ceph.spec.in: package plugins
* debian: package plugins

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-04-01 15:46:22 +08:00
Nathan Cutler
4025858570 rpm: drop extraneous explicit sqlite-libs runtime dependency
Commit 75980798f1 introduced a new package,
libcephsqlite, with a hard RPM dependency on a package "sqlite-libs" which
does not exist in openSUSE.

Since the runtime library dependencies of libcephsqlite are handled by RPM
transparently, this line is not needed.

Fixes: https://tracker.ceph.com/issues/50007
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2021-03-27 13:22:26 +01:00
Ludwig Nussel
e4c4a4ce97 ceph.spec: prepare openSUSE usrmerge (boo#1029961)
The compat symlink in /sbin is no longer required and actually in
the way in the usrmerge case.

Signed-off-by: Ludwig Nussel <ludwig.nussel@suse.de>
2021-03-25 10:35:35 +01:00
Kefu Chai
f3ad86069e
Merge pull request #40300 from tchaikov/test-promtool
ceph.spec,install-deps: use golang-github-prometheus for promtools

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2021-03-23 17:30:58 +08:00
Kefu Chai
e33e3a931d ceph.spec,install-deps: use golang-github-prometheus for promtools
instead of installing docker for using promtools, install
golang-github-prometheus.

Signed-off-by: Aashish Sharma <aasharma@redhat.com>
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-22 14:13:17 +08:00
Patrick Donnelly
75980798f1
ceph.spec,debian: package libcephsqlite
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-03-19 08:52:55 -07:00
Kefu Chai
01a7ecaba2
Merge pull request #40163 from ktdreyer/resource-agents-noarch
rpm: ceph-resource-agents package is noarch

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-03-18 11:02:22 +08:00
Ken Dreyer
79808963a7 rpm: ceph-resource-agents package is noarch
The ceph-resource-agents package contains an architecture-independent
bash script and parent directories. There are no architecture-dependent
files here, so we can use a single noarch RPM across all host
architectures.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2021-03-16 16:18:11 -06:00
Kyr Shatskyy
a435380dc3 ceph.spec.in: use ninja instead of ninja-build for openSUSE
And since the dependency is now distro-conditional, moving it down
to the 'distro-conditional make check dependencies' section.

Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2021-03-16 12:45:26 +01:00
Kefu Chai
75b58115ea ceph.spec: build with system libpmem on fedora and el8
* build with WITH_SYSTEM_PMDK=ON on fedora, as f32 and f33 ship
  libpmem1.8 and libpmem1.9 respectively. and we need libpmem v1.7
* build with WITH_SYSTEM_PMDK=ON on el8, as el8 and CentOS8 AppStream
  ships libpmem v1.6,

quote from nvml.spec:

> By design, PMDK does not support any 32-bit architecture.
> Due to dependency on some inline assembly, PMDK can be compiled only
> on these architectures:
> - x86_64
> - ppc64le (experimental)
> - aarch64 (unmaintained, supporting hardware doesn't exist?)

so far, only x86_64 and ppc64le packages are built.

see also,
https://src.fedoraproject.org/rpms/nvml/blob/rawhide/f/nvml.spec

this change addresses a regression introduced by
a49d1dbb32

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-12 23:04:11 +08:00
Kefu Chai
80f8f0956c ceph.spec: include ninja as BuildRequires
to ease the build for developers using SUSE, Fedora, CentOS or RHEL.
so install-deps.sh can install ninja for them.

Fixes: https://tracker.ceph.com/issues/49694
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-10 18:19:49 +08:00
Kefu Chai
6de97d4434 ceph.spec: prepare for out-of-source build
see also
https://fedoraproject.org/wiki/Changes/CMake_to_do_out-of-source_builds

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-03-09 19:13:19 +08:00
Kefu Chai
624be364c6
Merge pull request #39909 from smithfarm/wip-revert-make-build-on-suse
rpm: refrain from using %make_build macro on SUSE

Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-03-09 16:58:58 +08:00
Nathan Cutler
40cbd283bd rpm: refrain from using %make_build macro on SUSE
The recently merged commit 0e511973f7 replaced

    make %{_smp_mflags}

with

    %make_build

for the stated purpose of hiding the %_smp_mflags macro in a higher-level macro.

But, on SUSE, the higher-level macro (%make_build) expands to:

    make -O %{_smp_mflags}

The addition of the -O flag makes the build considerably slower and increases
the memory requirement. The exact reason for this is unknown - possibly it's due
to a bug in make, although the same slowness was observed with ninja as well.
In any event, this is a deal-breaker when building in the OBS, because the build
infrastructure there is optimized for builds that do not require huge amounts of
memory and we would rather have a fast build with mixed up compiler messages
than a very slow one with synced compiler messages.

Fixes: 0e511973f7
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2021-03-08 11:52:09 +01:00
Marcus Watts
8afd92425b rgw/kms/vault - need libicu to make canonical json for encryption contexts.
for encryption, aws s3 provides an "encryption" context to vary per-object
keys.  The encryption context is a base64 encoded json structure, which
must be converted to a determinstic form -- "canonical json".  This
requires converting all strings to a normalized canonical form: "utf-8 nfc",
it also requires thta keys in objects be sorted in a fixed order; so some
form of sorting based on nfc.

It turns out that libicu was the best way to produce utf-8 nfc (boost also
provides a mechanism, but it has many quirks).  So, here are the hooks
to pull the system libicu into the build.

Fixes: http://tracker.ceph.com/issues/48746
Signed-off-by: Marcus Watts <mwatts@redhat.com>
2021-03-05 17:15:24 -05:00
Nathan Cutler
8b5bae19e5
Merge pull request #39813 from smithfarm/wip-49583
rpm: disable parallel compression on SUSE

Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-03-05 14:28:08 +01:00
Nathan Cutler
30df650e64 rpm: use PMDK system libraries on SUSE
As of a49d1dbb32, when the rbd_rwl_cache and
rbd_ssd_cache bconds are enabled and WITH_SYSTEM_PMDK is disabled (as it is by
default), the RPM build attempts to

    git clone https://github.com/ceph/pmdk.git

but of course that won't work in the OBS, where the build workers have no
Internet connectivity.

Fortunately, the openSUSE/SLE versions targeted by Ceph master and pacific ship
the necessary PMDK libraries as RPM packages.

Fixes: a49d1dbb32
Fixes: https://tracker.ceph.com/issues/49550
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2021-03-03 20:46:20 +01:00
Nathan Cutler
ef0384dc50
Merge pull request #39765 from smithfarm/wip-ncpus-for-obs
rpm: set build parallelism from memory on SUSE

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: David Galloway <dgallowa@redhat.com>
2021-03-03 20:44:20 +01:00
Nathan Cutler
19f492014b rpm: drop old SUSE-specific OOM fix
This fix was needed some years ago, but no longer.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2021-03-03 15:52:04 +01:00
Nathan Cutler
7efcc72483 rpm: limit build jobs by system memory on SUSE
43b441f9a3 removed a bunch of code which the SUSE
builds were relying on to avoid OOM. This commit brings back that code in
a much-streamlined form: the SUSE-specific %limit_build macro.

This also has the advantage of not breaking the build on older RPMs which only
know about %_smp_mflags, and not the newer %_smp_build_ncpus etc. macros.

Fixes: 43b441f9a3
Fixes: https://tracker.ceph.com/issues/49556
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2021-03-03 15:52:04 +01:00
Nathan Cutler
a63a94714a rpm: disable parallel compression on SUSE
This code causes the Ceph build in OBS to fail due to OOM, because the typical
setting of %_smp_build_ncpus in the OBS is 16, but available memory is
insufficient to sustain such a high degree of parallelism for the in-memory
compression operation.

Fixes: b50fc9e61c
Fixes: https://tracker.ceph.com/issues/49583
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2021-03-03 15:48:05 +01:00
Nathan Cutler
f27484e84c rpm/luarocks: simplify conditional and support Leap 15.3
The luarocks conditional had gotten hard to read, and the openSUSE Leap 15.3
build needs lua53 as well.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2021-03-01 21:20:45 +01:00
Nathan Cutler
ffd202a086 rpm: re-disable SUSE lttng build on z390x
This partially reverts 2b1e646f7a which
mistakenly changed a line inside an "%if 0%{?suse_version}" conditional.

Fixes: 2b1e646f7a
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2021-02-25 19:16:59 +01:00
Kefu Chai
ad46841715
Merge pull request #39427 from ktdreyer/rpm-whitespace
ceph.spec.in: remove trailing whitespace

Reviewed-by: Andrew Schoen <aschoen@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2021-02-24 17:00:04 +08:00
Kyr Shatskyy
1850dd508f ceph.spec.in: use lua53 for openSUSE 15.2
Signed-off-by: Kyr Shatskyy <kyrylo.shatskyy@suse.com>
2021-02-22 16:57:27 +01:00
Kefu Chai
e08fcf8900
Merge pull request #39552 from smithfarm/wip-49356
rpm: openSUSE Tumbleweed has lua54 now

Reviewed-by: Yuval Lifshitz <ylifshit@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-02-21 19:50:20 +08:00
Jason Dillaman
963d854aba
Merge pull request #39539 from lixiaoy1/enable_pwl
cmake: enable write-back cache in spec

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2021-02-20 12:59:04 -05:00
Kefu Chai
71aea12bac ceph.spec.in: s/%cmake/cmake/
this change partially reverts da7030db79
which use %cmake rpm macro in the place of "cmake". but

%cmake sets BUILD_SHARED_LIBS=ON. so quite a few internal libraries
defined using add_library() are now compiled into shared libraries which
are not installed or packagesd. when we are installing the rpm packages
compiled with this option, rpm compiles because the linked libraries are
missing, for instance, `libgmock.so.1.10.0` was compiled as a static
library before da7030db79, and was
included by the test executables. but after that change it's compiled
as a shared library.

so we need to either package the linked shared libraries or just link
against them statically. at this moment, the latter approach is simpler,
albeit larger size of exectuable and dbg symbols.

Fixes: https://tracker.ceph.com/issues/49395
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-02-20 11:43:30 +08:00
lixiaoy1
a49d1dbb32 cmake: enable write-back cache in spec
Signed-off-by: Li, Xiaoyan <xiaoyan.li@intel.com>
2021-02-19 20:22:50 -05:00
Nathan Cutler
d8ee565b64 rpm: openSUSE Tumbleweed has lua54 now
Until someone figures out an easier way, we are stuck with the minor Lua version
in the package names.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2021-02-19 09:58:51 +01:00
Kefu Chai
0c079852cd
Merge pull request #39506 from tchaikov/wip-rpm-multi-thread-xz
ceph.spec.in: use multi-threaded xz compression and cleanups

Reviewed-by: David Galloway <dgallowa@redhat.com>
2021-02-18 09:32:27 +08:00
Kefu Chai
144bf31087 ceph.spec.in: use %make_install macro
hide buildroot in the implementation of this macro

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-02-17 21:06:18 +08:00
Kefu Chai
0e511973f7 ceph.spec.in: use %make_build instead of "make"
so we can hide the `_smp_mflags` in `%make_build` macro

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-02-17 21:06:18 +08:00
Kefu Chai
43b441f9a3 ceph.spec.in: use a macro helper to limit number of jobs
so it can work with the rpm macros better.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-02-17 21:06:18 +08:00
Kefu Chai
35d1ba003d ceph.spec.in: specify cmake variable type
for better readablity

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-02-17 12:39:55 +08:00
Kefu Chai
da7030db79 ceph.spec.in: use %cmake macro
%cmake passes a bunch of default flags, so we can save some efforts.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-02-17 12:39:55 +08:00
Kefu Chai
bd4da136ba ceph.spec.in: use RPM_BUILD_NCPUS for number of jobs
this env variable is defined by /usr/lib/rpm/macros. let's used it
instead of inventing our own version.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-02-17 12:39:55 +08:00
Kefu Chai
b50fc9e61c ceph.spec.in: use multi-threaded xz compression
so we can build the compressed src rpm and binary rpms with smaller
latency.

see also
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/7.3_release_notes/technology_previews_installation_and_booting

by default, rpm uses

w9.gzdio

which means: gzip level 9. but since xz is able to compress using
multiple threads, let's switch to xz.

xz's default compression level is 6, but ceph's source and binary
packages are relatively large. let's use a higher compression level.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-02-17 11:25:37 +08:00
Ken Dreyer
1a6c3cffaa ceph.spec.in: remove trailing whitespace
RPM's parseSpec() Python method internally strips this whitespace
character.

Tools that process this spec file with parseSpec() and evaluate
RPMTAG_DESCRIPTION cannot match this exact %description string as
written here.

Strip the trailing whitespace so that the RPMTAG_DESCRIPTION header
matches what we've written in the spec.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2021-02-11 11:01:19 -07:00
Yaakov Selkowitz
0f783b7e3b ceph.spec.in: bump gperftools requirement for ppc64le
gperftools' libprofiler did not build on ppc64le until 2.7.90.
The EPEL 8 package is being updated accordingly.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2021-02-09 11:30:43 -05:00
Yaakov Selkowitz
2b1e646f7a ceph.spec.in: enable tcmalloc and lttng on s390x
The necessary prerequisites are already in RHEL+EPEL 8.

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
2021-02-09 11:06:52 -05:00
luo.runbing
893924c20d
ceph.spec.in: fix missing backslash for line continuation
it errors while building without lua_packages:

+ -DBOOST_J=102 -DWITH_GRAFANA=ON
/var/tmp/rpm-tmp.aq2X3J: line 91: -DBOOST_J=102: command not found

Signed-off-by: luo.runbing <luo.runbing@zte.com.cn>
2021-02-09 09:39:41 +08:00
J. Eric Ivancich
8e03dbce42
Merge pull request #39176 from ivancich/wip-rgw-gap-list
rgw: tooling to locate rgw objects with missing rados components

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Michael Kidd <linuxkidd@gmail.com>
2021-02-04 15:16:48 -05:00
J. Eric Ivancich
3c5154f010 rgw: add rgw-gap-list-comparator tool
The rgw-gap-list tool can produce a number of false positives when the
cluster is being used during its run. One technique to minimize the
number of false positives is to run the tool twice and look for the
objects that appear in both lists. The rgw-gap-list-comparator tool is
designed to do this comparison.

Signed-off-by: Michael Kidd <linuxkidd@gmail.com>
2021-02-03 16:57:50 -05:00
J. Eric Ivancich
07b42195fb rgw: add rgw-gap-list tool
Due to a prior bug (pr: 38228) tail rados objects of some RGW objects
could have been incorrectly deleted. This tool is designed to look for
such cases. It essentially does the opposite of rgw-orphan-list,
looking for rados objects that RGW expects to be there, but which are
not to be found.

IMPORTANT: This is very experimental at this point in time, and any
"results" produced should be verified by other means.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
Signed-off-by: Michael Kidd <linuxkidd@gmail.com>
2021-02-03 16:57:50 -05:00