Commit Graph

1486 Commits

Author SHA1 Message Date
Sebastian Wagner
46188c4caa
Merge pull request #39007 from mgfritch/cephadm-podman-2.0
cephadm: require podman >= 2.0.0

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
2021-01-29 10:26:03 +01:00
Michael Fritch
a899227895
spec, debian: recommend podman >= 2.0.2
Signed-off-by: Michael Fritch <mfritch@suse.com>
2021-01-26 08:01:55 -07:00
Jason Dillaman
6aba1c7bba
Merge pull request #39049 from lixiaoy1/fix_spec
spec: enable RWL/SSD caches

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2021-01-26 09:46:44 -05:00
lixiaoy1
12ca24fc26 spec: enable RWL/SSD caches
Signed-off-by: Li, Xiaoyan <xiaoyan.li@intel.com>
2021-01-26 04:21:30 -05:00
Venky Shankar
b7acf7fc77 pybind/mgr/mirroring: interface to mirror CephFS directory snapshots
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2021-01-19 01:06:43 -05:00
Patrick Donnelly
78a7df1500
Merge PR #38846 into master
* refs/pull/38846/head:
	*: remove legacy ceph_volume_client.py library

Reviewed-by: Varsha Rao <varao@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2021-01-14 08:10:19 -08:00
Patrick Donnelly
a3db265ad5
*: remove legacy ceph_volume_client.py library
This library is obsolete with the mgr volumes plugin since Nautilus.

The last remaining user of this library was Manila which will be using
the volumes plugin with Pacific and onwards.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-01-12 06:54:29 -08:00
Venky Shankar
1227752983 systemd: cephfs-mirror systemd unit files
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2021-01-12 05:57:32 -05:00
Venky Shankar
42233bb5df doc, man: man page for cephfs-mirror tool
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2021-01-12 05:57:32 -05:00
Venky Shankar
d5062c60f6 spec, deb: package cephfs-top utility
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2021-01-11 06:15:53 -05:00
Patrick Donnelly
d03064d930
Merge PR #38642 into master
* refs/pull/38642/head:
	rpm/deb/cmake: install mount.fuse.ceph man page

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2021-01-08 15:12:42 -08:00
Nathan Cutler
ea851e71fd
Merge pull request #38603 from smithfarm/wip-48604
rpm: require smartmontools on SUSE

Reviewed-by: Volker Theile <vtheile@suse.com>
2021-01-04 10:58:54 +01:00
Ken Dreyer
ad85bdf8de rpm/deb/cmake: install mount.fuse.ceph man page
Install the mount.fuse.ceph man page and ship it in the ceph-fuse
packaging along with the corresponding mount.fuse.ceph binary.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2020-12-17 16:30:07 -07:00
Yuval Lifshitz
c1af849a0d
Merge pull request #37924 from yuvalif/allow_packages_in_lua
rgw/lua: support packages via luarocks
2020-12-17 19:53:00 +02:00
Nathan Cutler
c7e160a381 rpm: require smartmontools on SUSE
SUSE container images are built using a process that excludes dependencies that
are merely recommended.

Fixes: https://tracker.ceph.com/issues/48604
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-12-16 11:46:46 +01:00
Kefu Chai
5af17733c7 rpm: package crimson-store-nbd in ceph-test package
when building with seastar enabled, package crimson-store-ndb in
"ceph-test" package. "crimson-store-nbd" is a new tool for testing
seastore using nbd.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-12-16 15:55:48 +08:00
Josh Durgin
8a74a937dd
Merge pull request #31358 from ideepika/wip-jaegertracing-in-ceph
jaegertracing build/ops integration

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2020-12-15 16:29:26 -08:00
Deepika Upadhyay
85ca7b36a0 jaeger: make tracing default turned off, until teuthology integration
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2020-12-11 10:08:09 +00:00
Deepika Upadhyay
3c5abab7ea ceph.spec.in: refactor s/Cephs/Ceph
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2020-12-11 08:35:22 +00:00
Deepika Upadhyay
4b69d3a184 jaeger, build/op: add jaeger and it's dependencies as submodules
* This commit introduces Jaegertracing library as package libjaeger,
  pickwhich would be consumed by other ceph pacakges such as ceph-common0

* adds the following dependencies, which would be build from source
  using ExternalProjectHelper.cmake +IncludeJaeger.cmake +
  Build<package>.cmake scripts:

  jaegertracing: v0.6.0 [added as a submodule]
  opentracing: v1.6.0 [added as a submodule]
  thrift: 0.13.0 [added as a submodule]
  yaml-cpp: 0.6.0
  json(optional)

* updates Boost to be installed instead of being build only, because
  jaegertracing them during their build process.

* ceph.spec.in: introduces a default enabled jaeger packaging option,
  which could be disabled using --without-jaeger flag during rpmbuild

* note: libjaeger package if enabled will be a dependency on ceph-common, ceph-mon, rgw_common and transitively will be a dependency for modules that have them as  a dependency.

Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2020-12-11 07:55:46 +00:00
Yuval Lifshitz
6ef3e52a3f rgw/lua: support packages via luarocks
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
2020-12-04 09:55:56 +02:00
Or Ozeri
ea3c1bfb9e librbd: add LUKS support
This commit introduces internal (not yet part of the api) librbd functions for:
1. formating an RBD image in LUKS format
2. parsing an RBD image in LUKS format

 The actual implementation of the LUKS format is done via libcryptsetup, which is added as a new dependency.

Signed-off-by: Or Ozeri <oro@il.ibm.com>
2020-11-23 10:32:14 -05:00
Ken Dreyer
d73134660e rpm: cephadm package is noarch
The cephadm package contains an architecture-independent Python script,
empty directories, and an empty authorized_keys file. 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>
2020-11-18 09:21:27 -07:00
David Turner
1de14c7f9b rpm,deb: change sudoers file mode to 440
change sudoers file mode to 440 to match recommended defaults.

From the sudoers man page.

> the default file mode is 0440 (read‐able by owner and group, writable
by none).
> The default mode may be changed via the “sudoers_mode” option to the
sudoers
>  Plugin line in the sudo.conf(5) file.

Fixes: https://tracker.ceph.com/issues/48169
Signed-off-by: David Turner <drakonstein@gmail.com>
2020-11-12 14:09:03 +08:00
Yuval Lifshitz
80223d8b3c rpm/deb/cmake: remove the lua submodule
instead use the official lua-dev/el packages

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
2020-11-04 17:01:58 +02:00
Kefu Chai
e96c45d9d2
Merge pull request #37751 from changchengx/nasm_avx512
common: use nasm to build isa-l and isa-l_crypto to prepare for AVX512

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-10-31 11:41:19 +08:00
Kefu Chai
d162c00c66
Merge pull request #37788 from tchaikov/wip-zbd
rpm,cmake: s/WITH_LIBZBD/WITH_ZBD/ and enable ZBD on demand

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-By: Neha Ojha <nojha@redhat.com>
2020-10-30 11:17:56 +08:00
Changcheng Liu
497b4d6f72 cmake: remove yasm since it's been replaced by nasm
Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
2020-10-29 12:36:20 +08:00
Changcheng Liu
a944232ad4 install-deps.sh: install nasm for isa-l library
nasm support build isa-l:AVX512 algorithm implementation while yasm
doens't support it. Install nasm assembler to build isa-l
refer to: https://github.com/yasm/yasm/issues/101

Signed-off-by: Changcheng Liu <changcheng.liu@aliyun.com>
2020-10-29 12:35:55 +08:00
Kefu Chai
98c06b534f rpm: pass -DWITH_ZBD=ON to cmake if zbd is enabled
this is a leftover of fd1b02a341e3afba32776e35ec7c4bbe883f9b06

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-10-29 11:19:40 +08:00
Kefu Chai
b28174f13f
Merge pull request #37761 from tchaikov/wip-ceph.spec-with-seastar
ceph.spec.in: install gcc-toolset on RHEL only

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2020-10-28 14:43:49 +08:00
Adam C. Emerson
c9d20eb1a0 rpm: Remove use of no-longer-existing WITH_BOOST_CONTEXT option
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
2020-10-23 11:21:53 -04:00
Kefu Chai
36759b5363 ceph.spec.in: install gcc-toolset on RHEL only
there is no need to use GTS for compiling crimson, as the GCC-10 shipped by
fedora32 is good enough.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-10-23 10:49:08 +08:00
Nathan Cutler
b8168d9e8a Revert "spec: Podman (temporarily) requires apparmor-abstractions on suse"
This reverts commit 070e5c3e35ea476815ff9fa4f71aed147fe1ea79.

This commit was working around a bug that was present in old (pre-1.8.0)
versions of podman. Since we are no longer running cephadm with versions
that old, we can safely drop this workaround.

Fixes: https://tracker.ceph.com/issues/47862
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-10-15 11:21:21 +02:00
Nathan Cutler
f5fc346bb2 Revert "rpm: on SUSE, podman is required for cephadm to work"
This reverts commit 009ade0c3ea624ecf47c8a3f9d1673b342e967cc.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-10-15 11:21:21 +02:00
Kefu Chai
ade1a6e394
Merge pull request #37455 from smithfarm/wip-spec-file-cleanup
rpm: three spec file cleanups

