Commit Graph

1322 Commits

Author SHA1 Message Date
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
Kefu Chai
47d4351d3a ceph.spec.in,install-dep.sh: pin to gcc-c++-8.2.1
as an intermediate solution before
https://bugzilla.redhat.com/show_bug.cgi?id=1726630 gets fixed.

Fixes: https://tracker.ceph.com/issues/40646
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-07-05 23:59:21 +08:00
Dominique Leuenberger
b48ea142de
Packaging: Drop systemd BuildRequires in case of building for SUSE
There is already pkgconfig(systemd) present, which, in SUSE's packaging,
translates to the same package (systemd.pc is shipped as part of the main
systemd package). Not explicitly mentioning 'systemd' as package name allows
the openSUSE Build Service though to find shortcuts by using the
bootstrap packages, i.e. systemd-mini (ABI/API complete).

Signed-off-by: Dominique Leuenberger <dimstar@opensuse.org>
2019-07-05 09:15:20 +02:00
Sage Weil
18eacb6ed8 Merge PR #22446 into master
* refs/pull/22446/head:
	relicense LGPL-2.1 code as LGPL-2.1 or LGPL-3.0
	COPYING: add reference to a few Apache-2.0 licensed source files
	debian/copyright: sync with COPYING
	COPYING: LGPL2.1 -> LGPL-2.1
	COPYING: extra bits from debian/copyright

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
2019-06-12 09:11:49 -05:00
Nathan Cutler
fe632e2d88 build/ops: make "patch" build dependency explicit
This commit adds "patch" as an explicit build dependency. Before, the RPM
build was installing it in the build environment via some mechanism that I
don't entirely understand.

The "patch" command is used by the BuildBoost cmake module.

Fixes: http://tracker.ceph.com/issues/40175
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-06-10 14:15:00 +02:00
Kefu Chai
177956c9f6
Merge pull request #28352 from smithfarm/wip-rpm-obsolete-python
rpm: have pybind RPMs provide/obsolete their python2 predecessors

Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-06-08 23:27:39 +08:00
Kefu Chai
5cc1a62fda
Merge pull request #28428 from tchaikov/wip-package-crimson-osd
rpm,debian,install-deps: package crimson-osd

Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Tim Serong <tserong@suse.com>
2019-06-08 00:03:22 +08:00
Kefu Chai
f03d8e2548 ceph.spec.in: align "Requires" of ceph-osd
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-06-07 22:17:19 +08:00
Kefu Chai
34b02f00d0 ceph.spec.in: package crimson-osd
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-06-07 22:17:19 +08:00
Mike Christie
8815671553 cmake and build: add netlink lib requirement detection
The next patch adds netlink support to rbd-nbd. This patch just adds the
build related changes to bring in the netlink lib and test and build
against it.

Signed-off-by: Mike Christie <mchristi@redhat.com>
2019-06-04 23:56:53 -05:00
Nathan Cutler
55bc3493f0 rpm: have py3 RPMs provide/obsolete py2 predecessors
When upgrading from a Python 2 build to a Python 3 one, we need to make the
python3-* packages replace their Python 2 counterparts.

Fixes: http://tracker.ceph.com/issues/40099
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-06-05 00:15:25 +02:00
Boris Ranto
a30f6eda53
Merge pull request #28228 from jan--f/spec-grafana-dashboards-require-grafana
ceph.spec.in: grafana-dashboards package depends on grafana

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
2019-06-04 22:52:54 +02:00
Jan Fajerski
76204d32fb ceph.spec.in: install grafana dashboards world readable
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
2019-06-02 13:31:27 +02:00
Nathan Cutler
34bd11b992
Merge pull request #28170 from marxin/disable-lto-in-spec-file
rpm: Disable LTO in spec when being used.

Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
2019-05-29 18:21:34 +02:00
Martin Liska
6ab109bb9b rpm: Disable LTO in spec when being used
Fixes: http://tracker.ceph.com/issues/39974
Works around: https://tracker.ceph.com/issues/40060

Signed-off-by: Martin Liška <Martin.Liska@suse.com>
2019-05-29 14:26:42 +02:00
Jan Fajerski
c3ead45d1b ceph.spec.in: package prometheus default alerts for SUSE
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
2019-05-10 10:01:18 +02:00
Sage Weil
5ef26e08ca Merge PR #26184 into master
* refs/pull/26184/head:
	mgr/dashboard: Replace IP address validation with Python standard library functions

Reviewed-by: Volker Theile <vtheile@suse.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Patrick Nawracay <pnawracay@suse.com>
Reviewed-by: Tatjana Dehler <tdehler@suse.com>
2019-04-24 20:38:19 -05:00
Sage Weil
d64d14a577 Merge PR #26730 into master
* refs/pull/26730/head:
	src/test: remove unused objects to calculate accurate dedup ratio.
	src/tools: fix counting total objects
	src/tools: fix printing wrong offset.
	src/tools: fix dedup tool's name
	qa/workunit: add rabin chunk test
	src/tool: add rabin fingerprint option to cephdeduptool
	src/common: add rabin fingerprint class
	Initail work for rabin fingerprint

Reviewed-by: Sage Weil <sage@redhat.com>
2019-04-24 20:38:02 -05:00
Ashish Singh
aeb1c11334 mgr/dashboard: Replace IP address validation with Python standard library functions
Instead of self-written validation methods to validate IPv4 and IPv6 addresses.
Use Python's standard library functions `ipaddress`.

Signed-off-by: Ashish Singh <assingh@redhat.com>
2019-04-23 17:20:23 +05:30
Sage Weil
2f361a6eee relicense LGPL-2.1 code as LGPL-2.1 or LGPL-3.0
The primary motivation to relicense is a desire to integrate with projects
that are licensed under the Apache License version 2.0.  Although opinions
vary, there are some who argue the the LGPL-2.1 and Apache-2.0 licenses
are not fully compatible.  We would like to avoid the ambiguity and
potential for controversy.

Projects we would like to consume that are Apache-2.0 licensed include
Seastar, OpenSSL (which is in the process of relicensing to Apache-2.0),
and Swagger (swagger.io).  Note that some of these are dynamically linked
or consumed via a high-level language and may or may not require a change
to LGPL-3.0, but providing the option for LGPL-3.0 certainly avoids any
uncertainty.

A few other source files are already incorporated into Ceph that claim an
Apache-2.0 license:

    src/common/deleter.h
    src/common/sstring.h
    src/include/cpp-btree

