This patch gives each of the ceph-{mds,mon,osd,radosgw} packages its own
%post, %preun, and %postun scriptlets dealing with the package's unit files.
The scriptlets of ceph-base are adapted to handle the ceph.target unit file
only.
The scriptlets of ceph-mon handle ceph-create-keys services in addition to ceph-mon.
The scriptlets of ceph-osd handle ceph-disk services in addition to ceph-osd.
Fixes: http://tracker.ceph.com/issues/14941
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Signed-off-by: Boris Ranto <branto@redhat.com>
Some distros, like Fedora and openSUSE, have a policy that all services are
disabled by default.
This patch changes that default for the ceph.target and
ceph-{mds,mon,osd,radosgw}.target services.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Signed-off-by: Boris Ranto <branto@redhat.com>
SUSE has settled on "ntp-daemon" as the generic package name. The "ntp" and
"chrony" etc. packages have "Provides: ntp-daemon" in their respective spec
files.
References: http://tracker.ceph.com/issues/15419
Signed-off-by: Nathan Cutler <ncutler@suse.com>
These were added to get /dev/disk/by-partuuid/ symlinks to work on
wheezy. They are no longer needed for the supported distros (el7+,
jessie+, trusty+), and they apparently break dm by opening devices they
should not.
Fixes: http://tracker.ceph.com/issues/15516
Signed-off-by: Sage Weil <sage@redhat.com>
ceph.spec.in: enable lttng and babeltrace explicitly
thanks to ktdreyer, we have lttng and babel in EPEL-7 now.
Reviewed-by: Nathan Cutler <ncutler@suse.com>
Strip the .py suffix so that no pyc / pyo files are generated.
Do not install on CentOS.
http://tracker.ceph.com/issues/14972Fixes: #14972
Signed-off-by: Loic Dachary <loic@dachary.org>
First, make the Debian package description mention that RGW aims to
implement the Swift API.
Second, replace the RPM package description with the Debian one, both for
consistency and because the Debian one is better.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
The script is designed to create a fact file for subscription-manager to
consume. It is run hourly from /etc/cron.hourly on RHEL.
http://tracker.ceph.com/issues/14972Fixes: #14972
Signed-off-by: Loic Dachary <loic@dachary.org>
ceph.spec.in: do not install Ceph RA on systemd platforms
Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
We recently moved fsck/repair tools to ceph-common package. We should
also make the version/release requirements tight.
Signed-off-by: Boris Ranto <branto@redhat.com>
One side effect of the recent package split (in #10587) is that "ceph"
is now an empty meta-package.
We should not have any packages that depend on "ceph" any more. Change
the various sub-packages to either drop the dependency altogether, or
just Require: ceph-base instead.
Fixes: #15146
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
The CephFS repair tools are generally useful to run on any node, not
just the MDS nodes themselves.
Move the utilities from the ceph-mds package to the ceph-common package.
Fixes: #15145
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
before this change, we do not pacakge tracepoint probe shared libraries
on rhel7. but "configure" script enables them if lttng is detected. and
rpm complains at seeing installed but not pacakged files. as EPEL-7 now
includes lttng-ust-devel and libbabeltrace-devel, we'd better
BuildRequire them, and build with them unless disabled otherwise. so in
this change
* make "lttng" an rpm build option enabled by default
* BuildRequire lttng-ust-devel and libbabeltrace-devel if the "lttng"
"lttng" option is enabled
* --without-lttng --without-babeltrace if the "lttng" option is disabled
Fixes: #14844
Signed-off-by: Kefu Chai <kchai@redhat.com>
By pull request 7742, the btrfs-progs package was considered as a BuildRequires
only when --with tests was engaged like :
if %{with tests}
BuildRequires: btrfsprogs
%endif
That's perfectly valid for a spec file.
The issue we have is the following :
- yum-builddep called by install-deps.sh is used to prepare the build env by
installing the needed BuildRequires.
- %{with test} is defined by using a %bcond_with
- yum-builddep doesn't consider %{with test} as valid
- yum-builddep doesn't install the btrfs package
As per discussions with the yum team, there is no way to engage conditional flags with
yum-builddep.
So this patch, as per discussions with Nathan Cutler & Loic Dachary, is removing
the condition arond the BuildRequires.
Note that all BuildRequires defined with a %bcond_with would be affected by this
issue. The current specfile only have %bcond_without conditional BuildRequires
which is fine.
Fixes: #15042
Signed-off-by: Erwan Velu <erwan@redhat.com>
Based on feedback from upstream RGW, introduce a new json-format
token structure representing credentials for pass-through authentication
(e.g., LDAP without Keystone's digest authentication).
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
To get the spec file into a consistent state, let's move Cython into the distro
specific are of the spec file.
Signed-off-by: Erwan Velu <erwan@redhat.com>
When doing a 'make check', 'qa/workunits/ceph-helpers.sh' does expect the 'btrfs'
command to be available. If not, that make many tests failing.
Signed-off-by: Erwan Velu <erwan@redhat.com>
The Ceph Resource Agent (RA) wraps the Ceph init script and is incompatible
with systemd.
http://tracker.ceph.com/issues/14828Fixes: #14828
Signed-off-by: Nathan Cutler <ncutler@suse.com>
This patch aligns the spec file with src/ocf/Makefile.am, which
installs the resource agents in $(prefix)/lib/ocf.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
This addresses the following RPMLINT error:
ceph-base.x86_64: E: library-without-ldconfig-postun (Badness:
300) /usr/lib64/libosd_tp.so.1.0.0
ceph-base.x86_64: E: library-without-ldconfig-postun (Badness:
300) /usr/lib64/libos_tp.so.1.0.0
This package contains a library and provides no %postun scriptlet
containing a call to ldconfig.
ceph-base.x86_64: E: library-without-ldconfig-postin (Badness:
300) /usr/lib64/libosd_tp.so.1.0.0
ceph-base.x86_64: E: library-without-ldconfig-postin (Badness:
300) /usr/lib64/libos_tp.so.1.0.0
This package contains a library and provides no %post scriptlet
containing a call to ldconfig.
http://tracker.ceph.com/issues/14940Fixes: #14940
Signed-off-by: Nathan Cutler <ncutler@suse.com>
The lsb_release executable is being run in multiple places, not least in
src/common/util.cc, which calls it via shell in the collect_sys_info() code
path.
This patch addresses this issue on SUSE- and Debian-derivatives, as well
as reinstating the dependency for RHEL/Fedora after it was dropped in
1560057226.
http://tracker.ceph.com/issues/14906Fixes: #14906
Signed-off-by: Nathan Cutler <ncutler@suse.com>
As of a recent commit, we had /var/lib/ceph/{mds,mon,osd} directories
packaged twice, once with %attr and once without. Drop the latter.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Drop duplicate rados-classes libraries from ceph-osd and align the RPM
packaging with Debian by using a wildcard to package everything that
autotools puts in the rados-classes directory.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
ceph-disk uses sgdisk, which resides in the gdisk and gptfdisk packages on
RHEL and SUSE derivatives, respectively.
ceph-disk is included in the ceph-osd package, so the sgdisk dependency
belongs there.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Flask is used by MON (in the Ceph REST API) and by RGW (powerdns).
Therefore, it only needs to be in the ceph-mon and ceph-radosgw packages.
Also, this commit encloses the specification of the python-flask runtime
dependency in distro-conditional blocks to account for a minor difference
in the package name between RHEL and SUSE.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
The ceph package is now a metapackage, so move all its runtime dependencies
to ceph-base as we already have done in the Debian packaging.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Split up the "ceph" package into four new packages:
1. ceph-mon
2. ceph-osd
3. ceph-mds (already done on Debian)
4. ceph-base (files shared among multiple servers)
and then:
5. Make "ceph" into a metapackage that depends on both -mon and -osd
(and -mds, for RPMs).
To describe the outcome of this change another way:
For RPMs:
- "ceph-{mon,osd,mds}" Require: ceph-base.
- "ceph" will become a metapackage that Requires: ceph-{mon,osd,mds}.
For DEBs:
- "ceph-{mon,osd,mds}" will Depends: ceph-base.
- "ceph" will become a metapackage that Depends: ceph-{mon,osd}.
- "ceph" will continue to Recommends: ceph-mds
New users should "yum install ceph-mon" or "yum install ceph-osd" (or
"apt-get install ceph-mon", etc) in order to install the exact daemons
that they need.
http://tracker.ceph.com/issues/10587Fixes: #10587
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Since these plugins are only used in "make check", there is no
reason to package them and doing so causes RPMLINT to complain.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
First, it makes sense for both ceph_common.sh and ceph-osd-prestart.sh to
reside in the same directory: make it so.
Second, /usr/lib exists on both RHEL/Fedora and SLE/openSUSE, whereas
the later lacks /usr/libexec. To make this less painful, package
ceph_common.sh and ceph-osd-prestart.sh in /usr/lib/ceph.
Third, allow e.g. FreeBSD to do its own thing by using the $(libexecdir)
Autoconf variable (but set it to /usr/lib in the spec file).
http://tracker.ceph.com/issues/14687Fixes: #14687
Signed-off-by: Nathan Cutler <ncutler@suse.com>
We do suggest users to put their logs in /var/log/radosgw in the
documentation at times. We should also label that directory with
ceph_var_log_t so that ceph daemons can also write there.
The commit also updates the man page for this policy. This man page is
automatically generated by
* sepolicy manpage -p . -d ceph_t
and have not been reloaded in a while. Hence, it contains few more
changes than the new radosgw directory.
Signed-off-by: Boris Ranto <branto@redhat.com>
This is required for building python modules with cython, but for some
reason is not a direct dependency (on debian only a recommends) for
the cython package itself.
Refs: #14059
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
The only thing that uses bzip2-devel is RocksDB, and it's optional, not
requirement. Drop the bzip2-devel/libbz2-dev dependency entirely, and
let RocksDB use it only if it is already present.
Fixes: #13981
Signed-off-by: Piotr Dałek <piotr.dalek@ts.fujitsu.com>
ctypes is fundamentally incapable of providing safe callback support
(exceptions during callbacks are not handled properly). To fix this, and also
gain more flexibility, rewrite/port the librbd bindings to Cython instead.
Other Python bindings are expected to migrate to Cython in the future.
Reference: http://tracker.ceph.com/issues/13115
To support this, this change also:
- Introduces a Makefile for pybind which calls setup.py
- Updates the installation files for packages
- Adds a hack to admin/build-doc to build a dummy librbd, avoiding the need to
build the entire client library just to generate documentation (Sphinx needs
to be able to import rbd.so, which depends on librbd.so symbols).
With contributions by Josh Durgin <jdurgin@redhat.com>
Signed-off-by: Hector Martin <marcan@marcan.st>
To prepare for the migration of rbd.py to Cython, add Cython as a package
dependency and have the configure script look for it.
Also adds Cython as a dependency for admin/build-doc, and changes the
virtualenv to allow usage of system packages (to avoid having to compile
Cython inside the virtualenv).
With contributions by Josh Durgin <jdurgin@redhat.com>
Signed-off-by: Hector Martin <marcan@marcan.st>
systemd: start/stop/restart ceph services by daemon type
Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Ensure the macro is defined, and use it to placate the relevant openSUSE
RPMLINT check.
Drop --prefix=/run/ceph (introduced by 477bb064) because we now supply the
configuration file on the systemd-tmpfiles command line. (We don't need to run
systemd-tmpfiles on all files in /usr/lib/tmpfiles.d/ - just on ours.)
Signed-off-by: Nathan Cutler <ncutler@suse.com>
The limit, -j8, may seem arbitrary but works nicely in the openSUSE Build
Service.
http://tracker.ceph.com/issues/13858Fixes: #13858
Signed-off-by: Nathan Cutler <ncutler@suse.com>
This patch creates rbdmap shell script that is called from init-rbdmap
init script. The patch also renames src/rbdmap configuration file to
src/etc-rbdmap so that rbdmap shell script can be installed via build
system directly. Finally, the patch accomodates these changes in spec
file and build system.
Fixes: #13374
Signed-off-by: Boris Ranto <branto@redhat.com>
Drop the redhat-lsb-core dependency as it is no longer necessary on
fedora/rhel.
The other two init scripts do not use redhat-lsb-core either. The
init-ceph.in conditionally requires /lib/lsb/init-functions and does not
use any of the functions defined in that file (at least not directly).
The init-radosgw file includes /etc/rc.d/init.d/functions on non-debian
platforms instead of /lib/lsb/init-functions file so it does not require
redhat-lsb-core either.
Signed-off-by: Boris Ranto <branto@redhat.com>
There is a kmod bug that affects RHEL7 derivatives which will
result in device permissions being reset back to defaults.
Fixes: #13305
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Since the main package and all the subpackages are built in the
same environment, concentrate all the BuildRequires in the main
package.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
It is possible that the ceph user/group will not have fixed UID/GID in SUSE.
Instead, it is possible that the ceph package will depend on a separate package
whose sole purpose will be to create the ceph user/group if they do not exist.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
The openSUSE Build Service runs a number of "post-build checks" after the RPMs
have been generated. One of these tests the RPM scriptlets for idempotence.
Without this line in the specfile, the check fails on SLE_12 because it cannot
find the systemd-tmpfiles binary.
http://tracker.ceph.com/issues/13375Fixes: #13375
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Currently, the main ceph package and the ceph-radosgw behave
differently on upgrade. This commit unifies their behavior
to the following:
On package removal, disable and stop all related systemd units.
On package upgrade, do nothing unless there is a file /etc/sysconfig/ceph
containing a parameter CEPH_AUTO_RESTART_ON_UPGRADE. If parameter is set
to "yes", restart the systemd units iff they are running.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Add "--param ggc-min-expand=20 --param ggc-min-heapsize=32768"
to RPM_OPT_FLAGS, ensuring gcc does not add debug symbols and is
more aggressive about garbage collection.
Thanks to Berthold Gunreben for debugging this issue.
http://tracker.ceph.com/issues/13352Fixes: #13352
Signed-off-by: Nathan Cutler <ncutler@suse.com>
The -o option to groupadd/useradd is not recognized in SLE12. For
SLE/openSUSE, follow the openSUSE packaging guidelines.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Since the ceph user and group are created in the ceph-common
%pre scriptlet, the systemd-tmpfiles --create command needs
to run in that package.
tracker.ceph.com/issues/13346 Fixes: #13346
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Over in the SUSE sector, we are trying to enable the SLE_12 and openSUSE_13.2
build targets. The lttng/babeltrace stuff is currently available only in
SLE_12.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
In Fedora, RHEL and CentOS there is a package called boost-random.
In SLE/openSUSE, there is no such package.
Signed-off-by: Nathan Cutler <ncutler@suse.com>
There is no need to restart the daemons when removing ceph-selinux
package if SELinux is not enabled.
Fixes: #13061
Signed-off-by: Boris Ranto <branto@redhat.com>
This patch minimizes the amount of daemon stop/start procedures when
upgrading ceph-selinux package. With this patch, the daemons get
restarted only if SELinux is enabled and the SELinux policy version
changed in the meantime.
Fixes: #13061
Signed-off-by: Boris Ranto <branto@redhat.com>
The rbd-replay* utilities are useful for Ceph users with RBD clients.
Currently the rbd-replay* utilities ship in the "ceph-test" package, and
we intend this ceph-test package for Ceph developers and contributors,
not normal users.
Move the rbd-replay* utilities to "ceph-common".
http://tracker.ceph.com/issues/12994Fixes: #12994
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
This allows members of the ceph group to make librados clients (like the
ceph cli and qemu) create sockets in the default /var/run/ceph/* location.
Signed-off-by: Sage Weil <sage@redhat.com>
The current SELinux policy does not cover radosgw daemon. This patch
introduces the SELinux support for radosgw daemon (civetweb only).
Signed-off-by: Boris Ranto <branto@redhat.com>