Reviewed-by: Tim Serong <tserong@suse.com>
2020-10-14 15:43:30 +08:00
Venky Shankar
7523aef6e8 mgr/stats: mds performance stats module
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2020-10-12 07:34:51 -04:00
Nathan Cutler
3b53003f01 rpm: cleanup: drop useless conditional block in %postun base
The "meat" of this conditional was ripped out by
328807f80bb6b5d1aa40631e88d755a194d5d2c2, leaving only an empty shell
behind.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-09-29 15:54:19 +02:00
Nathan Cutler
f69aa5abfb rpm: cleanup: drop %service_del_postun_without_restart
SUSE needs %service_del_postun (with or without restart) *only* if there
is a possibility that the RPM containing the unit file will be upgraded
from a version that packaged SysVinit scripts instead of systemd unit
files. (Which is not the case here.)

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-09-29 15:54:12 +02:00
Franck Bui
7d99e786df rpm: cleanup: drop use of DISABLE_RESTART_ON_UPDATE
This SUSE-specific variable is deprecated and use of
%service_del_postun_without_restart macro should be preferred these
days.

Signed-off-by: Franck Bui <fbui@suse.com>
2020-09-29 15:53:29 +02:00
Kefu Chai
a42fd5c21e
Merge pull request #37281 from tchaikov/wip-fmt
rpm: add fmt-devel as build deps

Reviewed-by: Neha Ojha <nojha@redhat.com>
2020-09-29 08:14:34 +08:00
Kefu Chai
4aced0cba9
Merge pull request #37211 from tchaikov/wip-zbd
rpm,install-deps,run-make-check: enable WITH_ZBD build on demand

Reviewed-by: Neha Ojha <nojha@redhat.com>
2020-09-22 09:42:09 +08:00
Kefu Chai
fd779c3600 rpm: add fmt-devel as build deps
since libfmt > 5.0.0 is packaged by CentOS/RHEL8 and openSUSE/SLE
we can just use it instead of our own version. also, since libfmt is
used out side of crimson project, no need to guard it using "with
seastar" anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-22 01:01:51 +08:00
Yaarit Hatuka
d5528a7e8e ceph.spec.in, debian/control: add smartmontools and nvme-cli dependencies
These packages are needed in order to scrape device health metrics from
devices used by OSD and MON daemons.

smartmontools' smartctl is what we use in order to scrape devices' SMART
attributes and general health metrics.
In addition, we use nvme-cli tool on NVMe devices, which fetches
vendor specific NVMe related health metrics.

Ceph rely on these tools for proper functioning of the underlying layers
of devicehealth mgr module, and other mgr modules which use devicehealth
functionality (such as diskprediction_local, telemetry, dashboard).

Essentially, most of devicehealth commands rely on proper functioning of
smartctl, otherwise they lack the device health metrics.

For example, in case smartctl is missing, the commands:
    ceph device scrape-daemon-health-metrics <who>
    ceph device scrape-health-metrics [<devid>]
will not be able to scrape health metrics, and the command:
    ceph device predict-life-expectancy <devid>
will not provide any meaningful output (since there are no metrics).

In short, when we scrape a device by its daemon (be it an OSD or a MON):
  ceph device scrape-daemon-health-metrics <who>
The devicehealth module command eventually invokes a
block_device_get_metrics() call in either osd/OSD.cc or mon/Monitor.cc,
which wraps calls to both
    block_device_run_smartctl()       (spawns smartctl)
    block_device_run_vendor_nvme()    (spawns nvme)
in common/blkdev.cc.

Minimum version requirements:
'smartmontools' is the package name, which contains two utility
programs: 'smartd' and 'smartctl'. Ceph uses the latter.

Version 6.7 of smartctl first introduced the --json option (beta), which
allows to output the metrics in a JSON format. Since then a few
adjustments were made and the feature officially launched in smartctl
version 7.0.
Since we rely on the JSON format to process the metrics, we must have
smartmontools' smartctl version >= 7.