The Ceph developers would further like to provide a license option that is
more modern than the current LGPL-2.1.  LGPL-3.0 includes updated,
clarified language around several issues and is widely considered
more modern, superior license.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-04-22 11:22:55 -05:00
Kefu Chai
8ae1947728 rpm: add "Provides: python3-*" for python packages
so user can install python3-rados, instead of python36-rados, without
specifying the minor version of python. also, we should not break our
teuthology tests with this naming scheme change. for instance, our
cephfs qa suite installs `python3-cephfs` for testing the `cephfs-shell`

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-10 00:21:02 +08:00
Kefu Chai
11f0b8d5a8 rpm: always use 3 as the default python3_{pkgversion,version}
as we have the rpm macros installed in
https://github.com/ceph/ceph-build/pull/1283 .

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-09 23:15:18 +08:00
myoungwon oh
d72cc5a0ee src/tools: fix dedup tool's name
Signed-off-by: Myoungwon Oh <ommw@sk.com>
2019-04-08 19:19:09 +09:00
Kefu Chai
658ca2b0d7 rpm: use python 3.6 as the default python3
some of our centos7 jenkins builders are failing to build ceph master and
nautilus branches. because EPEL7 recently switched from python3.4 to
python3.6 as the native python3. see
https://lists.fedoraproject.org/archives/list/epel-announce@lists.fedoraproject.org/message/EGUMKAIMPK2UD5VSHXM53BH2MBDGDWMO/

and one of our BuildRequires, cmake3,
was offered by EPEL7. it also followed the python3.6 switch-over to
rebuild against python3.6. as a result, the cmake3-data-3.13.4-2.el7
started to depend on /usr/bin/python3.6, which is in turn offered by
python36 package. after installing python36 as a dependency of the
updated cmake3. but in cmake, we originally checks for the latest
python3 interpreter if WITH_PYTHON3 is enabled, that's why these
builders which happen to install these updated packages started to fail
when detecting the existence of python3.6 related build dependencies.

as a fix, in d1e83082,
python%{python3_pkgversion}-{devel,setuptools,Cython} are listed as
BuildRequires to reflect this change in EPEL7. before d1e83082, we
hardwired them to python34-*.

but as following analysis puts, there are cases where `yum-builddep`
is inconsistent with `rpmbuild`. as `yum-builddep` changes the how
`python3_pkgversion` and `python3_version` macros are expanded:

- none of the packages installed by `yum-builddep` installs the python3
  related rpm macros, so the system stays with whatever python3 it was
  using. in this case, `rpmbuild` won't complain, as the
  `python3_pkgversion` and `python_version` are consistent before and
  after `yum-builddep`.
- system has python3.4 installed before `yum-builddep`. but
  `yum-builddep` installed python3.6 and also the updated
  `python-rpm-macros` packages, which points `python3_version` and
  `python3_pkgversion` to 3.6 and 36 respectively. in this case,
  `rpmbuild` will complain, because when we run `yum-builddep`,
  `python3_version` was still "3.4".
- system does not have python3 installed before `yum-builddep`. so
  it was using python34 for preparing the "BuildRequires". but some
  of the packages installed by `yum-builddep` installs python36, and
  also the updated `python-rpm-macros` packages, which points
  `python3_version` and `python3_pkgversion` to 3.6 and 36 respectively.
  in this case, `rpmbuild` will complain, because the python36 related
  dependencies are missing. what the system has is python34
  dependencies.
- system does not have python3 installed before `yum-builddep`. so
  it was using python34 for preparing the "BuildRequires". but some
  of the packages installed by `yum-builddep` installs python34, and
  also the updated `python-rpm-macros` packages, which points
  `python3_version` and `python3_pkgversion` to 3.4 and 34 respectively.
  in this case, `rpmbuild` won't complain, as the
  `python3_pkgversion` and `python_version` are also consistent before and
  after `yum-builddep`.

as we cannot tell if the system has python3 or what the python3 version
the system has before `yum-builddep`, so what we can do is to ensure
`rpmbuild` has what it needs to build Ceph. so let's just stick with
python3.6.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-08 10:12:32 +08:00
Kefu Chai
cea9d18ced rpm: use python3.4 on RHEL7 by default
python3.4 is the native python3 before 7.6

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-06 00:28:39 +08:00
Kefu Chai
d1e83082b4 rpm: install python%{python3_pkgversion}-devel on el7
as RHEL 7.7 support a native python3.6, we cannot hardwire to python3.4
on RHEL7/CentOS7 anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-05 10:16:25 +08:00
Kefu Chai
8bd69f29af
Merge pull request #27358 from tchaikov/wip-multi-python3
rpm,cmake: use specified python3 version if any 

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Yuri Weinstein <yweinste@redhat.com>
2019-04-04 23:50:32 +08:00
Kefu Chai
7681a38ce5 rpm: pass %{python3_version} to cmake
to force cmake to use the python3 and python3 modules for building
python3 bindings

on the debian side, it's okay to continue using "-DWITH_PYTHON3=ON", as

- cmake does normalize "ON" to 3
- debian's cmake extension lives on /usr/lib/python3/dist-packages/
  not in a specific /usr/lib/python3.x/dist-packages directory

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-04 13:30:48 +08:00
Kefu Chai
00f19923b4 install-deps,rpm: enable devtoolset-8 on aarch64 also
in 5ae3b06e, we left aarch64 with devtoolset-7, but aarch64 builders are
also suffering from http://tracker.ceph.com/issues/38892. so i installed
devtoolset-8 on all aarch64 builders manually from the rpm packages
downloaded from koji builder:

- https://cbs.centos.org/koji/buildinfo?buildID=24923
- https://cbs.centos.org/koji/buildinfo?buildID=24931

libasan5, libubsan1 are not installed.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-04-03 11:40:59 +08:00
Kefu Chai
9694a72dae rpm: s/devtoolset-7/devtoolset-8/
should activate devtoolset-8 not devtoolset-7 for enabling GCC-8.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-03-26 15:20:00 +08:00
Kefu Chai
128ce1199f
Merge pull request #27134 from tchaikov/wip-devtools-8
install-dep,rpm: use devtools-8 on amd64

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
2019-03-26 09:45:55 +08:00
Kefu Chai
1fdd8ed552
Merge pull request #27150 from tchaikov/wip-ceph.spec.in/immutable-object-cache
rpm: immutable-object-cache related changes

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2019-03-25 23:38:50 +08:00
Kefu Chai
253385d4cc rpm,deb: let immutable-object-cache depend on librados2
ceph-common depends on librados2, but ceph-immutable-object-cache only
uses librados2's C++ API, so librados2 would suffice.

rpmbuild is able to figure out the .so dependencies, and let
ceph-immutable-object-cache depend on the package which offers
librados2, but we'd better make sure immutable-object-cache is linked
against the librados2 of the same version, to ensure that librados2
offers the correct C++ symbols. as we only version the C++ API in the
librados2 after nautilus.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-03-25 13:56:52 +08:00
Kefu Chai
c80d5aa693 rpm: remove libradospp1 from immutable-object-cache's Requires
* remove "libradospp1" from immutable-object-cache's runtime
  dependencies. this package was removed in 65c8733b

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-03-25 12:47:34 +08:00
Kefu Chai
1cd1967013 rpm: do not use "-n" for immutable-object-cache
as immutable-object-cache has the prefix of "ceph", no need to use "-n"
option. so this change is but a cleanup.