That said, we choose not to specify smartmontools version here on
purpose, since there might be a scenario where:
We specified smartmontools version to be >= 7.
smartmontools 7 is not available yet in rhel 8 / centos 8.
A user installs via rpm ceph-osd, for example.
smartmontools will not be installed (since version >= 7 is not available
in this repo yet).
Then the user upgrades to 8.3 (which should have smartmontools >= 7),
but smartmontools will not get upgraded (since it's not installed).
In the scenario where we do not specify a version, smartmontools 6.6
will be installed, but it will be upgraded to >= 7 when a user upgrades
(and if it's a fresh installation - version >= 7 would be installed
anyway).

nvme-cli does not have a minimum version.

We use 'Recommends' for both rpm and deb packages since we do not want
the installation to fail in case of conflicts. 'Recommends' weakens the
dependency to be installed in case possible, but ignores it in cases of
conflicts with other dependencies.

It's worth mentioning that smartmontools and nvme-cli dependencies exist
in ceph-container builds.
We add them here for the cases of bare metal installations.

In the future we will add a separate package (with smartmontools and
nvme-cli dependencies) that can be installed on any node (running
rbd-mirror, rgw, mds, mgr, etc.), in order to be able to collect the
health metrics of its devices and offer their life expectancy
prediction.

Fixes: https://tracker.ceph.com/issues/47479
Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
2020-09-18 03:25:56 +00:00
Kefu Chai
fd1b02a341 rpm: add --with-zbd option
libzbd-devel is not available in any distros official repo at the time
of writing. but we packaged it for RHEL8/CentOS8. and uploaded its
packages to http://apt-mirror.front.sepia.ceph.com/lab-extras/8/. to
build test it to avoid the bitrot of ZBD bluestore backend at a minimal
level. but we cannot do more than this. because

- the kernel shipped by RHEL/CentOS8 does not have zoned block device
  support enabled. see https://zonedstorage.io/distributions/linux/
- and we don't have zoned block device for testing in our lab.

so, in this change, "--with-zbd" option is added so we can pull
in the libzbd-devel package on demand.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-09-17 14:45:11 +08:00
Nathan Cutler
839c8ec6ba
Merge pull request #36994 from ktdreyer/boost-context-s390x
rpm: enable WITH_BOOST_CONTEXT for s390x

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
2020-09-07 12:39:12 +02:00
Sebastian Wagner
b54e270930
Merge pull request #36995 from smithfarm/wip-47305
rpm: on SUSE, podman is required for cephadm to work

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-09-07 10:39:25 +02:00
Kefu Chai
bc4255ba2c
Merge pull request #36972 from smithfarm/wip-47112
rpm,deb: drop /etc/sudoers.d/cephadm

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-09-07 14:44:44 +08:00
Ken Dreyer
121cde8c0a rpm: enable WITH_BOOST_CONTEXT for s390x
We've upgraded to Boost version 1.73
(1169dee2592ec41777207fcf5742b5e936a100fc), and this version provides
working support for boost::context for s390x. Enable this in the RPM
packaging.

Fixes: https://tracker.ceph.com/issues/47304
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2020-09-04 09:52:53 -06:00
Nathan Cutler
009ade0c3e rpm: on SUSE, podman is required for cephadm to work
On SUSE, cephadm is tested with podman only.

Fixes: https://tracker.ceph.com/issues/47305
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-09-04 17:51:07 +02:00
Nathan Cutler
c1783d3d8f rpm,deb: drop /etc/sudoers.d/cephadm
Current behavior (without this patch) is:

1. cephadm package installs cephadm at /usr/sbin/cephadm
2. cephadm package installs /etc/sudoers.d/cephadm
3. !!! BUT this file refers to a non-existent executable (/usr/bin/cephadm) !!!
4. the PR that introduced this sudoers file (and this discrepancy) was merged in 2019
5. nobody noticed the discrepancy until now

My conclusion: the file /etc/sudoers.d/cephadm is not needed for cephadm to
work.

Fixes: https://tracker.ceph.com/issues/47112
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-09-03 16:31:30 +02:00
Kefu Chai
9ea12cea31
Merge pull request #36932 from theMarix/patch-1
rpm: Fix typo in summary of prometheus-alerts package

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-09-03 22:05:06 +08:00
Sebastian Wagner
7f21e1ee02
Merge pull request #36949 from sebastian-philipp/mgr-re-add_osd_support
Revert "mgr/osd_support: remove module and all traces"

Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
2020-09-03 14:41:25 +02:00
Sebastian Wagner
43f1bdb6ef Revert "mgr/osd_support: remove module and all traces"
This reverts commit a55c1dd0fa.

Kept to keep upgrades from older point releases working.
This module can be removed as soon as we no longer
support upgrades from old octopus point releases.

Revert "build/debian: remove osd_support"

This reverts commit 8ff2824beb.

Fixes: https://tracker.ceph.com/issues/47109
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-09-02 16:07:49 +02:00
Venky Shankar
ad4e611924 ceph.spec, debian: changes for building cephfs-mirror daemon
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2020-09-02 06:50:08 -04:00
Matthias Bach
4d1e30470c rpm: Fix typo in summary of prometheus-alerts package
Signed-off-by: Matthias Bach <marix@marix.org>
2020-09-01 21:18:17 +02:00
Venky Shankar
29a6f72131 spec: include snap_schedule in ceph spec file
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2020-08-27 15:55:45 +02:00
Kefu Chai
2644766d0f pybind/mgr/diskprediction_cloud: remove mgr-diskprediction-cloud
the service offered by https://www.diskprophet.com is not accessible
anymore. before we have a replacement of it, let's drop
mgr-diskprediction-cloud. and remove its packaging.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-08-19 11:08:38 +08:00
Kefu Chai
5c038b99b3 ceph.spec.in: use gcc-toolset-9 for building crimson
since seastar dropped support from C++14, we have to move to a compiler
with a decent C++17 support.

in this change, gcc-toolset-9 is used for compiling ceph if seastar is
enabled. use version >= 9.2.1-2.2, because of
https://bugzilla.redhat.com/show_bug.cgi?id=1853900

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-08-15 17:43:40 +08:00
Patrick Donnelly
305e1b3445
Merge PR #32731 into master
* refs/pull/32731/head:
	mgr/mds_autoscaler: plugin to configure mds instances

Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2020-08-10 12:47:47 -07:00
Milind Changire
f69abe6291 mgr/mds_autoscaler: plugin to configure mds instances
mgr plugin to deploy and configure MDSs in response to degraded file system

MDS instance management as per changes to:
* 'max_mds' option
* 'standby_count_wanted' option
* mds liveness and transitions from standby to active

mds_autoscaler plugin test credit goes to Sebastian Wagner.

Fixes: https://tracker.ceph.com/issues/40929
Signed-off-by: Milind Changire <mchangir@redhat.com>
2020-08-07 17:09:10 +05:30
Jan Fajerski
42f47baab6
Merge pull request #36372 from jan--f/c-v-fix-package-common-dep
ceph-volume: dependency on python-ceph-common
2020-08-05 13:37:50 +02:00
Jan Fajerski
cb432fe41d ceph-volume: dependency on python-ceph-common
Since e5b585d15d ceph-volume depends on
python-ceph-common. This commit introduces this dependency for the
ceph-osd rpm (which includes ceph-volume) and installs the dependency
for tox runs.

Fixes: https://tracker.ceph.com/issues/46772
Fixes: e5b585d15d

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
2020-08-03 17:14:41 +02:00
Joshua Schmid
a55c1dd0fa mgr/osd_support: remove module and all traces
Signed-off-by: Joshua Schmid <jschmid@suse.de>
2020-07-31 10:11:45 +02:00
Sebastian Wagner
0ada965faf python-common, spec.in: Add missing pyyaml dependency
Fixes: cd6a488ab2
Fixes: https://tracker.ceph.com/issues/46759
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-07-30 09:55:08 +02:00
Kefu Chai
db20cfd095 ceph.spec.in: cull _FORTIFY_SOURCE macro from CXXFLAGS for seastar
seastar uses setjmp() and longjmp() to implement coroutine, but
longjmp() is defined as ____longjmp_chk() by GCC if _FORTIFY_SOURC is
defined. ____longjmp_chk() simply bails out with an error message if
the dest stack pointer is higher than the src stack pointer, or the dest
stack pointer is not in the sigaltstack. in the case of seastar, the dst
%sp is not necessarily higher than src stack pointer, and it's not
handling a signal for switching the thread context. that's why we have
the "longjmp causes uninitialized stack frame" error when running
crimson-osd on RHEL/CentOS 8 using the prebuilt rpm packages.

the optflags rpm macro adds -D_FORTIFY_SOURCE=2 to CFLAGS and CXXFLAGS,
so even seastar tries to pass -U_FORTIFY_SOURCE to GCC, there is chance
that cmake append CXXFLAGS at the end of the option list passed to GCC.
and this renders seastar's attempt to undefine _FORTIFY_SOURCE useless.

another way to address this issue is to undefine this macro in
seastar:src/core/thread.cc. but since seastar tries neutralize the macro
in its cmake script instead of source file, i assume they have their
considerations. let's drop it in the rpm recipe instead.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-07-23 16:19:56 +08:00
Kefu Chai
3902a5eede rpm,deb: drop python3-six dependency
it's not used anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-07-22 11:55:50 +08:00
Kefu Chai
8f1620b3c9 rpm: package crimson-osd in ceph-osd
in hope to simplify the enabling of crimson-osd. as we will use cephadm
as the way for deploying crimson-osd in future. it's unlikely we will
have classic osd and crimson osd co-located in the same system. so
this is most simple way to enable crimson-osd with minimum efforts.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-30 16:14:18 +08:00
Kefu Chai
338f47fe94 ceph.spec.in: Requires python3-scikit-learn only on fedora and suse
so far, python3-scikit-learn is not packaged by RHEL8/CentOS8 or EPEL8.

see
https://src.fedoraproject.org/rpms/python-scikit-learn/branches?branchname=master

this change should address the regression introduced by
d13b441cdb

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-25 18:19:55 +08:00
Kefu Chai
db4d3ca3aa
Merge pull request #35648 from ideepika/fix-44948
ceph.spec: fix mgr diskprediction_local dependency

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-06-25 16:10:05 +08:00
Deepika Upadhyay
62093a7eb2 ceph.spec: drop support for el7 for rpm builds
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2020-06-23 16:35:31 +05:30
Deepika Upadhyay
d13b441cdb ceph.spec: fix mgr diskprediction_local dependency
fixes: https://tracker.ceph.com/issues/44948
Signed-off-by: Deepika Upadhyay <dupadhya@redhat.com>
2020-06-23 14:58:51 +05:30
Neal Gompa
ed6552d506 rpm: Drop override on %_libexecdir
We no longer need it, as distributions are converging on /usr/libexec
since FHS 3.0 has specified it as the acceptable path for libexecdir.

Fedora has been using /usr/libexec since the beginning, and
openSUSE has accepted software installed into /usr/libexec since
September 2019 in openSUSE:Factory. openSUSE Leap 15.x still uses
/usr/lib for %_libexecdir, but the rest of the spec should handle the
change gracefully.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2020-06-08 13:15:04 -04:00
Kefu Chai
491fa555f9 ceph.spec.in: use %{_presetdir} for preset settings
the systemd preset settings should not be located under /usr/libexec
```
$ rpm --eval "%{_presetdir}"
/usr/lib/systemd/system-preset
```

see also
https://www.freedesktop.org/software/systemd/man/systemd.preset.html

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-08 13:15:04 -04:00
Neal Gompa
7c8e5de9c7 rpm: Add missing CMake parameter to path to systemd unit dir
This mimics the setting passed to CMake in other package builds,
and ensures that systemd units are installed into the right place.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2020-06-08 12:55:28 -04:00
Sebastian Wagner
e0bbb05f56
Merge pull request #35271 from bk201/refactor-template-cephadm
mgr/cephadm: use jinja2 to render templates

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-06-04 19:50:58 +02:00
Kiefer Chang
64bb27f2f6 mgr/cephadm: add template engine Jinja2
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
2020-06-04 16:23:39 +08:00
Kefu Chai
d234e5b06f ceph.spec.in: claim ownership of include/cephfs/metrics
otherwise, "osc build" fails like:

[ 5545s] libcephfs-devel-16.0.0-2172.ga59fb9ffac.x86_64.rpm: directories not owned by a package:
[ 5545s]  - /usr/include/cephfs/metrics

this addresses a regression introduced by
c669de12e076bcedf3fe6cfe52377713f06d7ceb

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-06-03 20:08:33 +08:00
Venky Shankar
c669de12e0 client: new message type for providing client side metrics
Signed-off-by: Venky Shankar <vshankar@redhat.com>
2020-06-01 04:04:08 -04:00
Jason Dillaman
5938d55e8c rpm,deb: package librbd parent cache plugin with librbd
The librbd parent cache is an initial testbed for librbd plugin
support. The shared library will be packaged with librbd for the
time being.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2020-05-21 14:50:33 -04:00
Patrick Donnelly
356c64a3ff
Merge PR #34596 into master
* refs/pull/34596/head:
	test: add a new program for testing ino_release_cb
	client: add a new inode release request callback
	client: expose ceph_ll_register_callbacks via libcephfs
	client: move callback typedefs and arg struct into ceph_ll_client.h
	client: rename ceph_statx.h to ceph_ll_client.h
	client: make client_dentry_callback_t more friendly for C
	client: only override umask_cb with non-NULL values

Reviewed-by: Xiubo Li <xiubli@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Zheng Yan <zyan@redhat.com>
Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2020-05-18 15:07:43 -07:00
Jason Dillaman
7f1df0d18a
Merge pull request #34789 from trociny/wip-rbd-nbd-quiesce
rbd-nbd: add quiesce/unquiesce hooks

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2020-05-15 11:12:50 -04:00
Mykola Golub
8b6e38a6bf rpm,deb: add quiesce hook script to rbd-nbd package
Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-05-09 16:36:49 +01:00
Kefu Chai
d5932cb8de rpm: BuildRequires fmt-devel on el8
it's included in EPEL8 now.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-05-09 01:54:55 +08:00
J. Eric Ivancich
9d5e9c3031 doc/rgw: add docs for rgw-orphan-list and ceph-diff-sorted
Add man pages and documentation for both tools.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
2020-05-04 13:33:56 -04:00
J. Eric Ivancich
e396064d9a rgw: add rgw-orphan-list tool & radosgw-admin bucket radoslist ...
Adds a `radosgw-admin` subcommand and walks the associated bucket
indices and manifests to generate the list of rados objects that
represent the rgw objects in the bucket(s).

Also adds a tool named `rgw-orphan-list`, which uses the radoslist
subcommand, that produces a list in a local file of what appear to be
rgw orphans.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
2020-05-04 13:20:08 -04:00
Jeff Layton
4436f27a04 client: rename ceph_statx.h to ceph_ll_client.h
...so we can use it to include other definitions and types that need to
be shared with in-tree code that doesn't want to include libcephfs.h.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2020-04-30 16:20:01 -04:00
Kefu Chai
f0a4fc14f0
Merge pull request #34090 from trociny/wip-ceph-erasure-code-tool
tools/erasure-code: new tool to encode/decode files

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-04-27 11:37:00 +08:00
Sebastian Wagner
9f13c126f6 doc/man: add cephadm
Fixes: https://tracker.ceph.com/issues/44971

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-04-23 13:01:02 +02:00
Mykola Golub
56aaaf8a97 test/erasure-code: remove ceph_erasure_code
Its functionality is moved to ceph-erasure-code-tool.

Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-04-13 18:25:09 +01:00
Mykola Golub
53c75eebbd rpm,deb: add ceph-erasure-code-tool to ceph-osd package
Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-04-13 18:25:09 +01:00
Kefu Chai
9748350a79
Merge pull request #34381 from rhcs-dashboard/fix-44721-master
rpm: add python3-saml as install dependency

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-04-08 15:25:22 +08:00
Ernesto Puerta
d8d3b33633
rpm: add python3-saml as install dependency
`python.*-saml` is required for Ceph-Dashboard SSO support (optional
feature).

Fixes: https://tracker.ceph.com/issues/44721
Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
2020-04-07 18:06:26 +02:00
Nathan Cutler
853ff61805 ceph.spec.in: remove extra tokens at end of %endif directive
RPM 4.15.1 warns: extra tokens at the end of %endif directive

Heed the warning.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-04-06 23:00:43 +02:00
Nathan Cutler
48c79c1102 ceph.spec.in: version an Obsoletes
RPM 4.15.1 warns: It's not recommended to have unversioned Obsoletes.

Heed the warning.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-04-06 23:00:23 +02:00
Casey Bodley
c89b59428e rgw: remove unused librgw_admin_user
unused and not worth the effort to maintain

Signed-off-by: Casey Bodley <cbodley@redhat.com>
2020-03-25 14:12:55 -04:00
Sage Weil
f1b516d1bf ceph.spec: put prometheus alerts in vendor-neutral location
Signed-off-by: Sage Weil <sage@redhat.com>
2020-03-23 20:13:18 -05:00
Kefu Chai
293e8bdf6c ceph.spec.in: add build deps for Debug build of seastar
it's a regression introduced by
6158bcfdef91cc2930c57ff2bbe2bfae37da7363, which dropped the change to
make Sanitizers optional

since we've switched from xenial to bionic. there is no need to disable
this anymore. we ran into an issue caused by the ancient linker shipped
by xenial before.

Fixes: https://tracker.ceph.com/issues/44658
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-03-18 11:02:23 +08:00
Sage Weil
603383605f Merge PR #33885 into master
* refs/pull/33885/head:
	Merge pull request #33848 from mchangir/octopus-tests-remove-suprious-whitespace
	Merge PR #33746 into octopus
	Merge PR #33830 into octopus
	Merge PR #33732 into octopus
	Merge PR #33620 into octopus
	Merge pull request #33876 from tchaikov/octopus-cephadm-mypy
	cephadm: add "assert foo is not None" for mypy check
	Merge pull request #33067 from tspmelo/wip-rbd-delete-with-snapshot
	cephadm: add grafana adopt
	Merge PR #33771 into octopus
	Merge PR #33850 into octopus
	Merge PR #33853 into octopus
	Merge PR #33857 into octopus
	Merge PR #32990 into octopus
	Merge PR #33713 into octopus
	Merge PR #33838 into octopus
	qa/tasks/cephadm: no default mon|mgr|crash service specs
	qa/suites/rados/cephadm/upgrade: upgrade start point that supports the no-spec option
	Merge PR #33832 into octopus
	cephadm: bootstrap: wait for mgr to restart after enabling a module
	mgr: add 'mgr_status' tell command
	Merge pull request #33839 from rhcs-dashboard/44538-fix-rgw-grafana-get-put-latencies
	Merge pull request #33743 from votdev/issue_43869_fix_qa_test
	cephadm: create initial mon and mgr service specs too
	cephadm: no need to pregenerate a crash key for the bootstrap host
	mgr/cephadm: do not complain when we don't have enough hosts
	mgr/cephadm: remove orphan daemons
	mgr/cephadm: report size=0 for fabricated ServiceDescription
	mgr/cephadm: safety check to prevent removing all mon|mgr daemons
	mgr/cephadm: prevent scaling mon|mgr below count=1
	mgr/cephadm: do not remove daemons from remove_service
	Merge pull request #33805 from tchaikov/wip-44500
	spec: Podman (temporarily) requires apparmor-abstractions on suse
	mgr/cephadm: Make sure we don't co-locate the same daemon
	monitoring: fix RGW grafana chart 'Average GET/PUT Latencies'
	tests: remove spurious whitespace
	mgr/cephadm: fix service list filtering
	Merge PR #33825 into octopus
	Merge PR #33811 into octopus
	Revert "Merge pull request #33673 from cbodley/wip-denc-enum"
	mgr/cephadm: fix upgrade order
	Merge PR #33801 into octopus
	Merge PR #33822 into octopus
	cephadm: bootstrap: tolerate error return from -h
	Merge PR #33809 into octopus
	Merge PR #32678 into octopus
	cephadm: use `sh` instead of `bash` during enter
	ceph.in: only shut down rados on clean exit
	common/ceph_timer: Pass reference to waited time on stack
	common/ceph_timer: Add test
	common/ceph_timer: Use unique_function, allowing noncopyable events
	common/ceph_timer: Couple cleanups
	common/ceph_timer: Fix namespaces
	common/ceph_timer: Add missing includes
	common/ceph_timer.h: Don't indent contents of a namespace
	mgr/dashboard: Crush rule modal
	mgr/dashboard: Preserve rule selection on pool type change
	mgr/dashboard: Crush rule is only send during replicated pool creation
	mgr/dashboard: Explicit returns in pool form
	mgr/dashboard: Removes fork join in pool form
	mgr/dashboard: Hide ECP actions during ec pool edit
	mgr/dashboard: Pool form erasure/replicated boolean
	mgr/dashboard: Change pool info API endpoint
	mgr/dashboard: Moves ECP info endpoint to UI-API
	mgr/cephadm: add _remove_osds_bg back to main loop
	mgr/cephadm/osd: update removal report immediately
	qa/tasks/ceph_manager: use StringIO for capturing COT output
	qa/standalone/scrub/osd-scrub-repair: force osdmap prop to osds
	qa/standalone/scrub/osd-scrub-test: wait longer for update
	qa/tasks/ceph_manager: capture stderr for COT
	qa/suites/rados/ceph: drop opensuse for now
	mon/MonClient: send logs to mon on separate schedule than pings
	mgr/dashboard: Fix missing ImageSpec usage
	mgr/dashboard: Allow removing RBD with snapshots
	mgr/dashboard: Refactor and cleanup tasks.mgr.dashboard.test_user
	mgr/dashboard: support multiple DriveGroups when creating OSDs
	mon/MonClient: send logs to mon even if we have no keelalive2
	cephadm: flag dashboard user to change password

Reviewed-by: Sebastian Wagner <swagner@suse.com>
2020-03-11 17:38:59 -05:00
Sebastian Wagner
070e5c3e35 spec: Podman (temporarily) requires apparmor-abstractions on suse
`apparmor-abstractions` contains a profile that is required to run podman containers.

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

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-03-10 13:57:25 +01:00
Nathan Cutler
fd7cb3dae5 rpm: drop "is_opensuse" conditional in SUSE-specific bcond block
Until now, "ocf" and "libradosstriper" were disabled on SLE, but not
openSUSE.

Leaving them enabled for openSUSE makes it appear as if these features
are expected to do something useful on SUSE.

Dropping the "is_opensuse" conditional has the desirable side effect of
streamlining the SUSE bcond block, and in the spirit of "and that's not
all", we take the opportunity to put the bconds in alphabetical order
for comforting cosmetic effect.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-03-06 10:26:44 +01:00
Mykola Golub
62620fc7d3 rpm,deb: fix python dateutil module dependency
(needed for mgr/rbd_support)

Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-02-28 16:29:26 +00:00
Jason Dillaman
d5b155df9b
Merge pull request #33389 from trociny/wip-43619
rbd: schedule for running trash purge operations

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2020-02-27 18:21:14 -05:00
Patrick Seidensal
c0c7f7dacc rpm,deb: poke Python OpenSSL dependencies
to ceph-mgr-modules-core package.

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

Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
2020-02-26 15:48:57 +01:00
Mykola Golub
19e5af1433 mgr/rbd_support: use dateutil parser intead of datetime fromisoformat
fromisoformat is available since python 3.7 only.

Signed-off-by: Mykola Golub <mgolub@suse.com>
2020-02-25 09:52:22 +00:00
Kefu Chai
659b09a04d
Merge pull request #33435 from tchaikov/wip-viva-la-module
deb,rpm,doc: s/plugin/module/

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
2020-02-21 19:38:33 +08:00
Kefu Chai
44df72357c rpm,deb: s/plugin/module/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-02-20 22:15:54 +08:00
Kefu Chai
589626464d rpm,deb: package always-enabled plugins in a separated package
ceph-mgr depends on it in the sense that these plugins are
a hard dependency of ceph-mgr. like cmake depends on cmake-data,
even if the later cannot function on its own without the former.

the reason why we need a separated package is that mgr modules
are written in python, and should be arch independent. this change
helps the downstream to understand this and help to minimize the
divergence between upstream and downstream, because distros like
debian and its derivatives encourage splitting architecture independent
data into its own package.
see
https://www.debian.org/doc/manuals/developers-reference/best-pkging-practices.html#architecture-independent-data

also, the python related runtime dependencies are also moved into
ceph-mgr-modules-core.

if a python dependency is shared by another ceph-mgr-* package and
ceph-mgr-modules-core. it's only added to ceph-mgr-modules-core for
simplicity and consistency. as the name of dependency might vary
on different distros, so it's tedious and error-prone to repeat
these conditons and checks.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-02-20 22:00:37 +08:00
Kefu Chai
6cfd31cdbb ceph.spec.in: update to adapt to el7
make sure ceph-mgr installs on el7

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-02-20 21:49:05 +08:00
Sage Weil
151f88d7f9 Merge PR #32677 into master
* refs/pull/32677/head:
	build/ops: make/install osd_support package
	mgr/osd_support: move docs to docs/mgr/osd_support.rst
	mgr/osd_support: new module for osd utility calls

Reviewed-by: Neha Ojha <nojha@redhat.com>
2020-02-19 14:50:40 -06:00
Joshua Schmid
acc05bf06d
build/ops: make/install osd_support package
Signed-off-by: Joshua Schmid <jschmid@suse.de>
2020-02-19 10:33:26 +01:00
Sebastian Wagner
932fd0bb61 spec: ceph-mgr: add missing python3-pyyaml
Remove stray req from the -k8events package, since the base ceph-mgr now
requires it.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-02-18 20:03:57 -06:00
Sebastian Wagner
36a5890fb7 debian,spec: Rename orchestrator_cli to orchestrator
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-02-17 10:24:01 +01:00
Kiefer Chang
02d56cf7b0
ceph.spec.in: fix python coverage dependency for non-rhel distros
The coverage package under openSUSE (and other distros) are named as
python{major_version}-coverage (without minor version).

Fixes: https://tracker.ceph.com/issues/44164
Signed-off-by: Kiefer Chang <kiefer.chang@suse.com>
2020-02-17 12:12:26 +08:00
Sage Weil
c42668c47a Merge PR #32775 into master
* refs/pull/32775/head:
	ceph.spec.in: fix python3 dependencies in centos7

Reviewed-by: Kefu Chai <kchai@redhat.com>
2020-02-15 08:37:41 -06:00
Nathan Cutler
6dbe449efe
Merge pull request #32805 from smithfarm/wip-cmake-logging
rpm: add cmake_verbose_logging switch

Reviewed-by: David Disseldorp <ddiss@suse.com>
Reviewed-by: Jan Fajerski <jfajerski@suse.com>
2020-02-13 20:00:27 +01:00
Nathan Cutler
5e98d22380 rpm: add cmake_verbose_logging switch
This switch sets CMAKE_VERBOSE_MAKEFILE and causes the CMakeOutput.log
and CMakeError.log files to be dumped after cmake execution finishes.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2020-02-13 15:13:24 +01:00
Sebastian Wagner
615381659c cmake: Integrate Rook client generation
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2020-02-13 11:33:55 +01:00
Sage Weil
070df40773 Merge PR #33229 into master
* refs/pull/33229/head:
	rpm: define weak_deps for el8

Reviewed-by: Sage Weil <sage@redhat.com>
2020-02-12 08:28:51 -06:00
Kefu Chai
5c70f36111 rpm: define weak_deps for el8
RHEL/CentOS 8 comes with rpm 4.14, see
https://centos.pkgs.org/8/centos-baseos-x86_64/rpm-4.14.2-25.el8.x86_64.rpm.html
and
https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/packaging_and_distributing_software/new-features-in-rhel-8_packaging-and-distributing-software

and since "Recommends" was introduced by rpm 4.12, see
https://fedoraproject.org/wiki/Changes/RPM-4.12 .
so we are able to use "Recommends" in el8 as well.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-02-12 12:28:35 +08:00
Sage Weil
b16f19efe7 ceph.spec: Recommend (but do not require) podman
1- Strictly speaking, docker is okay too.
2- We don't want podman (or docker) installed inside the container image,
but we do need the cephadm package.

Fixes: https://tracker.ceph.com/issues/44065
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-11 19:51:23 -06:00
liushi
ebf6cd15a6 ceph.spec.in: fix python3 dependencies in centos7
Fixes: https://tracker.ceph.com/issues/43737
Signed-off-by: liushi <liu.shi@navercorp.com>
2020-02-11 15:10:55 +08:00
Sage Weil
2e3ed251a6 mgr/deepsea: remove
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-09 09:45:36 -06:00
Sage Weil
01c36d9db7 mgr/ansible: remove
Signed-off-by: Sage Weil <sage@redhat.com>
2020-02-07 09:45:12 -06:00
Greg Farnum
1adda08a4b rpm: fix up a specfile syntax error
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
2020-02-04 09:10:17 -08:00
Dominique Leuenberger
110135cd16
ceph.spec.in: Use pkgconfig() style BuildRequires for udev/libudev-devel
pkgconfig() is cross-distro and allows to 'not having to care' for distro specific
packaging names. On openSUSE/SUSE distros, for udev/libudev, we gain the
benefit of being able to use -mini flavors which are sooner in the build queues.

Signed-off-by: Dominique Leuenberger <dimstar@opensuse.org>
2020-01-28 14:13:04 +01:00
Alfonso Martínez
e5fa448229 ceph.spec.in: fix 'make check' deps for centos8
When running 'FOR_MAKE_CHECK=1 ./install-deps.sh' in CentOS 8
these dependencies were not being installed.
Missing dependencies are provided by
https://copr.fedorainfracloud.org/coprs/ktdreyer/ceph-el8/

Signed-off-by: Alfonso Martínez <almartin@redhat.com>
2020-01-23 11:16:27 +01:00
Boris Ranto
f4cf78dc56 rpm: Relax the selinux policy version for centos builds
We are currently running into issues when installing the test builds
produced on centos 8 as these might have older selinux-policy-base
version than is available to the rhel 8 nodes.

We still want the builds produced on RHEL 8 to use the proper version
condition so the %{?centos} macro should help us achieve that, here.

Signed-off-by: Boris Ranto <branto@redhat.com>
2020-01-17 15:24:46 +01:00
Kefu Chai
567a94e63d ceph.spec.in: package .pyc files on el7
* package .pyc files on el7
  per
  https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_byte_compiling

  it's required to package .pyc files

* use python3 to bytecompile .py files on el7

  per
  https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation#Status_quo,
  `brp-python-bytecompile` script bytecompile .py files automatically, the
  .py files under interpreter-specific directories, such as `/usr/lib/python3.6/`,
  are compiled using the appropriate compiler. but the mgr modules are
  located under `/usr/share/ceph/mgr/`. they are compiled using
  `${__python}`, which is still python2 in RHEL/CentOS 7. since we've
  dropped the support of python2 in octopus. we should either stop
  bytecompiling the .py source files or start using python3 to compile
  them. otherwise python2 will fail to compile source files using python3
  specific syntax like:

```
Compiling /home/jenkins-build/build/workspace/ceph-dev-new-build/ARCH/x86_64/AVAILABLE_ARCH/x86_64/AVAILABLE_DIST/centos7/DIST/centos7/MACHINE_SIZE/huge/release/15.0.0-9242-g400d98b/rpm/el7/BUILDROOT/ceph-15.0.0-9242.g400d98b.el7.x86_64/usr/share/ceph/mgr/telemetry/module.py
...
  File "/usr/share/ceph/mgr/telemetry/module.py", line 387
    anon_devid = f"{devid.rsplit('_', 1)[0]}_{uuid.uuid1()}"
                                                           ^
SyntaxError: invalid syntax

error: Bad exit status from /var/tmp/rpm-tmp.4oRsox (%install)
```

Signed-off-by: Kefu Chai <kchai@redhat.com>
2020-01-13 11:09:37 +08:00
Nathan Cutler
0988cb0d2f
Merge pull request #32331 from smithfarm/wip-spec-drop-vim-header
rpm: drop vim-specific header

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Jan Fajerski <jfajerski@suse.com>
Reviewed-by: Mykola Golub <mgolub@suse.com>
2020-01-08 14:51:33 +01:00
Kefu Chai
dfd90da59c
Merge pull request #32412 from tchaikov/wip-spec-more-deps-for-el8
ceph.spec.in: re-enable "make check" deps for el8

Reviewed-by: Alfredo Deza <adeza@redhat.com>
2020-01-07 22:53:14 +08:00
Daniel Gryniewicz
2ee55c2cf7
Merge pull request #32404 from kalebskeithley/master
rgw: build radosgw daemon as a shared lib + small executable
2020-01-07 08:05:21 -05:00
Kefu Chai
2a27084e1d ceph.spec.in: re-enable "make check" deps for el8
this change partially reverts e92cb7a0. as these packages are now
available in AppStream, BaseOS or PowerTools in el8, in this change,
they are re-enabled.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-26 14:03:08 +08:00
Sage Weil
5ec92e79a2 Merge PR #32232 into master
* refs/pull/32232/head:
	qa: no need to exclude ceph-mgr-diskprediction-cloud from package list to be installed
	qa/packages: do not install ceph-mgr-diskprediction-cloud by default
	ceph.spec.in: add runtime deps for mgr-diskprediction-cloud

Reviewed-by: Sage Weil <sage@redhat.com>
2019-12-24 08:17:35 -06:00
Kaleb S. KEITHLEY
f528f173e4 rgw: build radosgw daemon as a shared lib + small executable
Majority of radosgw is contained in libradosgw.so. (/usr)/bin/radosgw
is now a few lines that calls radosgw_Main() in libradosgw.so.

The "zipper" work to modularize storage back-ends that will require
linking to the shared library to resolve the methods that they reference.

Putting the bulk of the implementation in a shared lib also allows for
unit testing to link with the shared lib for testing.

radosgw_Main() is the C++ implementation. For C linkage, radosgw_main()
is provided.

Signed-off-by: Kaleb S. KEITHLEY <kkeithle@redhat.com>
2019-12-23 12:34:44 -05:00
Sage Weil
074f1ff246 cephadm: python3 shebang
We need to figure out if/how we can make this as tolerant as possible for
the curl users so that it can still run on a python2-only host.

Maybe.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-20 12:47:56 -06: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
Sage Weil
9fc9197db0 Merge PR #32323 into master
* refs/pull/32323/head:
	spec, debian: cephadm requires lvm2

Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2019-12-18 17:10:09 -06:00
Nathan Cutler
48b1753a8a rpm: drop vim-specific header
The copyright notice should be the first thing in the file.

The line being dropped was added, perhaps unintentionally, by
unrelated commit c52eb995e0d9c3bbb6d0293f5dacaeb511f37f96
"Add initial SELinux support"

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-12-18 18:05:14 +01:00
Sebastian Wagner
b2cf2c7a8d spec, debian: cephadm requires lvm2
cephadm mounts `/run/lvm` into OSD containers, which only exists,
if `lvm2` is installed on the container host. Otherwise we cannot
start ceph-volume or osd containers.

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

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-12-18 14:40:17 +01:00
Kefu Chai
904650262c ceph.spec.in: always depends on python3.6-pyOpenSSL
since we've moved to py3-only world, there is no need to depend on
pyOpenSSL anymore.

also, _python_buildid was removed in
3bf8b4d7d6012458fc761edd759a4fb3070a30fe .

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-18 15:01:27 +08:00
Sage Weil
3268ec7ac8 Merge PR #32252 into master
* refs/pull/32252/head:
	qa/cephfs/begin: libaio-devel on el8
	qa/tasks: nosetests -> python -m nose
	qa/tasks/rbd_fio: fio 2.21 -> 3.16
	src/test/cli-integration/rbd/snap-diff.t: python -> python
	qa/workunits: use nose 3
	qa/tasks/cbt: install python3 deps
	qa/tasks/ceph_manager.py: do not use python to write a file
	test/pybind/test_rados: execute takes a bytes (not str) payload
	qa/packages/packages: python[3]-ceph is no more
	qa: use python3 for venvs etc
	packaging: remove python3-ipaddres, as it is part of the stdlib in py3
	qa/packages: python-ceph -> python3-ceph
	qa/distros: centos7 -> centos8, rhel7 -> rhel8
	spec: remove _python_buildid in favor of python3_pkgversion macro
	spec: remove python2 packages and conditions
	debian: remove python >= 2.7 requirement
	debian: add mgr python versions
	debian: explicitly set PYTHON2=OFF to prevent picking up python2 interpreter
	debian: update control file to use python3 dependency names
	debian: remove all python2 overrides and declarations
	debian: remove all python2 install files

Reviewed-by: Alfredo Deza <adeza@redhat.com>
2019-12-17 15:23:27 -06:00
Kefu Chai
702880dcf4 ceph.spec.in: add runtime deps for mgr-diskprediction-cloud
please note, these dependencies are not available in el7/el8, and
python2-{grpcio,protobuf} do not exist in fedora core. also, the
`google.api` module is still missing even with these dependencies
installed. so consider it as a partial fix.

See-also: https://tracker.ceph.com/issues/42655
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-12-17 21:52:18 +08:00
Nathan Cutler
88ad653874 rpm/cephadm: start description and summary with capital letter
This commit fixes RPMLINT issue:

cephadm.x86_64: E: summary-not-capitalized (Badness: 20) C cephadm utility to bootstrap Ceph clusters
Summary doesn't begin with a capital letter.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-12-16 17:03:07 +01:00
Nathan Cutler
f05a769e0d rpm/cephadm: move HOMEDIR to /var/lib and make scriptlets idempotent on SUSE
Also introduce a cephadm group. Since the cephadm package does not
require ceph-common, the ceph group is not available to be used.

Drop the -r option to useradd, because cephadm does not qualify as a system
user.

Finally, fix the SUSE RPM build. SUSE RPM builds using "osc" implement a check
that compares the cephadm package's "before" and "after" file lists, to enforce
idempotency of the scriptlets. The "userdel cephadm" in the %postun breaks this
check, so omit it from the SUSE RPM builds.

Fixes: https://tracker.ceph.com/issues/43285
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-12-16 17:03:01 +01:00
Alfredo Deza
7382221989 packaging: remove python3-ipaddres, as it is part of the stdlib in py3
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2019-12-12 19:16:33 -05:00
Alfredo Deza
3bf8b4d7d6 spec: remove _python_buildid in favor of python3_pkgversion macro
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2019-12-12 13:10:07 -06:00
Alfredo Deza
29d1c34424 spec: remove python2 packages and conditions
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2019-12-12 13:07:12 -06:00
Nathan Cutler
be25c6ed0c
Merge pull request #32080 from smithfarm/wip-43171
ceph.spec.in: move distro-conditional deps to dedicated section

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
2019-12-12 10:18:13 +01:00
Sage Weil
cd1c05acbb mgr/ssh -> mgr/cephadm
Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-11 19:14:24 -06:00
Sage Weil
c8750b7066 files,rpm,deb: rename ceph-daemon -> cephadm
This is just renaming the files and adjusting the packages.  Lots of
cleanup to do still.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-12-11 19:14:09 -06:00
Nathan Cutler
e80d14a176 ceph.spec.in: move distro-conditional deps to dedicated section
Post e92cb7a033 cleanup. Restore previous
structure of "distro-conditional make check dependencies" section.

Fixes: https://tracker.ceph.com/issues/43171
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-12-11 15:17:13 +01:00
Nathan Cutler
6378fa45ac rpm: add rpm-build to SUSE-specific make check deps
The binary /usr/bin/rpmspec was recently moved to rpm-build, breaking
install-deps.sh on openSUSE Tumbleweed. The package is not strictly
needed for SLE-15-SP* and openSUSE Leap 15.*, but it doesn't hurt to
have it, and will future-proof these distros from this regression.

Putting the dependency in the spec file does not address the issue,
because /usr/bin/rpmspec must be available before install-deps.sh runs it to
determine the dependencies, but it's nice to have it explicitly listed there,
since it *is* a dependency of "make check" on SUSE distros.

SUSE versions < 15 are of no interest in master/octopus+.

Fixes: https://tracker.ceph.com/issues/42612
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-12-10 18:31:16 +01:00
Sage Weil
582d713e46 Merge PR #31806 into master
* refs/pull/31806/head:
	spec,debian: ceph-mgr-ssh depends on openssh{-client{s}}

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Dimitri Savineau <dsavinea@redhat.com>
2019-11-23 20:29:38 -06:00
Sage Weil
378fed3aa0 Merge PR #31698 into master
* refs/pull/31698/head:
	rpm,deb: add cephdaemon user and sudoers file
	ceph-daemon: use mgr/ssh command to create the ssh key
	mgr/ssh: add 'ssh generate-key' and 'ssh clear-key' commands
	mgr/ssh: add mode option
	mgr/ssh: add 'ssh get-pub-key' and 'ssh get-user' commands
	mgr/ssh: convert to command decorations
	mgr/orchestrator: move command annotation helpers to orchestrator.py

Reviewed-by: Sebastian Wagner <swagner@suse.com>
2019-11-22 11:24:27 -06:00
Sebastian Wagner
e6909311bd spec,debian: ceph-mgr-ssh depends on openssh{-client{s}}
Container images don't include ssh by default. Thus we
have to explictly depend on it.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-11-22 10:32:14 +01:00
Sage Weil
660233935e rpm,deb: add cephdaemon user and sudoers file
Signed-off-by: Sage Weil <sage@redhat.com>
2019-11-21 15:34:07 -06:00
Casey Bodley
8aa638b0fa
Merge pull request #30960 from yuvalif/wip-yuval-add-kafka-notif-endpoint
rgw/pubsub: add kafka notification endpoint

Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
2019-11-21 14:42:23 -05:00
Thomas Bechtold
4258c4772a ceph-daemon: Move ceph-daemon executable to own directory
Moving ceph-daemon into src/ceph-daemon/ makes it simpler to add extra
code (eg. tox.ini, README, unittests, ...) specific to ceph-daemon.
That way related files are in a single directory.

Signed-off-by: Thomas Bechtold <tbechtold@suse.com>
2019-11-08 17:05:57 +01:00
Yuval Lifshitz
354d775e04 rgw/pubsub: add kafka notification endpoint
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
2019-11-05 19:25:03 +02:00
Kefu Chai
97bf619e1c ceph.spec.in: run pathfix.py
Signed-off-by: Sage Weil <sage@redhat.com>
2019-11-01 10:26:23 -05:00
Kefu Chai
8adbb86fb8 ceph.spec.in: add missing python-yaml dependency for mgr-k8sevents
otherwise we might have:

```
ceph/src/pybind/mgr/k8sevents/__init__.py", line 1, in <module>
    from .module import Module
  File "/home/kchai/ceph/src/pybind/mgr/k8sevents/module.py", line 28, in <module>
    import yaml
ImportError: No module named yaml
```

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-10-27 12:46:15 +08:00
Brad Hubbard
c44c140dfa ceph.spec.in: Enable amqp_endpoint on RHEL8 by default
RHEL/CentOS 8 now provide librabbitmq-devel so we can enable it as a
build requirement.

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

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2019-10-25 18:18:23 +10:00
Nathan Cutler
15bfb819ff rpm: make librados2, libcephfs2 own (create) /etc/ceph
Fixes: https://tracker.ceph.com/issues/42352
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-10-22 10:52:45 +02:00
Kefu Chai
8ae022a3ce
Merge pull request #30830 from tchaikov/wip/rpm-install-deps/python_provide
install-deps, rpm: use python_provide macro and cleanups

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
2019-10-15 00:05:06 +08:00
Kefu Chai
fb6290b1fa ceph.spec.in: provide python2-<modname>
to be consistent with other python2 packages, and their python3
counterparts

the `python_provide` macro is offered by `python-rpm-macros` package,
which is in turn required by python*-devel

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-10-10 10:35:59 +08:00
Kefu Chai
50b19e673d ceph.spec.in: use python_provide macro
our python3 bindings are now named `python3-<modname>` after python3 is
now maintained by RHEL/CentOS instead EPEL. to help the users using
`python36-<modname>`, we should "Provide" `python36-<modname>`.

the `python_provide` macro is offered by `python-rpm-macros` package,
which is in turn required by python*-devel. and we do install
`python36-devel` in install-deps.sh, and install `python3-devel` in
ceph-*build/build/setup_rpm

see also
https://docs.fedoraproject.org/en-US/packaging-guidelines/Python/#_provides

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-10-10 10:34:47 +08:00
Sage Weil
5f15829174 Merge PR #30738 into master
* refs/pull/30738/head:
	mgr/alerts: raise health alert if smtplib has a problem
	mgr/alerts: simple module to send health alerts

Reviewed-by: Tim Serong <tserong@suse.com>
2019-10-09 14:13:40 -05:00
Sage Weil
6fd67f19e3 Merge PR #30603 into master
* refs/pull/30603/head:
	ceph-daemon: -n type.id instead of -i id
	ceph-daemon: drop unused VERSION
	ceph-daemon: clean up dir helpers, tighten up permissions
	ceph-daemon: fchmod before writing to keyring file
	test_ceph_daemon.sh: skip ssh until container image has remoto
	ceph-daemon: decode utf-8 in run() helper
	mgr/ssh: clean up debug cruft
	mgr/ssh: clean up bare except: block
	ceph-daemon: clean up bare except: blocks
	ceph-daemon: all imports to top
	ceph-volume: no_tmpfs -> tmpfs
	doc/bootstrap: add new bootstrap documentation
	ceph-daemon: add --output-pub-ssh-key for bootstrap
	ceph-daemon: make 'shell' easier to use
	ceph-daemon: support docker; prefer podman
	qa: add ceph-daemon
	debian: ceph-daemon package, required by ceph-mgr-ssh
	ceph.spec.in: ceph-daemon package, required by ceph-mgr
	common/options: cleanup whitespace
	mgr/ssh: simplify getting the cluster fsid
	mgr/ssh: pipe ceph-daemon script to stdin of python3
	ceph-daemon: add support for args and/or stdin from top of script
	ceph-daemon: make ceph-volume use get_config_and_keyring
	ceph-daemon: ls: behave if /var/log/ceph doesn't exist
	ceph-daemon: implement 'adopt' for legacy style daemons
	ceph-daemon: fix fsid detection for legacy osds
	ceph-daemon: make rm-cluster clean up system-ceph*.slice too
	ceph-daemon: configure ssh orchestrator
	ceph-daemon: be more restrictive with file permissions
	mgr/ssh: create osd with ceph-daemon
	mgr/ssh: pass daemon id separately to _create_daemon
	ceph-daemon: add --config-and-keyring to ceph-volume command
	ceph-daemon: create log path for shell (if needed)
	mgr/ssh: use _run_ceph_daemon for _create_daemon
	mgr/ssh: factor _run_ceph_daemon out of _get_device_inventory
	mon/ConfigMonitor: allow entity type only for 'config get'
	ceph-daemon: add ceph-volume subcommand
	ceph-daemon: remove unused CephContainer dname property
	ceph-daemon: drop useless uid/gid checks
	mgr/ssh: deploy new mgrs with ceph-daemon
	mgr/ssh: factor _create_daemon out of create_mon
	mon/MonCap: allow mgr to create new auth keys
	mgr/ssh: run c-v with podman when getting inventory
	mgr/ssh: simplify ssh connection management
	mgr/ssh: use ceph-daemon for deploying mon
	ceph-daemon: allow --mon-network for deploying new mon (vs specifying IP)
	ceph-daemon: --config-and-keyring (not key)
	common/options: add 'image' config option
	test_ceph_daemon: specify image name
	vstart.sh: add --ssh to enable+configure ssh orchestrator
	mgr/ssh: use ssh identity from config-key, if present
	mgr/ssh: hardcode default ssh_config
	ceph-daemon: store ssh identity in mon config-key store
	ceph-daemon: --privileged arg for 'exec'
	ceph-daemon: make deploy work for osd (do a c-v prepare)
	ceph-daemon: make shell privileged
	ceph-daemon: move get_container_mounts to a helper
	ceph-daemon: pass full path for entrypoint
	ceph-daemon: make id portion of 'shell' optional
	ceph-volume: accept --no-tmpfs argument for bluestore
	ceph-daemon: 'unit' command
	ceph-daemon: fix run command to use call(), not check_output()
	src/ceph-daemon: whitespace
	ceph-daemon: add 'enter', 'exec' commands
	ceph-daemon: bind config to default location
	test_ceph_daemon.sh: test deploy mds too
	ceph-daemon: generate ssh keys
	ceph-daemon: --config, not --conf
	ceph-daemon: long lines
	ceph-daemon: add --config to bootstrap
	ceph-daemon: add 'shell' command
	ceph-daemon: do not import subprocess symbols directly
	ceph-daemon: add mons with 'deploy mon.x ...'
	ceph-daemon: add 'ls'
	ceph-daemon: simplify uid/gid a bit
	ceph-daemon: fix libudev
	ceph-daemon: autodetect uid/gid from container image
	ceph-daemon: default to empty log files, log to stderr (systemd journal)
	ceph-daemon: rm-{daemon,cluster}
	ceph-daemon: fix bootstrap config
	ceph-daemon: fix args.fsid usage
	ceph-daemon: be careful overwriting live files
	ceph-daemon: slurp some options over from the standard systemd unit
	ceph-daemon: add ceph.target and ceph-$fsid.target units
	test_ceph_daemon.sh: stupid test script
	ceph-daemon: bootstrap and deploy (mgr) work
	ceph-daemon: initial checkin
	ceph-mon: fix debug print of public_addr
2019-10-07 15:31:14 -05:00
Sage Weil
d7223938f8 mgr/alerts: simple module to send health alerts
Initialy SMTP support is implemented; nothing else.

This is just smart enough for me to get emails from my home cluster when
something goes wrong.  No bells and whistled at this point.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-07 09:04:39 -05:00
Kefu Chai
73ee20ea26
Merge pull request #30656 from tchaikov/wip-install-deps-for-el8
install-deps.sh: enable PowerTool repo for EL8

Reviewed-by: Neha Ojha <nojha@redhat.com>
2019-10-07 16:06:30 +08:00
Sage Weil
171fecc38a ceph.spec.in: ceph-daemon package, required by ceph-mgr
Signed-off-by: Sage Weil <sage@redhat.com>
2019-10-04 20:33:35 -05:00
Kefu Chai
0098b42927 ceph.spec.in: install python3-Cython on el8
EL8 has python3 support. no need to wait for python3-Cython to populate
to its mirrors.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-10-01 18:28:17 +08:00
Kefu Chai
e92cb7a033 ceph.spec.in: disable "make check" for rhel8
following packages are not available on RHEL/CentOS 8, they are for
dashboard unit tests. so disable all python packages for dashboard
tests for now:

python-cherrypy
python-coverage
python-pecan
python-routes
python-tox
xmlsec1-devel

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-09-28 22:20:35 +08:00
Kefu Chai
dd133840b9 ceph.spec.in: disable cephfs_java and amqp_endpoint if RHEL8
RHEL/CentOS 8 does not offer junit and sharutils yet, so disable
cephfs_java on rhel8 at this moment.

RHEL/CentOS 8 does not offer librabbitmq-devel yet, so disable
amqp_endpoint on rhel8 at this moment.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-09-28 22:20:35 +08:00
Jeff Layton
40c5a18f81 ceph.spec.in: fix Cython package dependency for Fedora
Fedora distros do not have python3?-Cython packages, but they do have
python3-Cython ones. Fix the BuildRequires so that we only use the
python3_version_nodots based version string for RHEL.

Fixes: https://tracker.ceph.com/issues/42032
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2019-09-26 08:20:57 -04:00
Kefu Chai
b43cbefc05
Merge pull request #30420 from runsisi/wip-remove-requests
rpm,deb: python-requests is not needed for ceph-common

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-09-25 16:31:13 +08:00
Kefu Chai
6d2f66846d ceph.spec.in: s/pkgversion/version_nodots/
`python3_pkgversion` is now defined as 3, while we don't have packages
like python3-Cython yet in EPEL7. but we do have `python36-Cython`. so
let's use `python3_version_nodots` instead.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-09-24 23:23:35 +08:00
luo.runbing
998a3025c0
rpm,deb: python-requests is not needed for ceph-common
Signed-off-by: luo.runbing <luo.runbing@zte.com.cn>
2019-09-23 09:56:19 +08:00
Jeff Layton
eae0127513 mount.ceph: fork a child to get info from local configuration
When a secret and/or the mon addrs are not specified by the admin,
then mmap a MAP_SHARED buffer and spawn a child process to get that
info. For safety reasons, the child drops all capabilities other than
CAP_DAC_READ_SEARCH (to ensure that it'll be able to read the keyring,
should one be found). To achieve this, we add a new dependency on
libcap-ng.

Add a new C++ file with a single routine that will create a CephContext,
get a list of monitor addresses and scrape the keyring for a secret for
the specified cephx user.

If that info is found, then it is copied to fixed-length buffers in the
MAP_SHARED area and the child exits successfully.

The parent will then vet the returned info and copy it into the
appropriate fields if they are currently blank.

Fixes: https://tracker.ceph.com/issues/16656
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2019-09-13 08:14:48 -04:00
Kefu Chai
4d72fba539
Merge pull request #30126 from dvanders/dvanders_spec
ceph.spec.in: reserve more memory per build job

Reviewed-By: Nathan Cutler <nculter@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-09-10 16:30:09 +08:00
Sebastian Wagner
199d6418f4
Merge pull request #29520 from pcuzner/add-events-mgr-module
mgr/k8sevents: Add mgr module for kubernetes event integration

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
Reviewed-by: Travis Nielsen <tnielsen@redhat.com>
2019-09-06 17:09:21 +02:00
Dan van der Ster
e466c43b23 ceph.spec.in: reserve 2500MB per build job
On our 14GB build machines, 8 parallel jobs results in the compiler
going OOM. Reserving 2500MB per job allows it to succeed with 5 jobs.

Fixes: https://tracker.ceph.com/issues/41659
Signed-off-by: Dan van der Ster <daniel.vanderster@cern.ch>
2019-09-06 08:52:21 +02:00
Paul Cuzner
2166676288 mgr/k8sevents: Initial ceph -> k8s events integration
Adds a mgr module to provide integration between
Ceph and the kubernetes events API within the rook-ceph
namespace. It provides several commands to view event
status including;

ceph k8sevents list .... show all k8s related events
ceph k8sevents ceph .... show events generated from this
                         module
ceph k8sevents status .. show status of the tracker threads
                         and counts of tracked events

Events sent to kubernetes are sourced from the
a) clog: ceph healtchecks and admin commands
b) explicit checks: hosts, pools and OSD states are checked
   every 'n' seconds