* use "%package immutable-object-cache" not "%package
  ceph-immutable-object-cache" for naming subpackage of
  "ceph-immutable-object-cache". this would result in package name of
  "ceph-immutable-object-cache". see
  http://ftp.rpm.org/max-rpm/s1-rpm-subpack-spec-file-changes.html
* the same applies to other directives with "-n" options, see
  http://ftp.rpm.org/max-rpm/s1-rpm-inside-package-directive.html

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-03-25 12:47:34 +08:00
Kefu Chai
f904ba5574
Merge pull request #26819 from tchaikov/wip-rpm-more-recommends
rpm: use Recommends on fedora also

Reviewed-by: Nathan Cutler <ncutler@suse.com>
2019-03-23 01:47:00 +08:00
Kefu Chai
5ae3b06e63 install-dep,rpm: use devtools-8 on amd64
seems devtools-8 is not packaged on aarch64. and we are suffering from
ICE on centos7 when building with GCC-7.3. so let's try GCC-8.2!

Fixes: http://tracker.ceph.com/issues/38892
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-03-23 01:37:00 +08:00
Yuan Zhou
9466d70985 build/ops: adding build spec for immutable object cache daemon
Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
2019-03-22 00:16:26 +08:00
Nathan Cutler
b0700f2b3f
Merge pull request #27046 from smithfarm/wip-38812
rpm: refrain from building ceph-resource-agents on SLE

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Tim Serong <tserong@suse.com>
2019-03-20 17:12:58 +01:00
Nathan Cutler
282a6b0675 rpm: refrain from building ceph-resource-agents on SLE
Fixes: https://tracker.ceph.com/issues/38812
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-03-19 12:22:32 +01:00
Nathan Cutler
b0da2371c1 rpm: fix "rhel <= 7" conditional
We do not build for RHEL 6 and below, so "rhel == 7" is just as good, while
also avoiding the bug.

In addition, "rhel == 7" is the conditional we are using everywhere else in the
spec file for this purpose.

Fixes: https://tracker.ceph.com/issues/38810
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-03-19 12:11:56 +01:00
Boris Ranto
4b3db559e7
Merge pull request #26756 from badone/wip-f28-broken-Cython-dep
rpm: Install python2-Cython on f28

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
2019-03-13 13:31:15 +01:00
Brad Hubbard
6de7111e73 rpm: Install python2-Cython in python2 environment
do_cmake.sh tests for Cython module version in python2

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2019-03-13 12:22:31 +10:00
Sébastien Han
7c4f29bf4a ceph.spec.in: add libstoragemgmt to mgr package
The libstoragemgmt package is needed so we can activate the drive
blink-led feature so we should pull that package.

Signed-off-by: Sébastien Han <seb@redhat.com>
2019-03-12 15:56:12 +01:00
Kefu Chai
147531515b rpm: use Recommends on fedora also
"Recommends" and other weak dependencies were introduced in rpm 4.12. it
is included by quite a few distros, including fedora 21 and up, and
recent SUSE distros. but RHEL7 still ships rpm 4.11. see
https://fedoraproject.org/wiki/Changes/RPM-4.12 and
https://software.opensuse.org/package/rpm . so we enable Recommends on
fedora and SUSE distros.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-03-07 22:42:36 +08:00
Sage Weil
6c723b927d Merge PR #26718 into master
* refs/pull/26718/head:
	rpm: put numpy and scipy deps in distro conditionals

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-03-07 06:30:46 -06:00
Nathan Cutler
5a0846631c rpm: put numpy and scipy deps in distro conditionals
Without this patch, attempts to install the ceph-mgr-diskprediction-local RPM
fail on SUSE platforms with the following error:

can't install ceph-mgr-diskprediction-local-14.1.0.402+ga396e8bf3b-3742.1.noarch:
  nothing provides numpy needed by ceph-mgr-diskprediction-local-14.1.0.402+ga396e8bf3b-3742.1.noarch
  nothing provides scipy needed by ceph-mgr-diskprediction-local-14.1.0.402+ga396e8bf3b-3742.1.noarch

Also take into account package naming differences between Fedora and
RHEL/CentOS.

Signed-off-by: Kefu Chai <kchai@redhat.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-03-06 15:13:23 +01:00
Sage Weil
e030ba465d Merge PR #26740 into master
* refs/pull/26740/head:
	rpm: advance spec file copyright date

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2019-03-05 14:05:54 -06:00
Sage Weil
11f986830e Merge PR #26719 into master
* refs/pull/26719/head:
	rpm: re-add pyOpenSSL as ceph-mgr runtime dependency

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-03-05 09:12:43 -06:00
Sage Weil
5c6d9d556f Merge PR #26694 into master
* refs/pull/26694/head:
	rpm: drop use of $FIRST_ARG

Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2019-03-04 16:25:18 -06:00
Nathan Cutler
166ae7847c rpm: advance spec file copyright date
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-03-04 15:50:24 +01:00
Nathan Cutler
aa690517fb rpm: re-add pyOpenSSL as ceph-mgr runtime dependency
The "restful" MGR module is part of ceph-mgr, and is active by default when
deploying a Ceph cluster from scratch.

Without this patch, the cluster never reaches HEALTH_OK due to the following
health warning: "Module 'restful' has failed dependency: No module named
'OpenSSL'"

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-03-01 15:25:22 +01:00
Sage Weil
649ea55d8a Merge PR #26453 into master
* refs/pull/26453/head:
	rpm: build with lttng on ppc64le (SUSE)
	rpm: no lttng build on openSUSE s390x

Reviewed-by: Tim Serong <tserong@suse.com>
2019-02-28 18:07:59 -06:00
Franck Bui
926433f5d4 rpm: drop use of $FIRST_ARG
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 this patch.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-02-28 14:03:30 +01:00
Nathan Cutler
4004f55905 rpm: use %_python_buildid to specify python-remoto dep
Without this patch, the Python 2 version of python-remoto is always installed,
even on Python 3 systems.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-02-26 10:25:56 +01:00
Sage Weil
d2a3168bf3 Merge PR #26617 into master
* refs/pull/26617/head:
	rpm: Fix pyOpenSSL dependency

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2019-02-25 16:41:40 -06:00
Sage Weil
4059cbd756 Merge PR #26543 into master
* refs/pull/26543/head:
	Revert "ceph.spec.in: python-kubernetes broken on rhel"

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
2019-02-25 16:40:46 -06:00
Tim Serong
be98097979 rpm,cmake: additional fixes to make amqp support optional
Signed-off-by: Tim Serong <tserong@suse.com>
2019-02-25 19:49:20 +11:00
Brad Hubbard
ff324f450c rpm: Fix pyOpenSSL dependency
Fedora29 does not have pyOpenSSL but it does have python-pyOpenSSL

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2019-02-25 13:37:23 +10:00
Nathan Cutler
aac0e6751f rpm: build with lttng on ppc64le (SUSE)
In very recent SUSEs (e.g. Leap 15.1), the build dependencies needed for the
lttng build are satisfied for this architecture.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-02-22 18:36:12 +01:00
Nathan Cutler
79d3d48a5b rpm: no lttng build on openSUSE s390x
Since the lttng-ust-devel and babeltrace-devel RPMs are not maintained for s390x
in openSUSE, we have to exclude the lttng build on this architecture.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-02-22 18:36:12 +01:00
Jeff Layton
196e8151b5 Revert "ceph.spec.in: python-kubernetes broken on rhel"
This reverts commit c32c4874e1.