Signed-off-by: Paul Cuzner <pcuzner@redhat.com>
2019-09-05 14:45:52 +12:00
Kefu Chai
33dfffc841 ceph.spec.in: use g++ >= 8.3.1-3.1
since https://bugzilla.redhat.com/show_bug.cgi?id=1726630 has been
fixed. and we have devtoolset-8-gcc-c++-8.3.1-3.1.el7.x86_64.rpm.

no reason to stick with devtoolset-8-gcc-c++-8.2.1-3 anymore.

Fixes: https://tracker.ceph.com/issues/40646
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-09-03 14:19:31 +08:00
Kefu Chai
5d6d770e2f install-deps.sh,deb,rpm: move python-saml deps into debian/control and ceph.spec.in
these dependencies are only used for building python-saml which is in
turn used for the SAML support. this feature is tested using
`test_sso.py` while performing dashboard tests. we do not package or
ship python-saml along with other Ceph packages. so let's move these
dependencies to the "make check" sections in ceph.spec.in and
debian/control for simplifying install-deps.sh.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-24 02:11:51 +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
Nathan Cutler
b9c7443010 rpm: always build ceph-test package
Fixes: https://tracker.ceph.com/issues/41296
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-08-15 13:28:51 +02:00
Boris Ranto
d9f8a50a89
Merge pull request #28997 from b-ranto/wip-push-dash
Make ceph-dashboard require grafana dashboards