An updated python2-kubernetes package that does not depend on
python-adal has made it into the epel7 repos. With that change,
we can now revert this patch.

When we readd it back though, add in %{_python_buildid} so that
this works correctly on python3-based distros as well.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
2019-02-22 08:56:12 -05:00
Kefu Chai
ae786b93c8
Merge pull request #26520 from ktdreyer/rpm-rhel8
rpm: RHEL 8 fixes

Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-02-22 15:44:52 +08:00
Kefu Chai
66fb02dcfe
Merge pull request #26555 from tchaikov/wip-install-build-deps
cmake,rgw: make amqp support optional

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Yuval Lifshitz <yuvalif@yahoo.com>
Reviewed-by: Willem Jan Withagen <wjw@digiware.nl>
2019-02-22 15:39:55 +08:00
Kefu Chai
dd5bc2ff21 rpm: disable amqp endpoint on SLE/OpenSUSE
as librabbitmq-devel is not packaged on them yet.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-22 10:30:25 +08:00
Ken Dreyer
f74c76c2da rpm: build __pycache__ directories on RHEL 8
In RHEL 8, rpmbuild does not automatically generate __pycache__
directories. Generate them explicitly with the %py_byte_compile macro.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2019-02-21 15:03:51 -07:00
Ken Dreyer
217c3f4ce5 rpm: fix pyOpenSSL requirement for RHEL 8
On RHEL 7, this package is named "pyOpenSSL", but on RHEL 8, Fedora, and
SUSE, it is named "python3-pyOpenSSL".

Prior to this change, the RHEL conditional was applying to both RHEL 7
and 8, so we would fail to resolve the "pyOpenSSL" package dependency on
RHEL 8.

Update the RPM conditionals to use "pyOpenSSL" on RHEL 7 and
"python3-pyOpenSSL" on all other distributions.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2019-02-21 15:03:51 -07:00
Ken Dreyer
2273bfce42 rpm: fix python dependencies on RHEL 8
On RHEL 8, the python34-* and Cython packages are named identically to
Fedora (eg "python3-Cython"). Move the Python 2 "Cython" and python34-*
BuildRequires lines inside a RHEL 7 conditional, so RHEL 8 falls through
to the Fedora package names.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2019-02-21 15:03:05 -07:00
Sage Weil
0a7077a855 Merge PR #26237 into master
* refs/pull/26237/head:
	Revert "qa: update test_envlibrados_for_rocksdb.sh for libradospp split"
	doc/librados: explicitly mention that the C++ API is not stable
	ceph.spec: force use of upgrade devtoolset-gcc under RHEL 7
	librados: add symbol versioning to the C++ API
	librados: add symbol versioning to the C API
	librados: revert librados3/libradoscc back to librados2

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-02-21 11:18:46 -06:00
Jason Dillaman
a7ce5fb07a ceph.spec: force use of upgrade devtoolset-gcc under RHEL 7
There is a known crash under C++17 mode that requires an updated
devtoolset to address.

See https://bugzilla.redhat.com/show_bug.cgi?id=1616223

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-02-21 08:28:43 -05:00
Jason Dillaman
d2b1ab49f5 librados: add symbol versioning to the C++ API
The future goal would be to change the version for each Ceph major
release to ensure C++ applications will need to be recompiled against
the librados C++ API since we don't guarentee ABI stability.

Fixes: https://tracker.ceph.com/issues/38177
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-02-21 08:27:38 -05:00
Kefu Chai
6ca980beff
Merge pull request #26402 from tchaikov/wip-install-deps
install-deps.sh: selectively install dependencies

Reviewed-by: David Zafman <dzafman@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2019-02-21 11:59:10 +08:00
Sage Weil
e784b697b4 Merge PR #26526 into master
* refs/pull/26526/head:
	rpm,deb: remove btrfs-tools as a build-dependency
	rpm,deb: remove bc as a build-dependency

Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
2019-02-20 21:36:13 -06:00
Jason Dillaman
65c8733b56 librados: revert librados3/libradoscc back to librados2
For backwards compatibility and upgrade reasons, the librados2
API needs to be preserved and it needs to continue to be compatible
with dependent libraries like librbd1.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-02-20 14:59:26 -05:00
Sage Weil
d198831c44 Merge PR #26262 into master
* refs/pull/26262/head:
	mgr/orch/ssh: add qa test
	qa: install/exclude ceph-mgr-ssh package
	debian: package ssh orchestrator
	spec.ceph: package ssh orchestrator
	ssh/orch: add ssh orchestrator
2019-02-20 13:05:11 -06:00
Noah Watkins
c9fc8d3a7c spec.ceph: package ssh orchestrator
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2019-02-20 09:45:48 -08:00
Matt Benjamin
fcb8149951
Merge pull request #25866 from yuvalif/add_amqp_push_endpoint_new
rgw/pubsub: add amqp push endpoint
2019-02-20 07:37:34 -05:00
Kefu Chai
01c9e2a632 rpm,deb: remove btrfs-tools as a build-dependency
this change reverts 7d48d21a

we are using bluestore for testing by default on GNU/Linux now. and on
FreeBSD, install-deps.sh does not look at spec.in or d/control.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-20 11:32:11 +08:00
Kefu Chai
8bec5c99f4 rpm,deb: remove bc as a build-dependency
this change reverts 3ff4be6d, because in ce9c0298, we replaced bc
with awk.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-20 11:32:05 +08:00
Sage Weil
a60f332c32 Merge PR #24805 into master
* refs/pull/24805/head:
	qa/suite: add dedup test
	src/tools: fix compile error (master version issue)
	src/tools: add stats (fixed objects,total objects)
	src/tools: make room for cdc
	src/tools: make enhacned stats and interface class
	src/tools: set timelimit and add signal handler to check progress
	src/tools: use the slice thing and make parallel (chunk_scrub)
	src/test: add max-thread test in test_dedup_tool.sh
	src/tools: use the slice thing and make parallel
	src/test: add chunk-scrub test in test_dedup_tool.sh
	src/tools: add chunk-scrub op in dedup tool
	src/cls/cas: add has_chunk op
	src/test: add test_dedup_tool.sh
	src/tools: initial works for dedup tool

Reviewed-by: Sage Weil <sage@redhat.com>
2019-02-17 08:18:06 -06:00
Kefu Chai
d86ef56332 rpm: guard runtime deps with "with make_check"
move jq and xmlstarlet into "with make_check", as they
are only used for running "make check", not for building Ceph.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-17 02:27:07 +08:00
Kefu Chai
2fb4cddd6f rpm,deb: add python-{openssl,requests} as make_check dependencies
Fixes: https://tracker.ceph.com/issues/37584
Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-17 02:27:07 +08:00
Kefu Chai
ac1f62b750 rpm,deb: remove btrfs-tools as a build-dependency
this change reverts 7d48d21a

we are using bluestore for testing by default on GNU/Linux now. and on
FreeBSD, install-deps.sh does not look at spec.in or d/control.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-16 21:47:55 +08:00
Kefu Chai
502160594a rpm,deb: remove bc as a build-dependency
this change reverts 3ff4be6d, because in ce9c0298, we replaced bc
with awk.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-16 21:47:55 +08:00
Kefu Chai
c70faf4b13 rpm: mark mgr plugins "noarch"
as they are architecture independent.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-16 17:47:42 +08:00
Kefu Chai
5aab09992a rpm: s|lib/ceph/mgr|share/ceph/mgr|
as the mgr plugins are installed into $prefix/share/ceph/mgr now.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-16 16:38:27 +08:00
Nathan Cutler
d8e52a9e80 rpm: move Python deps out of distro-conditional blocks
The python%{_python_buildid}-bcrypt and python%{_python_buildid}-requests RPMs
are identically named across all the RPM distros, so move them out of the
distro conditional blocks.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-02-14 10:35:26 +01:00
Nathan Cutler
0b79741a77 rpm: make Python build deps somewhat less confusing
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-02-14 10:30:55 +01:00
Kefu Chai
9e561e9fb4
Merge pull request #26380 from tchaikov/wip-split-dashboard-package
deb,rpm,qa: split dashboard package

Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2019-02-14 16:59:58 +08:00
Kefu Chai
ce6347d0c0
Merge pull request #26398 from SUSE/wip-fix-spec-badness
ceph.spec.in: Don't use noarch for mgr module subpackages, fix /usr/lib64/ceph/mgr dir ownership

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-02-14 15:53:52 +08:00
Sage Weil
2a1ffd57d7 mgr/smart: remove
This is obsolete and replaced by the devicehealth module.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-02-13 12:39:22 -06:00
Kefu Chai
937025b4f3 rpm: split ceph-mgr-dashboard plugin into its own package
to make ceph-mgr-dashboard a separated package

- helps to reduce the repo size of downstream. because
  ceph-mgr-dashboard is an architecture independent package. by
  making it separated package avoids needless duplication of
  the same data in mutiple .debs.
- gives user a fine grained control of selection.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-13 21:37:30 +08:00
Tim Serong
8933ae438c ceph.spec.in: Make ceph-mgr own /usr/lib64/ceph/mgr directory
Without this, no package actually owns the /usr/lib64/ceph/mgr directory
so the build fails with "directories not owned by a package" errors for
ceph-mgr, ceph-mgr-diskprediction-local, ceph-mgr-diskprediction-cloud
and ceph-mgr-rook.

Signed-off-by: Tim Serong <tserong@suse.com>
2019-02-13 22:13:06 +11:00
Tim Serong
d38312566f ceph.spec.in: Don't use noarch for ceph-mgr module subpackages
Even though ceph-mgr modules are notionally non-architecture-specific,
the files themselves are installed to an architecture-specific path
(/usr/lib64/ceph/mgr/....), which causes the build to fail on SUSE
distros with a huge long list of errors like:

ceph-mgr-diskprediction-cloud.noarch: E: suse-filelist-forbidden-noarch
(Badness: 10000) /usr/lib64/ceph/mgr/diskprediction_cloud is not
allowed in a noarch package
[...]
(none): E: badness 1120287 exceeds threshold 1000, aborting.

Signed-off-by: Tim Serong <tserong@suse.com>
2019-02-13 22:05:30 +11:00
Kefu Chai
729104e5f2
Merge pull request #26379 from tchaikov/wip-remove-jinja2
rpm,deb: remove python-jinja2 dependency

Reviewed-by: Lenz Grimmer <lgrimmer@suse.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2019-02-13 17:29:58 +08:00
Yuval Lifshitz
b4c4169821 rgw: pubsub support amqp endpoint - demo
Signed-off-by: Yuval Lifshitz <yuvalif@yahoo.com>
2019-02-13 10:30:15 +02:00
Ken Dreyer
2f88b85e9d Merge pull request #26368 from alfredodeza/wip-rm38261
build: further removal of `subman` configuration

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Kefu Chai <tchaikov@gmail.com>
2019-02-12 12:13:53 -07:00
Kefu Chai
c2def40661 rpm,deb: remove python-jinja2 dependency
python-jinja2 dependency was added for the dashboard v1 in 87399bea. but
dashboard v2, which is now known as "dashboard" has taken the place of
the old dashboard. and dashboard now does not use jinja2, so we should
drop this dependency.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2019-02-12 17:16:33 +08:00
Alfredo Deza
3bf76e21c3 rpm: further removal/cleanup of subman calls
Signed-off-by: Alfredo Deza <adeza@redhat.com>
2019-02-11 16:14:43 -05:00
Sage Weil
c32c4874e1 ceph.spec.in: python-kubernetes broken on rhel
Error: Package: python2-kubernetes-8.0.0-6.el7.noarch (epel)
           Requires: python-adal

Signed-off-by: Sage Weil <sage@redhat.com>
2019-02-11 09:54:17 -06:00
Nathan Cutler
8ea24dd9aa
Merge pull request #26268 from smithfarm/wip-opensuse-s390
rpm: do not exclude s390x build on openSUSE

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-02-11 12:53:09 +01:00
Sage Weil
b4fa47390d Merge PR #25977 into master
* refs/pull/25977/head:
	qa/suites: exclude new packages when installing old versions
	rpm: add dependency on python-kubernetes module to ceph-mgr-rook package
	rpm,deb: add rbd_support module to ceph-mgr
	packaging: split ceph-mgr diskprediction and rook plugins into own packages

Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2019-02-09 13:46:51 -06:00
Jeff Layton
dc13683c1a rpm: add dependency on python-kubernetes module to ceph-mgr-rook package
Signed-off-by: Jeff Layton <jlayton@redhat.com>
2019-02-08 12:03:15 -05:00
Sage Weil
88b87c042d rpm,deb: add rbd_support module to ceph-mgr
Signed-off-by: Sage Weil <sage@redhat.com>
2019-02-08 08:29:45 -06:00
myoungwon oh
32bf50e5a2 src/tools: fix compile error (master version issue)
Signed-off-by: Myoungwon Oh <omwmw@sk.com>
2019-02-07 00:06:27 +09:00
Kefu Chai
200879a769
Merge pull request #26258 from liewegas/wip-disable-krb
build: disable kerberos for nautilus