Reviewed-by: Zack Cerza <zcerza@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
2019-08-15 11:02:43 +02:00
Kefu Chai
bbb69fe793 cmake: require CMake v3.10.2
since we dropped the support of xenial, we now have the luxury of using
newer CMake! and by using CMake 3.10.2, we can prevent libfmt from
assuming that we are using C++11, and hence set `CMAKE_CXX_STANDARD` to
11, which will literally append `-std=gnu++11` to `CMAKE_CXX_FLAGS`.
the last `-std` option passed to `g++` takes precendence.
since we've switched over to C++17, and we are using C++17 features.
so, using cmake older than 3.8 breaks the build. because it is CMake 3.8
which stared support `CMAKE_CXX_STANDARD` 17.

- for bionic: https://packages.ubuntu.com/bionic/cmake : 3.10.2
- for CentOS7:
https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/c/ : 3.13.5

so in this change,

* bump up the required version to v3.10.2
* cleanups to wipe out the workaround for lower CMake versions
* use `PROJECT_VERSION` defined by `project()` command instead of
  `VERSION` explicitly defined.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-08-02 22:09:12 +08:00
Kefu Chai
0e35c6f641
Merge pull request #29349 from smithfarm/wip-40975
rpm: put librgw lttng SOs in the librgw-devel package

Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-08-02 11:52:07 +08:00
Sebastian Wagner
475159ec73
Merge pull request #28915 from sebastian-philipp/python-common-package-2
python-common:  Python common package

Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Tim Serong <tserong@suse.com>
2019-07-30 09:31:34 +02:00
Kefu Chai
3169da7a1a
Merge pull request #29347 from smithfarm/wip-40974
rpm: improve ceph-mgr plugin package summaries

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-07-30 12:46:37 +08:00
Nathan Cutler
7929af71d9 rpm: put librgw lttng SOs in the librgw-devel package
Shared objects belong in the devel package.