Reviewed-by: Kefu Chai <kchai@redhat.com>
2019-02-06 19:00:01 +08:00
Dan Mick
5c137e7052 packaging: split ceph-mgr diskprediction and rook plugins into own packages
There are troublesome dependencies for both, so being able to deselect
them is useful

Signed-off-by: Dan Mick <dan.mick@redhat.com>
2019-02-04 14:53:35 -08:00
Nathan Cutler
3feca71d70 rpm: package crypto libraries for all archs
Since 318a8e3c07 we are now building at least the
openssl crypto plugin on all architectures, not just x86_64.

This fixes the non-x86_64 builds for master.

Fixes: 318a8e3c07
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-02-04 12:43:02 +01:00
Nathan Cutler
aa56098fa3 rpm: do not exclude s390x build on openSUSE
The openSUSE Build Service now offers s390x as a build target,
so this conditional is no longer needed.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-02-04 12:39:11 +01:00
Sage Weil
9aaa354cad build: disable kerberos for nautilus
We can re-enable after we branch.  For N, though, there is no point in dragging
in the dependencies and implying there is something that works.

Signed-off-by: Sage Weil <sage@redhat.com>
2019-02-03 14:27:49 -06:00
Mykola Golub
275bedc8d5
Merge pull request #26133 from dillaman/wip-37913
rbd: implement new 'rbd perf image iostat/iotop' commands

Reviewed-by: Mykola Golub <mgolub@suse.com>
2019-01-29 12:41:23 +02:00
Jason Dillaman
df4db9c5cb rbd: new 'perf image iostat/iotop' actions
This provides an 'iostat' and 'top'-like IO monitor for all
RBD images

Fixes: http://tracker.ceph.com/issues/37913
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2019-01-28 20:52:02 -05:00
Nathan Cutler
e6c257b799 rpm: fix xmlsec1 build dependency for dashboard make check
Fixes: 46d286c7f7
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2019-01-24 19:31:20 +01:00
Brad Hubbard
885a37ac02 mount.fuse.ceph: Fix ambiguous shebang
The ambiguous shebang now produces an error in rawhide and halts the
build. In f29 this was a warning. Add python3 as a dependency for
ceph-fuse.

Fixes: http://tracker.ceph.com/issues/37787

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2019-01-10 10:32:07 +10:00
Kefu Chai
5d9440b203
Merge pull request #25503 from ceph/rbd-mirror-ceph-base
spec: requires ceph base instead of common

Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2018-12-21 14:04:34 +08:00
Tim Serong
0b29fbcc7b Revert "spec: fix cython package version to less than 0.29"
This reverts commit 088fbff7df.

Signed-off-by: Tim Serong <tserong@suse.com>
2018-12-17 23:56:28 +11:00
Sébastien Han
c0f77bd69e spec: requires ceph base instead of common
Currently rbd-mirror and radosgw packages installation won't create the
Ceph directories in /var/lib/ceph since they depend on ceph-common
only. ceph-base is responsible for creating these directories.

Since ceph-base requires ceph-common then let's use ceph-base as a
dependency.

Fixes: http://tracker.ceph.com/issues/37620
Signed-off-by: Sébastien Han <seb@redhat.com>
2018-12-13 11:09:48 +01:00
Sage Weil
74594b1798 Merge PR #25402 into master
* refs/pull/25402/head:
	pybind/mgr: rename get_option -> get_ceph_option
	pybind/mgr: add get_ceph_option to standby module interface
	ceph.spec.in: add xmlsec1 dependency for dashboard make check
	mgr: rename internal ceph_set_config -> ceph_set_module_option
	pybind/mgr: set_config -> set_module_option
	pybind/mgr: get_config -> get_module_option
	mgr: rename internal get_config -> get_module_option
	pybind/mgr: OPTIONS -> MODULE_OPTIONS

Reviewed-by: Ricardo Dias <rdias@suse.com>
Reviewed-by: Tim Serong <tserong@suse.com>
2018-12-12 14:00:52 -06:00
Nathan Cutler
506ba0ea0d build/ops: rpm: fix libradospp-devel runtime dependency
The devel packages don't get the major version in their name.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-12-11 15:06:08 +01:00
Sage Weil
46d286c7f7 ceph.spec.in: add xmlsec1 dependency for dashboard make check
Signed-off-by: Sage Weil <sage@redhat.com>
2018-12-11 03:54:52 -06:00
Nathan Cutler
c1083b2f4f build/ops: rpm: make ceph-grafana-dashboards own its directories on SUSE
This is only required to get the spec file to build in the OpenSUSE
Build Service (OBS). Also, this change could potentially make the
package impossible to install together with grafana (if the latter
owns the same directories with different ownership/permissions).
Therefore, make the change specific to SUSE.

Fixes: http://tracker.ceph.com/issues/37485
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Signed-off-by: Tim Serong <tserong@suse.com>
2018-12-07 16:16:42 +01:00
Sage Weil
59d0844c12 Merge PR #23550 into master
* refs/pull/23550/head:
	auth: Kerberos authentication
2018-12-05 13:42:17 -06:00
oliveiradan
67784065ce auth: Kerberos authentication
Signed-off-by: Daniel Oliveira <doliveira@suse.com> (github: oliveiradan)
2018-12-03 18:55:46 -07:00
Ricardo Dias
088fbff7df
spec: fix cython package version to less than 0.29
Cython version 0.29 removed the support for python subinterpreters,
which completely breaks ceph-mgr funcionality.

See cython repo commit:
7e27c7cd51

Fixes: http://tracker.ceph.com/issues/37472

Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-11-29 15:31:16 +00:00
Nathan Cutler
7d03d522bc build/ops: rpm: RHEL 8 needs Python 3 build
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-11-22 14:31:54 +01:00
Nathan Cutler
8ea39207bf build/ops: rpm: add link to doc explaining bcond syntax
The %bcond_with and %bcond_without macros are confusing to folks who
don't do a lot of RPM packaging work. Let's try to help these folks out!

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-11-20 15:01:44 +01:00
Nathan Cutler
7d4916618c build/ops: rpm: stop install-deps.sh clobbering spec file Python build setting
Fedora 29 still ships a Python 2 binary, but some of Ceph's build
dependencies are only available in py3 versions there. In other
words, from F29 on, it is no longer possible to do a py2 Ceph build
on Fedora, even if a python2 binary exists on the system.

If that were not enough, the Python 2 that ships with Fedora 29 is
linked against a non-compatible version of OpenSSL.

Before this commit, install-deps.sh was overriding the spec file's
Python build setting based on the presence or absence of a python2
binary. As the bug cited below indicates, this was not a good idea.

It's better for the spec file to be explicit about which OS versions
are py2 and which are py3, and just stick to that.

Fixes: http://tracker.ceph.com/issues/37301
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-11-20 15:00:48 +01:00
Kefu Chai
cac0f5802a rpm,deb: libradospp1-dev should depend on librados-dev
because librados.hpp `#include`s librados.h

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-11-08 07:00:24 -08:00
Jason Dillaman
bbb0fc0f17
Merge pull request #24856 from leseb/spec-rbd-mirror
spec: add missing rbd mirror bootstrap directory

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2018-11-05 07:23:42 -05:00
Sébastien Han
8c8d60d3c7 spec: add missing rbd mirror bootstrap directory
Currently /var/lib/ceph/bootstrap-rbd-mirror is absent, which means we
need to create it manually in order to pool the
client.bootstrap-rbd-mirror key.

Signed-off-by: Sébastien Han <seb@redhat.com>
2018-11-05 11:06:07 +01:00
Kefu Chai
38db3ee6c5 rpm,deb: package libceph-common.so.* not libceph-common.so*
be more explicit on what we are packaging. because only
libceph-common.so.${soversion} will be packaged, since libceph-common.so
won't be installed by cmake anymore.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-11-02 00:15:31 +08:00
Kefu Chai
842a57eb16 rpm: s/librados2/librados3/
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-11-02 00:15:31 +08:00
Kefu Chai
dd0f43db7c rpm: add libradospp* packages
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-11-02 00:15:31 +08:00
Kefu Chai
f386db6433
Merge pull request #24735 from b-ranto/wip-rpm-dashboards
build/ops: rpm: Package grafana dashboards

Reviewed-by: Lenz Grimmer <lgrimmer@suse.com>
Reviewed-by: Jan Fajerski <jfajerski@suse.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-10-30 18:57:12 +08:00
Lenz Grimmer
88719afc73
Merge pull request #22833 from rjfd/wip-dashboard-jwt
mgr/dashboard: JWT authentication

Reviewed-by: Ricardo Marques <rimarques@suse.com>
Reviewed-by: Tiago Melo <tmelo@suse.com>
Reviewed-by: Volker Theile <vtheile@suse.com>
2018-10-30 10:50:20 +01:00
Ricardo Dias
2f5e7c3392
mgr/dashboard: backend: JWT based authentication
Signed-off-by: Ricardo Dias <rdias@suse.com>
2018-10-29 15:47:14 +00:00
Kefu Chai
fd80d4b476 rpm: use %license macro for packaging license file
see https://rpm-guide.readthedocs.io/en/latest/rpm-guide.html#rpm-macros

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-10-26 22:04:38 +08:00
Boris Ranto
5debf36b37 rpm: Create ceph-grafana-dashboards package
Signed-off-by: Boris Ranto <branto@redhat.com>
2018-10-25 19:55:16 +02:00
Nathan Cutler
7349218acb build/ops: drop sgdisk build/runtime dependencies
sgdisk was a dependency of ceph-disk, which has been ripped out.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-10-23 07:56:13 +02:00
Brad Hubbard
24636267f9 rpm: Use updated gperftools-libs at runtime
Due to ABI breakage in libtcmalloc.so.4 we need to specify the minimum
version to be used at runtime to be greater than or equal to the version
used at build time.

Fixes: http://tracker.ceph.com/issues/36508

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2018-10-18 11:22:25 +10:00
Boris Ranto
ea6d7d2c98 rpm: Use hardened LDFLAGS
Currently, we do pass the hardened CFLAGS and CPPFLAGS when building the
code. However, we do not pass the hardened flags to the linker. This
means that the binaries are linked without the options like -Wl,-z,now.
As a result, we do not fully harden the binaries that we build.

This commit fixes this by passing the RPM_LD_FLAGS to the linker so the
builds are linked with the properly hardened flags.

Fixes: http://tracker.ceph.com/issues/36316

Signed-off-by: Boris Ranto <branto@redhat.com>
2018-10-04 14:52:08 +02:00
Kefu Chai
a778cc701f
Merge pull request #24130 from tchaikov/wip-gcc-7.3
rpm: bump up required GCC version to 7.3.1

Reviewed-by: Casey Bodley <cbodley@redhat.com>
2018-09-20 12:25:57 +08:00
Kefu Chai
5bcc179bc4 rpm: bump up required GCC version to 7.3.1
so we can include the fix of
https://gcc.gnu.org/ml/libstdc++/2017-07/msg00077.html and the fix at
7c78f2e672
. otherwise, if a class offers implicit conversion operator to
std::string and std::string_view, seastar will fail to compile. like

/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:3946:7:
note: candidate: std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT, _Traits, _Alloc>::operator+=(const
std::basic_string<_CharT, _Traits, _Alloc>&) [with _CharT = char;
_Traits = std::char_traits<char>; _Alloc = std::allocator<char>]
       operator+=(const basic_string& __str)
       ^~~~~~~~
/opt/rh/devtoolset-7/root/usr/include/c++/7/bits/basic_string.h:3988:7:
note: candidate: std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT, _Traits,
_Alloc>::operator+=(std::basic_string<_CharT, _Traits,
_Alloc>::__sv_type) [with _CharT = char; _Traits =
std::char_traits<char>; _Alloc = std::allocator<char>;
std::basic_string<_CharT, _Traits, _Alloc>::__sv_type =
std::basic_string_view<char>]
       operator+=(__sv_type __sv)
       ^~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-17 22:51:26 +08:00
Kefu Chai
e69e50a859 rpm: use updated gperftools
make sure we only build with the higher version of gperftools on
distros where both 2.4 and 2.6.1 are packaged. see
https://git.centos.org/summary/rpms!gperftools.git . at the time of
writing, gperftools 2.6.1 is packaged for CentOS/RHEL 7, if gperftools
(>= 2.4) is required by Ceph, and user already has this version
installed, when new Ceph packages are installed, the updated gperftools
2.6.1 version won't be installed as a dependency. when launching
Ceph compiled with tcmalloc enabled, we will have

symbol lookup error: ceph-osd: undefined symbol: _ZdaPvm

so, by bumping up the required version of gperftools, the updated
gperftools will be installed.

see https://software.opensuse.org/package/gperftools, openSUSE/SLE offer
2.5. so they are safe at this moment.