Fixes: http://tracker.ceph.com/issues/40975
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-07-26 13:10:03 +02:00
Nathan Cutler
ea40019c5c rpm: improve ceph-mgr plugin package summaries
Fixes: http://tracker.ceph.com/issues/40974
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-07-26 13:01:05 +02:00
Nathan Cutler
876d6bf6dc rpm: fdupes in SUSE builds to conform with packaging guidelines
Quoting from https://en.opensuse.org/openSUSE:Packaging_Conventions_RPM_Macros

"%fdupes is generally safe for use on /bin, /lib*, /usr (= %_prefix) and /sbin.
Do note however that files with same content but different ownership, when
hardlinked, will get the ownership of any of its content siblings."

Fixes: http://tracker.ceph.com/issues/40973
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-07-26 12:42:09 +02:00
Sebastian Wagner
ea15a67b98 ceph.spec, debian: Add python-common to ceph-common
Co-authored-by: Tim Serong <tserong@suse.com>
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2019-07-26 12:10:52 +02:00
Matthias Gerstner
d472e88441
packaging: remove SuSEfirewall2 support
removal of SuSEfirewall2 service, since SuSEfirewall2 has been replaced
by firewalld, see [1].

[1]: https://lists.opensuse.org/opensuse-factory/2019-01/msg00490.html

Fixes: http://tracker.ceph.com/issues/40738
Signed-off-by: Matthias Gerstner <matthias.gerstner@suse.de>
2019-07-12 09:55:35 +02:00
Boris Ranto
7b3a01cdfb rpm: Require ceph-grafana-dashboards
The recently introduced 'dashboard grafana dashboards update' command
requires the grafana dashboards for it to work properly. Adding the
dependency.

Signed-off-by: Boris Ranto <branto@redhat.com>
2019-07-11 17:21:55 +02:00
Kefu Chai
00d03f99d0
Merge pull request #28884 from DimStar77/depchain
ceph.spec.in: Drop systemd BuildRequires in case of building for SUSE

Reviewed-by: Nathan Cutler <ncutler@suse.com>
2019-07-09 16:04:09 +08:00