Fixes: http://tracker.ceph.com/issues/35969
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-09-17 14:20:51 +08:00
Brad Hubbard
fb101163fc rpm: Fix Fedora error "No matching package to install: 'Cython3'"
Fixes: http://tracker.ceph.com/issues/35831

Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
2018-09-07 13:32:08 +10:00
Patrick Donnelly
4699cec388
Merge PR #23656 into master
* refs/pull/23656/head:
	build/ops: rpm: package cephfs-shell for SUSE as well as Fedora

Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-08-25 12:52:09 -07:00
Kefu Chai
b2733c0426
Merge pull request #23648 from sakhinov/sakhinov-fix-bcrypt
change ceph-mgr package depency from py-bcrypt to python2-bcrypt

Reviewed-by: John Spray <john.spray@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-08-23 19:25:32 +08:00
Kefu Chai
2532fb6b2a
Merge pull request #21983 from chardan/jfw-wip-libradosstriper_ultimate-final-battle
libradosstriper: conditional compile

Reviewed-by: Kefu Chai <kchai@redhat.com>
2018-08-23 19:20:16 +08:00
Nathan Cutler
e0f79368a4 build/ops: rpm: package cephfs-shell for SUSE as well as Fedora
6dd06b0c34 introduced RPM packaging of cephfs-shell

This initial packaging was Fedora-only, but colorama and cmd2 *are* packaged
for both openSUSE and SLE.

Note: there is no py2-compatible version of cephfs-shell.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-08-21 17:11:52 +02:00
Konstantin Sakhinov
6af10cae66 rpm: change ceph-mgr package depency from py-bcrypt to python2-bcrypt
Signed-off-by: Konstantin Sakhinov <sakhinov@gmail.com>
2018-08-20 16:08:33 +03:00
Jesse Williamson
1a44357f5c package: modify ceph.spec.in to support libradosstriper conditional compilation
Signed-off-by: Jesse Williamson <jwilliamson@suse.de>
2018-08-16 08:21:42 -07:00
Sage Weil
b0b616df7b Merge PR #23240 into master
* refs/pull/23240/head:
	qa/suites/rados, qa/workunits/rados: Add suite/workunit for ceph-crash
	add ceph-crash service
	common/options: enable mgr 'crash' module by default
	global/signal_handler: add 'done' file to signal crashdump is ready

Reviewed-by: Sage Weil <sage@redhat.com>
2018-08-14 20:31:29 -05:00
Kefu Chai
6dd06b0c34 rpm: package cephfs-shell for fedora
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-09 20:19:34 +08:00
Dan Mick
da20184a16 add ceph-crash service
ceph-crash runs from systemd and watches /var/lib/ceph/crash
for crashdumps, posting them to the mgrs using the mgr's
crash plugin

Signed-off-by: Dan Mick <dan.mick@redhat.com>
2018-08-08 18:37:43 -07:00
Kefu Chai
f18ffecca3 rpm: remove fmt-devel from BuildRequires
because RHEL/CentOS 7 only offers fmt-devel 3.0.2, while seastar
requires >= 4.0.0, < 5.0.0, and on openSUSE Leap 15, we have
libfmt-devel 5.x.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-08-02 23:16:11 +08:00
Nathan Cutler
f0eed6d00e build/ops: rpm: fix seastar build dependencies
1. cryptopp-devel was moved to the distro-specific section by
aeb974b913, then
96196e9d77 reintroduced it in the
non-distro-specific section, breaking install-deps.sh for SUSE

2. fmt-devel is called libfmt-devel on SUSE

Fixes: install-deps.sh on SUSE
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-08-02 12:19:34 +02:00
Kefu Chai
d76fbf67a6
Merge pull request #23043 from tchaikov/wip-python-cephfs-dependencies
deb,rpm: fix python-cephfs dependencies

Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2018-07-28 09:53:32 +08:00
Kefu Chai
03c7bee4ee deb,rpm: python-cephfs should depend on python-ceph-argparse
python-ceph-argparse is required by ceph_volume_client.py. hence we do
need list it as a dependency of python-cephfs.

Fixes: http://tracker.ceph.com/issues/24919
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-25 20:53:50 +08:00
Kefu Chai
8d8099b73e rpm: Revert "build/ops: rpm: python3-ceph-argparse only if Python 2 available"
This reverts commit c0b7aab381.

python3-ceph-argparse is required by ceph_volume_client.py. hence we do
need it as a dependency of python3-cephfs.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-25 15:22:16 +08:00
Kefu Chai
b35823cbbc deb,rpm: python-cephfs should depend on python-rados
in `cephfs.pyx` we `cimport rados`, and in
LibCephFs.create_with_rados(), Rados.cluster is accesssed without GIL,
so we need to import the rados module for cephfs to ensure that it's
safe to access this attribute without GIL.

dh_python2 and dh_python3 cannot fill ${python:Depends} and
${python3:Depends} with this dependency, so we need to set it
explicitly.

Fixes: http://tracker.ceph.com/issues/24918
Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-25 15:22:16 +08:00
Kefu Chai
96196e9d77 rpm,install-deps,cmake: install {c-ares,fmt}-devel
* ceph.spec.in: c-ares-devel and fmt-devel are installed as
  dependencies fo seastar.
* install-deps.sh: libfmt-dev is missing in xenial, so we only
  install libc-ares-dev for ubuntu in install-deps.sh .
* cmake: build libfmt if it's not found.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2018-07-25 13:13:45 +08:00
Nathan Cutler
341d985673 build/ops: rpm: provide files moved from ceph-test
d7b493a710 moved three binaries from the
ceph-test package to other packages, causing trouble with upgrades in
test lab environments (users typically do not install the ceph-test
package).

While the original upgrade troubles have already been addressed, RPM
has a "Provides" mechanism for easing the pain, so it makes sense to
use it.

Fixes: http://tracker.ceph.com/issues/22558
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-21 10:14:02 +02:00
Nathan Cutler
9b53c0d4fc
Merge pull request #23077 from smithfarm/wip-etc-sudoers
build/ops: rpm: make sudo a build dependency

Reviewed-by: Tim Serong <tserong@suse.com>
2018-07-19 16:26:20 +02:00
Nathan Cutler
9f54233104 build/ops: rpm: make sudo a build dependency
ede36df325 added sudo as a runtime dependency,
but that commit also causes OBS builds to fail with:

[10666s] ... checking filelist
[10667s] ceph-osd-14.0.0-lp150.1332.1.x86_64.rpm: directories not owned by a package:
[10667s]  - /etc/sudoers.d

Since the "sudo" package is a runtime dependency of ceph-osd, it is guaranteed
to be installed on the target system and there is no reason for ceph-osd to own
this directory.

Having sudo as a build dependency makes OBS happy, and does no harm.

Follow-on fix for https://github.com/ceph/ceph/pull/22745

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-19 14:15:05 +02:00
Nathan Cutler
aeb974b913 build/ops: rpm: fix seastar build dependencies for SUSE
cryptopp-devel is called libcryptopp-devel on SUSE.

/usr/bin/protoc is included in protobuf-devel on SUSE.

numactl-devel is called libnuma-devel on SUSE

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2018-07-19 10:08:41 +02:00