Commit Graph

679 Commits

Author SHA1 Message Date
Sage Weil
dbcaa54485 uuid: use boost::random:random_device
The boost mt code uses uninitialized memory for extra randomness,
which is a bad idea in general but more importantly makes valgrind
unhappy.  Use /dev/urandom instead.

Unfortunately this introduces a link time dependency.. meh!

Fixes: #12736
Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-24 14:51:47 -04:00
Rohan Mars
62bfc7a1ab moved to use boost uuid implementation, based on commit 4fe89a7b14
Signed-off-by: Rohan Mars <code@rohanmars.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
2015-08-19 06:46:17 -04:00
Boris Ranto
e4cff034e3 ceph.spec.in: Require awk for selinux post script
Signed-off-by: Boris Ranto <branto@redhat.com>
2015-08-19 11:26:06 +02:00
Boris Ranto
9038488bc2 selinux: Relabel files if and only if the policy version changed
Currently, the ceph files are being relabelled every time the package is
rebuilt. Fix this by checking the policy versions and relabel the files
only if the policy actually changed (different policy version was
detected).

Signed-off-by: Boris Ranto <branto@redhat.com>
2015-08-19 11:17:13 +02:00
Milan Broz
28d3c4c92b Do not use hardcoded paths in spec post section for selinux commands.
Signed-off-by: Milan Broz <mbroz@redhat.com>
2015-08-18 14:25:20 +02:00
Milan Broz
fa2203e951 Add dependence to selinux-policy-base to fix installation in kickstart.
Signed-off-by: Milan Broz <mbroz@redhat.com>
2015-08-18 14:25:04 +02:00
Milan Broz
14da7e20d9 Update rpm spec to properly restart systemd ceph.target.
If we are using systemd, ceph target should be used.
Also fail to restart service should not stop policy to load.

Signed-off-by: Milan Broz <mbroz@redhat.com>
2015-08-18 14:25:04 +02:00
Nathan Cutler
6c803cdf42 ceph.spec.in: test %preun argument is zero for removal-only operations
The %preun section now contains logic for disabling and stopping all the
Ceph systemd units when the ceph package is removed. However, there is no
conditional around it, so the units are disabled and stopped on RPM upgrade
as well as removal.

http://tracker.ceph.com/issues/12685 Fixes: #12685

Signed-off-by: Nathan Cutler <ncutler@suse.com>
Signed-off-by: Tim Serong <tserong@suse.com>
2015-08-13 15:36:02 +02:00
Boris Ranto
8c53a5824a ceph.spec.in: Make SELinux opt-out, not opt-in
We should enable SELinux support by default on rpm-based systems that
build with SELinux support to get better QE coverage in future runs.

Signed-off-by: Boris Ranto <branto@redhat.com>
2015-08-05 17:55:53 +02:00
Boris Ranto
c6d6c783f4 ceph.spec.in: stop/start service on policy upgrade/removal
Signed-off-by: Boris Ranto <branto@redhat.com>
2015-08-05 15:21:47 +02:00
Boris Ranto
c52eb995e0 Add initial SELinux support
This patch modifies the build system and spec file to provide a support
for SELinux enforcing in an opt-in matter via ceph-selinux package.

Signed-off-by: Boris Ranto <branto@redhat.com>
2015-08-05 15:21:41 +02:00
Sage Weil
8a67561220 ceph.spec: install the new systemd-based udev rules from ddiss
Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-01 09:58:34 -04:00
Owen Synge
3d6100eb64 ceph.spec.in:Fixup renamed ceph-rgw.conf
This is a simple renaming bug.

Signed-off-by: Owen Synge <osynge@suse.com>
2015-08-01 09:58:34 -04:00
Owen Synge
e3e9548bba ceph.spec.in:fixup bad merge of systemd logic 2015-08-01 09:58:34 -04:00
Sage Weil
69cdfcb15f remove ceph-disk-{activate,prepare} wrappers
These ancient aliases shouldn't be used.  We should have removed them
immediately way back when, honestly.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-01 09:58:34 -04:00
Sage Weil
e034c2af43 ceph.spec: ship ceph-disk-* units
Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-01 09:58:34 -04:00
Sage Weil
ac16d83914 ceph.spec: use sysvinit rbdmap script for now
Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-01 09:58:34 -04:00
Sage Weil
d1ce1782ce ceph.spec: no rcceph[-radosgw] with systemd
Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-01 09:58:33 -04:00
Sage Weil
6842a20915 systemd: add ceph-create-keys@ service
Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-01 09:58:33 -04:00
Sage Weil
e283222d0a ceph.spec: include systemd units files
Signed-off-by: Sage Weil <sage@redhat.com>
2015-08-01 09:58:33 -04:00
Owen Synge
1ba4694d7e Autotools to install systemd unit files.
To simplify the spec file we should install as much using autotools
and as little as possible in the spec file.

Signed-off-by: Owen Synge <osynge@suse.com>
2015-08-01 09:58:33 -04:00
Owen Synge
d6213b61ab Add unit files to the spec file.
%{_unitdir}/ceph-mds@.service
%{_unitdir}/ceph-mon@.service
%{_unitdir}/ceph-osd@.service
%{_unitdir}/ceph.target

Signed-off-by: Owen Synge <osynge@suse.com>
2015-08-01 09:58:33 -04:00
Owen Synge
ef961be507 ceph.spec.in: Change redhat defaults for rgw
Changes
		--with-rgw-user=$USER \
		--with-rgw-group=$GROUP \

to
    USER=root
    GROUP=root

from
    USER=apache
    GROUP=apache

Signed-off-by: Owen Synge <osynge@suse.com>
2015-08-01 09:58:33 -04:00
Owen Synge
61240190c7 Added tmpfiles.d for rgw: templated user and group.
tmpfiles.d are part of system.d and define how temporary directories are setup.
rgw needs a socket directory. To do this we template tmpfiles.d user and group
for rgw and fill in the values using autotools.

Note1: Added to spec file.
Note2: Name changed to rgw from radosgw as is preferred name by Sage.
Note3: Adds configure options
    --with-rgw-user=UserName
    --with-rgw-group=GroupName
Note4: Defaults set for debian
Note5: spec file overrides defaults for redhat and suse

Signed-off-by: Owen Synge <osynge@suse.com>
2015-08-01 09:58:33 -04:00
Owen Synge
95db160da3 ceph.spec.in:Update rpm hooks and file content
Take rpm hooks from SUSE rpm and move upstream.
These are tested on SLE12 to include the correct files.

Signed-off-by: Owen Synge <osynge@suse.com>
2015-08-01 09:58:33 -04:00
Sage Weil
bbe84578bf remove rest-bench
This is a weak tool; users should look to cosbench or others instead.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-07-30 13:21:36 -04:00
Ken Dreyer
b8671fd176 Merge pull request #5261 from SUSE/wip-drop-py-requires
ceph.spec.in: drop SUSE-specific %py_requires macro

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-07-23 07:48:12 -06:00
Ken Dreyer
fbbed3afaa Merge pull request #5263 from SUSE/wip-apache-not-required
ceph.spec.in: remove SUSE-specific apache2-mod_fcgid dependency

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-07-23 07:46:27 -06:00
Kefu Chai
50a33dea0a package ceph-monstore-update-crush.sh
Fixes: #11815
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-17 19:15:44 +08:00
Nathan Cutler
f3f8d3660d ceph.spec.in: remove SUSE-specific apache2-mod_fcgid dependency
This package is no longer required for RGW to work in SUSE.

http://tracker.ceph.com/issues/12358 Fixes: #12358

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-07-16 16:49:42 +02:00
Nathan Cutler
cbf6c7b46b ceph.spec.in: drop SUSE-specific %py_requires macro
%py_requires expands to

BuildRequires: /usr/bin/python
PreReq: python = 2.7

The BuildRequires: is already provided, and the PreReq is wrong because
e.g. SLE11-SP3 (a platform we are trying to support) has Python 2.6.

http://tracker.ceph.com/issues/12351 Fixes: #12351

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-07-16 14:18:12 +02:00
Kefu Chai
cfc9f493f6 packaging: package libcls_cephfs.so
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-07-16 14:21:03 +08:00
Ken Dreyer
c74a2f86a1 packaging: RGW depends on /etc/mime.types
If the mimecap RPM or mime-support DEB is not installed, then the
/etc/mime.types file is not present on the system. RGW attempts to read
this file during startup, and if the file is not present, RGW logs an
error:

  ext_mime_map_init(): failed to open file=/etc/mime.types ret=-2

Make the radosgw package depend on the mailcap/mime-support packages so
that /etc/mime.types is always available on RGW systems.

http://tracker.ceph.com/issues/11864 Fixes: #11864

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-07-15 09:14:15 -06:00
Gregory Farnum
d2f3ca8377 Merge pull request #4939 from ceph/wip-offline-backward
cephfs-data-scan (offline backward file recovery)

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-07-14 11:42:48 +01:00
Ken Dreyer
50b4bdc18a ceph.spec.in: fix libs-compat / devel-compat conditional
In the RPM .spec's %files list, the "with libs-compat" conditional was
inadvertantly exended to cover the files list for ceph-devel-compat as
well.

The "with libs-compat" conditional should only cover the
"ceph-libs-compat" package, and not affect "ceph-devel-compat".

http://tracker.ceph.com/issues/12315 Fixes: #12315

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-07-13 12:23:51 -06:00
Nathan Cutler
53072b9019 ceph.spec.in: do not run fdupes, even on SLE/openSUSE
In openSUSE there is a policy to use %fdupes in the spec file if RPMLINT
complains about duplicate files wasting space in the filesystem.

However, RPMLINT is not so complaining, so drop fdupes.

http://tracker.ceph.com/issues/12301 Fixes: #12301

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-07-13 18:17:22 +02:00
John Spray
cd6ead3583 packaging: add cephfs-data-scan
Signed-off-by: John Spray <john.spray@redhat.com>
2015-07-13 14:05:17 +01:00
Nathan Cutler
8a56c48259 packaging: add find and which dependencies
The postrotate script in src/logrotate.conf uses the which and find utilities
to do its work. Although logrotate itself is only a Recommends, I think which
and find are so ubiquitous that it makes sense to have them as hard
dependencies.

Also, I checked and the package names which and findutils are the same on all
the RPM distros we are currently targeting in the spec file.

In Debian, find is also in a package called findutils while the package
containing 'which' is called debianutils.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-07-09 21:59:39 +02:00
Ken Dreyer
6861db790a Merge pull request #5187 from SUSE/wip-12261
ceph.spec.in: install 95-ceph-osd.rules, mount.ceph, and mount.fuse.c…

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-07-09 13:44:57 -06:00
Ken Dreyer
ed6670fc1d Merge pull request #5181 from SUSE/wip-snappy-devel
ceph.spec.in: snappy-devel for all supported distros

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-07-09 13:43:41 -06:00
Ken Dreyer
52e1db9bf7 Merge pull request #5180 from SUSE/wip-add-missing-specfile-bit
ceph.spec.in: add missing -%{release}

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-07-09 13:42:42 -06:00
Ken Dreyer
6a6d82d92a Merge pull request #5076 from SUSE/wip-logrotate-hard-dependency
packaging: make logrotate a hard dependency across all distros

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>

 Conflicts:
	debian/control
2015-07-09 13:40:23 -06:00
Nathan Cutler
5ce38b9536 ceph.spec.in: install 95-ceph-osd.rules, mount.ceph, and mount.fuse.ceph properly on SUSE
http://tracker.ceph.com/issues/12261 Fixes: #12261

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-07-09 21:38:46 +02:00
Ken Dreyer
bc0992f2c0 Merge pull request #5079 from SUSE/wip-12166
ceph.spec.in: use %_udevrulesdir to eliminate conditionals
2015-07-09 12:55:54 -06:00
Ken Dreyer
90708bc806 Merge pull request #5126 from SUSE/wip-12201
ceph.spec.in: /var/run/ceph fixes

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
2015-07-09 10:32:31 -06:00
Nathan Cutler
8aa758ee7a ceph.spec.in: use _udevrulesdir to eliminate conditionals
The conditionals governing where 50-rbd.rules is installed were not doing the
right thing on SUSE distros.

Start using the %_udevrulesdir RPM macro, while taking care that it is defined
and set to the right value. Use it to eliminate some conditionals around other
udev rules files as well.

http://tracker.ceph.com/issues/12166 Fixes: #12166

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-07-09 18:17:55 +02:00
Nathan Cutler
e4634ddcc1 ceph.spec.in: snappy-devel for all supported distros
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-07-09 13:28:22 +02:00
Nathan Cutler
1abaebd869 ceph.spec.in: make /var/run/ceph conditional
/var/run/ceph should only be installed on Fedora, RH/CentOS, and
all supported SUSE distros that do not have systemd (e.g. SLE11-SP3).

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-07-09 12:44:19 +02:00
Nathan Cutler
d952d59ae9 ceph.spec.in: add missing -%{release}
We have it everywhere else and I can't think of any reason why
it should be omitted here.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-07-09 12:27:17 +02:00
Boris Ranto
7db8a6a1d1 Remove git build-time dependency
The git command is currently only needed in the src/make_version script.
However, we can simply avoid it by assuming that if the git command is
not installed then the current dir is not a git repo.

Signed-off-by: Boris Ranto <branto@redhat.com>
2015-07-08 17:16:29 +02:00
Nathan Cutler
4dd1e67de5 ceph.spec.in: fix _with_systemd conditional
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-07-03 10:18:44 +02:00
Ken Dreyer
69a22b2920 Merge pull request #5094 from SUSE/wip-sharutils-dupe
ceph.spec.in: remove duplicate BuildRequires: sharutils

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-06-29 13:27:28 -06:00
branto1
0537cf241c Merge pull request #5082 from ceph/wip-fedora-babeltrace
ceph.spec.in: fix babeltrace handling on Fedora

Reviewed-by: Ira Cooper ira@samba.org
Reviewed-by: Boris Ranto branto@redhat.com
2015-06-29 16:01:33 +02:00
Nathan Cutler
c418bd9615 ceph.spec.in: remove duplicate BuildRequires: sharutils
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-06-26 20:21:59 +02:00
Nathan Cutler
39c28b9faf ceph.spec.in: fix python-flask dependency for SUSE
In SLE and openSUSE, the package is called python-Flask with an upper-case F.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-06-26 20:12:45 +02:00
Ken Dreyer
909301917e Merge pull request #5086 from SUSE/wip-12173
logrotate.conf: fixes for systemd

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-06-26 11:49:59 -06:00
Nathan Cutler
05424a803b logrotate.conf: fixes for systemd
Before this patch, the command 'logrotate -f /etc/logrotate.d/ceph'
was generating an error "Failed to reload ceph.target: Job type reload is not
applicable for unit ceph.target".

Before we issue systemctl reload, check that there is at least
one active ceph-* service. (The hyphen is significant.)

Since we use grep, make the grep package a dependency.

http://tracker.ceph.com/issues/12173 Fixes: #12173

Signed-off-by: Tim Serong <tserong@suse.com>
Signed-off-by: Lars Marowsky-Bree <lmb@suse.com>
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-06-26 19:43:44 +02:00
Nathan Cutler
23171c9529 ceph.spec.in: python-argparse only in Python 2.6
argparse is a widely-used Python module for parsing command-line arguments.
Ceph makes heavy use of Python scripts, both in the build environment and on
cluster nodes and clients.

Until Python 2.6, argparse was distributed separately from Python proper.
As of 2.7 it is part of the Python standard library.

Although the python package in a given distro may or may not Provide:
python-argparse, this cannot be relied upon.

Therefore, this commit puts appropriate conditionals around Requires:
python-argparse and BuildRequires: python-argparse. It does so for Red
Hat/CentOS and SUSE only, because the last Fedora version with Python 2.6
was Fedora 13, which is EOL.

argparse is required by both the ceph and ceph-common packages, but since ceph
requires ceph-common, the argparse Requires and BuildRequires need only appear
once, under ceph-common.

http://tracker.ceph.com/issues/12034 Fixes: #12034

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-06-26 12:46:46 +02:00
Nathan Cutler
dd212fd1d3 ceph.spec.in: clarify two important comments
First, the terms "common" and "specific" are vague. Second,
"common" can easily be confused with the ceph-common subpackage.

Fix this by rephrasing to "distro-unconditional dependencies" and
"distro-conditional dependencies", respectively.

Third, move the "distro-unconditional dependencies" header so it
is above the part where these dependencies are actually defined.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-06-25 19:55:12 +02:00
Ken Dreyer
c0ace46cc2 Merge pull request #4942 from SUSE/wip-11991
rpm: add missing Java conditionals

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-06-25 10:47:21 -06:00
Nathan Cutler
0734cd1ec3 packaging: make logrotate a hard dependency across all distros
Given ceph's reputation for voluminous logs, it makes sense for
logrotate to be a hard dependency for all distros.

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-06-25 16:55:10 +02:00
Ken Dreyer
f3e4a91c45 ceph.spec.in: rm reference to EOL Fedoras (< 20)
Fedora 19 is EOL, so there's no need to refer to Fedoras less than 20.
"%{fedora}" effectively implies "Fedora 20 and above".

Reported-by: Ira Cooper <ira@samba.org>
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-06-24 16:43:53 -06:00
Ken Dreyer
2db9480fa2 ceph.spec.in: package rbd-replay-prep on all Fedoras
This reverts the change in commit
85517d611b. Since we BuildRequire:
libbabeltrace-devel, autoconf will see that babeltrace is available
during the build, and make will build/install the rbd-replay-prep
utility.

This change also simplifies Fedora selection logic, because Fedora 19 is
EOL, so "%{fedora}" implies "Fedora 20 and above".

Reported-by: Ira Cooper <ira@samba.org>
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-06-24 16:43:30 -06:00
Ken Dreyer
b5e5778b20 Merge pull request #4981 from ceph/wip-fedora-build-fixes
Fix various issues with fedora (f21+) builds

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-06-24 14:04:16 -06:00
Owen Synge
43c1784640 ceph.spec.in:BuildRequires sharutils
The uudecode binary is used to build Java-related components, and
uudecode is provided by the sharutils package on all supported
RPM platforms. When building with "--without=cephfs_java",
sharutils is not needed.

Thanks to Nathan Cutler <ncutler@suse.cz> for going into the
details with me.

On OBS without this patch we get the error message:

[  170s] -----------------------------------------------------------------
[  170s] ----- building ceph.spec (user abuild)
[  170s] -----------------------------------------------------------------
[  170s] -----------------------------------------------------------------
[  170s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --nosignature --define 'disturl obs://build.opensuse.org/home:osynge:ceph:wip:wip_obs_fedora/Fedora_20/c0bbbc1e62228ca956ac3d367edc4fba-master' /home/abuild/rpmbuild/SOURCES/ceph.spec
[  170s] error: Failed build dependencies:
[  170s]    sharutils is needed by ceph-1:2+git.1435043747.c1bd02c-1.1.x86_64

With this patch we can build fedora 22 and fedora 20 rpms fine.

Signed-off-by: Owen Synge <osynge@suse.com>
2015-06-24 12:50:11 +02:00
branto1
02ef5cf9b3 Merge pull request #4918 from SUSE/wip_ceph_spec_directories_not_owned_by_a_package
ceph.spec.in: fix:Add missing directories breaking suse rpm build

Reviewed-by: Boris Ranto <branto@redhat.com>
2015-06-19 11:54:29 +02:00
Owen Synge
f1ff3e4dcb ceph.spec.in: fix:Add missing directories breaking build
SUSE builds on OBS are failing with the missing dir entries:

    /usr/share/ceph
    /usr/lib/ceph

On suse these correspond to:

    %dir %{_datarootdir}/ceph/
    %dir %{_libexecdir}/ceph/

Signed-off-by: Owen Synge <osynge@suse.com>
2015-06-19 11:22:19 +02:00
Boris Ranto
85517d611b ceph.spec.in: rbd-replay-prep is not being built on f21+
Signed-off-by: Boris Ranto <branto@redhat.com>
2015-06-18 20:04:57 +02:00
Boris Ranto
15e9e3d497 ceph.spec.in: Require git distro-wide
Git is not a SUSE-only dependency, the build process itself requires it.

Signed-off-by: Boris Ranto <branto@redhat.com>
2015-06-18 20:00:09 +02:00
Gregory Farnum
459369e700 Merge pull request #4931 from yuyuyu101/wip-perf-msgr
PerfMsgr: A tool to benchmark messenger module

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-06-18 11:09:56 +01:00
branto1
c7da8b29b0 Merge pull request #4920 from SUSE/wip_ceph_spec_mandir
The file lists in spec files do expect that man pages are built so we better explicitly state that intention in spec file.
2015-06-17 16:16:26 +02:00
Owen Synge
5e756ed371 ceph_spec buildep python sphinx for fedora
Fedora, suse as well as centos >= 7 and rhel >= 7
use the same name for python-sphinx so add these
conditionals.

Note: Until OBS supports EPEL I cant test builds on
centos and rhel so this extention of build deps is
untested by Owen Synge.

Signed-off-by: Owen Synge <osynge@suse.com>
2015-06-17 15:40:17 +02:00
Owen Synge
26eba36f4e Bug fix for man file packaging.
Always compile and install man pages when making rpm.

Signed-off-by: Owen Synge <osynge@suse.com>
2015-06-16 22:38:02 +02:00
Owen Synge
18ba022617 Bug fix for man file packaging.
explicitly included man pages.

Original fix used %{_mandir}/*/* but this could potentially lead to ambiguity
as ceph rpm spec file contains many man pages for different packages.

Signed-off-by: Owen Synge <osynge@suse.com>
2015-06-16 17:49:38 +02:00
Nathan Cutler
04e91bbd92 rpm: add missing Java conditionals
http://tracker.ceph.com/issues/11991 Fixes: #11991

Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-06-12 17:50:58 +02:00
Haomai Wang
97ff79d518 debian, rpm: Add ceph_perf_msgr_* to build file
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-06-12 00:27:31 +08:00
Loic Dachary
bfb92bd14b Merge pull request #4879 from SUSE/wip-master-specfile-cleanup
ceph.spec.in: remove duplicate BuildRequires

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-06-09 07:32:17 +02:00
Nathan Cutler
21f9e1f66c ceph.spec.in: remove duplicate BuildRequires
Signed-off-by: Nathan Cutler <ncutler@suse.com>
2015-06-08 20:11:15 +02:00
Ken Dreyer
142a6ce711 Merge pull request #4880 from SUSE/wip-master-specfile-cleanup2
ceph.spec.in: move specific BuildRequires to where they belong

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-06-08 10:27:44 -06:00
Nathan Cutler
e1cb7e5104 ceph.spec.in: move specific BuildRequires to where they belong
Move distro-specific BuildRequires out of "common" section and
into the appropriate %if statement in the "specific" section.
Also remove a duplicated "Requires: gdisk".

Signed-off-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-06-06 14:14:50 +02:00
Loic Dachary
34e4dd9c8a ceph.spec.in: add missing BuildRequires from SUSE block
The %endif removed by f94f23297c is restored.
The %else removed by 75e87a20da is restored.
The stray %endif added by d8abde3338 is removed.

May 29th, in d8abde3338 Owen added a stray
%endif after

   BuildRequires: gperftools-devel

around line 133. June 3rd, in f94f23297c
Ken correctly attributed the error

     "error: /srv/autobuild-ceph/gitbuilder.git/build/ceph.spec:140: Got a
      %endif with no %if"

to a stray %endif but did not remove the one causing problem and in
doing so created another problem. June 4th, in
75e87a20da Owen incorrectly fixed
this new problem by removing the %else that is near

   BuildRequires: gperftools-devel

around line 116, instead of reverting
f94f23297c. As a consequence the
ceph.spec.in became syntactically correct but implemented an if/else
logic different from what was intended originally and a number of
BuildRequires became exclusive to SUSE and were not installed for CentOS
7 etc.

http://tracker.ceph.com/issues/11901 Fixes: #11901

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-06-06 12:05:19 +02:00
Owen Synge
75e87a20da ceph.spec.in: remove extra %else statement
Remove extra conditional.

Signed-off-by: Owen Synge <osynge@suse.com>
2015-06-04 10:11:34 +02:00
Ken Dreyer
0eabf27e5b Revert "ceph.spec.in:ownership of dirs extension"
This reverts commit 6f495974a8.

This needs more discussion, since "make install" does not currently
create /usr/lib/ceph (and maybe /usr/share/ceph?)

This fixes the rpmbuild failure,

  error: File not found:
  /srv/autobuild-ceph/gitbuilder.git/build/rpmbuild/BUILDROOT/ceph-9.0.0-1225.ga16afdd.el6.x86_64/usr/lib/ceph

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-06-03 17:48:12 -06:00
Ken Dreyer
f94f23297c ceph.spec.in: rm stray %endif
Commit d8abde3338 introduced a stray
%endif. Remove it.

This fixes the build error:

  "error: /srv/autobuild-ceph/gitbuilder.git/build/ceph.spec:140: Got a
  %endif with no %if"

Reported-by: Greg Farnum <gfarnum@redhat.com>
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-06-03 17:40:58 -06:00
Ken Dreyer
5feb806905 Merge pull request #4793 from SUSE/wip_ceph_spec_directories_not_owned_by_a_package
ceph.spec.in:ownership of dirs extension

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-06-03 16:28:01 -06:00
Ken Dreyer
7d5a8f74fb Merge pull request #4821 from SUSE/wip_libcephfs_jni_postun
ceph.spec.in libcephfs_jni1 has no %post and %postun

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-06-03 16:24:39 -06:00
Owen Synge
c6c3a3bca2 Add rpm conditionals : libs_compat
Extracted conditionals from SUSE rpm spec file to forward port.
Original work done by Thorsten Behrens <tbehrens@suse.com>

Signed-off-by: Owen Synge <osynge@suse.com>
2015-06-03 15:57:39 +02:00
Owen Synge
d8abde3338 Add rpm conditionals : tcmalloc
Extracted conditionals from SUSE rpm spec file to forward port.
Original work done by Thorsten Behrens <tbehrens@suse.com>

Signed-off-by: Owen Synge <osynge@suse.com>
2015-06-03 15:57:16 +02:00
Owen Synge
5747ea1910 Add rpm conditionals : tests
Extracted conditionals from SUSE rpm spec file to forward port.
Original work done by Thorsten Behrens <tbehrens@suse.com>

Signed-off-by: Owen Synge <osynge@suse.com>
2015-06-03 15:55:14 +02:00
Owen Synge
c65538f489 Add rpm conditionals : cephfs_java
Extracted conditionals from SUSE rpm spec file to forward port.
Original work done by Thorsten Behrens <tbehrens@suse.com>

Signed-off-by: Owen Synge <osynge@suse.com>
2015-06-03 15:55:00 +02:00
David Zafman
17f73fafc4 Merge pull request #4816 from dachary/wip-11624-cephtools-test
tests: cephtool/test.sh wait_for_clean after PG (re)mapping 

Reviewed-by: David Zafman <dzafman@redhat.com>
2015-06-02 17:28:37 -07:00
Ken Dreyer
a1de1fc20e Merge pull request #4729 from SUSE/wip_suse_builddeps_and_deps
ceph.spec.in: Forward port suse build deps and recomends
2015-06-01 10:12:00 -06:00
Owen Synge
042e8ff4dc ceph.spec.in summary-ended-with-dot
RPM spec files summary should not end with a dot.
This was inconsistent across the ceph rpm packages
and creates errors with rpm lint.

Signed-off-by: Owen Synge <osynge@suse.com>
2015-06-01 15:57:03 +02:00
Owen Synge
0742d82b55 ceph.spec.in libcephfs_jni1 has no %post and %postun
/usr/lib64/libcephfs_jni.so.1.0.0 requires /sbin/ldconfig to be
run after installing and after removing.

Signed-off-by: Owen Synge <osynge@suse.com>
2015-06-01 14:58:31 +02:00
Loic Dachary
d2cc2b184b tests: use get_pg from ceph-helpers.sh
The semantic and interface of get_pg are the same, that avoids
duplication and the ceph-helpers.sh version is tested and documented.

Make the ceph-test package dependent on xmlstarlet because it is
needed by ceph-helpers.sh.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-06-01 01:11:28 +02:00
Owen Synge
6f495974a8 ceph.spec.in:ownership of dirs extension
rpm lint says the following directories

/usr/share/ceph
/usr/lib/ceph

are un owned by any package and this causes
OBS to emit errors.

Signed-off-by: Owen Synge <osynge@suse.com>
2015-05-29 09:06:42 +02:00
Owen Synge
a319976700 Forward port suse build deps and recomends
SUSE spec file got very out of sync with upstream master. This patch
helps resolve the build dependencies from suse ceph.

Signed-off-by: Owen Synge <osynge@suse.com>
2015-05-28 11:01:21 +02:00
Sage Weil
91d8251569 Merge pull request #4547 from yuyuyu101/wip-perf
Perf: used to perf local hardware capacity

Reviewed-by: Kefu Chai <kchai@redhat.com>
2015-05-27 15:26:13 -07:00
Sage Weil
c6f62f518f Merge remote-tracking branch 'gh/next' 2015-05-27 17:25:28 -04:00
Haomai Wang
f814298008 packaging: include ceph_perf_local
Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
2015-05-27 12:51:50 +08:00
Sage Weil
5a216b1470 Merge pull request #4768 from SUSE/wip-systemd_autotools_template_systemd_ceph_osd
Template systemd/ceph-osd@.service with autotools,

Reviewed-by: Sage Weil <sage@redhat.com>
2015-05-26 15:37:20 -07:00
Owen Synge
ac347dc340 Template systemd/ceph-osd@.service with autotools,
The libexec path is different for different distributions.
systemd. This path is defined by a new variable on the
configure path.

This variable can be set with enviroment SYSTEMD_LIBEXEC_DIR.
The parameter --with-systemd-libexec-dir overrides the enviroment
variable.

Appropriate conditionals are set for SUSE and RHEL derivatives.

This is then used to template out systemd/ceph-osd@.service

Signed-off-by: Owen Synge <osynge@suse.com>
2015-05-26 19:04:22 +02:00
Ken Dreyer
ad3b3041ec Merge pull request #4682 from SUSE/wip-11629-next
ceph.spec.in: SUSE/openSUSE builds need libbz2-devel

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-05-15 14:40:08 -06:00
Nathan Cutler
584ed2e28b ceph.spec.in: SUSE/openSUSE builds need libbz2-devel
http://tracker.ceph.com/issues/11629 Fixes: #11629

Signed-off-by: Nathan Cutler <ncutler@suse.cz>
2015-05-15 22:35:01 +02:00
Nathan Cutler
363d957d8f ceph.spec.in: tweak ceph-common for SUSE/openSUSE
ceph-common needs python-argparse in SUSE/openSUSE and
needs redhat-lsb-core only in RHEL/CentOS/Fedora.

http://tracker.ceph.com/issues/11638 Fixes: #11638

Signed-off-by: Nathan Cutler <ncutler@suse.cz>
2015-05-15 21:43:34 +02:00
Nathan Cutler
46404dd381 ceph.spec.in: consolidate centos/rhel macros
0%{?rhel} || 0%{?centos} can be simplified to just 0%{?rhel}, since
CentOS defines that macro for compatibility with RHEL.

Signed-off-by: Nathan Cutler <ncutler@suse.cz>
2015-05-15 21:39:39 +02:00
Sage Weil
9d8c115b0a init-radosgw.sysv: remove
Signed-off-by: Sage Weil <sage@redhat.com>
2015-05-14 09:51:14 -07:00
Ken Dreyer
f9d66a816b Merge pull request #4666 from SUSE/wip-11610-next
ceph.spec.in: include SUSE in _with_systemd

Reviewed-by: Loic Dachary <ldachary@redhat.com>
Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
2015-05-13 10:06:11 -06:00
Nathan Cutler
61303656fa ceph.spec.in: include SUSE in _with_systemd
The master specfile newly defines a _with_systemd variable that should be true
for the set of distros that are using systemd. Since this set of distros
includes SUSE/openSUSE (at least for the more recent versions where ceph is
supported), this commit sets _with_systemdto true on SUSE/openSUSE.

http://tracker.ceph.com/issues/11610 Fixes: #11610

Signed-off-by: Nathan Cutler <ncutler@suse.cz>
2015-05-13 15:32:38 +02:00
Loic Dachary
44d6429a5d Merge pull request #4412 from tchaikov/wip-add-man-page
doc: add man page for ceph-create-keys

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-05-12 16:03:07 +02:00
Travis Rhoden
bf93128f66 packaging: Add rgw placeholder dirs in proper packages
Automatically create /var/lib/ceph/radosgw with the
ceph-radosgw package, and /var/lib/ceph/bootstrap-rgw
via the ceph package.

Signed-off-by: Travis Rhoden <trhoden@redhat.com>
2015-05-08 14:02:43 -04:00
Loic Dachary
0c715f6971 Merge pull request #4532 from dachary/wip-init-system-detection
ceph-detect-init helper and associated tests

Reviewed-by: Ken Dreyer <kdreyer@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-05-07 22:21:26 +02:00
Loic Dachary
8f23382064 Merge pull request #4353 from ceph/wip-11376-packaging-objstore-tool
#11376: packaging: mv ceph-objectstore-tool to main ceph pkg

Reviewed-by: Sage Weil <sage@redhat.com>
2015-05-06 11:04:24 +02:00
Loic Dachary
b4a441a0ed ceph-detect-init: package for rpm and debian
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-05-06 01:54:36 +02:00
Ken Dreyer
61cf5da0b5 packaging: mv ceph-objectstore-tool to main ceph pkg
This change ensures that the ceph-objectstore-tool utility is present on
all OSDs.  This makes it easier for users to run this tool to do manual
debugging/recovery in some scenarios.

http://tracker.ceph.com/issues/11376 Refs: #11376

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-04-30 15:53:22 -06:00
Tim Serong
70292658d5 packaging: move SuSEfirewall2 templates out of src
Better to have static config like this that needs to be installed in
/etc in a separate subdirectory of the project.

Signed-off-by: Tim Serong <tserong@suse.com>
2015-04-30 12:04:14 +10:00
Tim Serong
77685f5b78 packaging: add SuSEfirewall2 service files
This adds SuSEfirewall2 service files for Ceph MON, OSD and MDS, for use
on SLES and openSUSE.  The MON template opens port 6789 and the OSD/MDS
template opens the range 6800-7300 as per
http://ceph.com/docs/master/rados/configuration/network-config-ref/

Signed-off-by: Tim Serong <tserong@suse.com>
2015-04-29 13:21:54 +10:00
Kefu Chai
27cee2f1f4 doc: add ceph-create-keys.8
Fixes: #10725
Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-04-22 21:35:01 +08:00
Sage Weil
47a11ff6d5 Merge pull request #3481 from ktdreyer/wip-rpm-rm-old-fedoras
ceph.spec.in: remove reference to EOL Fedoras
2015-04-14 13:49:05 -07:00
Ken Dreyer
aa88364f30 ceph.spec.in: set _with_systemd on RHEL 7 and Fedora
Commit 71a5090bca added a "_with_systemd"
conditional to the RPMs, but I erred with the version comparison
operator, so this only applied to RHEL 8+, not RHEL 7+.

Adjust the conditional so that it will really apply to RHEL 7+. While
we're here, add Fedora as well.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Reported-by: Boris Ranto <branto@redhat.com>
2015-04-09 11:15:41 -06:00
Loic Dachary
21b93775d6 spec.in: sphinx -b man needs sphinx > 1.0 (part 2)
Instead of listing the operating system versions that do not require the
python-sphinx10 package, switch to listing the operating system versions that
require the python-sphinx10 package. It's easier to maintain because
there only are a few.

Signed-off-by: Loic Dachary <ldachary@rehdat.com>
2015-04-07 12:09:03 +02:00
Loic Dachary
a8eab36cb0 spec.in: sphinx -b man needs sphinx > 1.0
It is used to build the man pages.

Signed-off-by: Loic Dachary <ldachary@rehdat.com>
2015-04-03 02:59:58 +02:00
Loic Dachary
18c34f2133 Merge pull request #4142 from ceph/wip-no-more-dot-8
doc: generate man pages in man/Makefile

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-04-02 17:42:23 +02:00
Loic Dachary
e33951342d Merge pull request #4068 from dachary/wip-opensuse
tests: add OpenSUSE 13.2 dockerfile

Reviewed-by: Owen Synge <osynge@suse.com>
2015-04-02 11:32:09 +02:00
Ken Dreyer
c5cf81dd91 ceph.spec.in: fix _with_systemd conditional
The RPM conditional needs a "?" in the event that it is not defined.
2015-03-25 12:16:03 -06:00
Danny Al-Gaaf
24aeb78bb0 Merge pull request #3916 from ceph/wip-rpm-no-ghost-socket-dir
ceph.spec.in: fix handling of /var/run/ceph

Reviewed-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2015-03-25 17:27:14 +01:00
Loic Dachary
bdac3dc3fb ceph.spec: update OpenSUSE BuildRequires
OpenSUSE 13.2 needs libsnappy-devel but not bzip2-devel.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-03-24 14:11:43 +01:00
Kefu Chai
301fe6cbf2 doc: generate man pages in man/Makefile
* move rst files from doc/man/8 into man/8
* extract man_pages setting for sphinx from doc/conf.py to man/conf.py
* generate all man pages in `make install`
* add python-sphinx to Build-Depends
* check for sphinx-build in `configure`
* run changed rst files through sphinx-build in `make check`

Signed-off-by: Kefu Chai <kchai@redhat.com>
2015-03-24 12:36:41 +08:00
Ken Dreyer
71a5090bca ceph.spec.in: fix handling of /var/run/ceph
Prior to this commit, we didn't install /var/run/ceph as a normal
directory. We used the %ghost directive and created the directory with
a "mkdir" command in %post.

This was lacking in several ways:

  1) Simplicy: there is no need to use %ghost; other packages (eg.
     mariadb) simply use a normal %dir for their socket directory.

  2) RPM does not have control over the permissions of the /var/run/ceph
     directory. This does not interact well with "rpm -V". Moreover,
     once Ceph itself gets unprivileged user support, RPM itself won't
     be able to set the permissions of the directory for a (future)
     unprivileged UID.

  3) On distributions that use systemd as an init system, /var/run is a
     symlink to /run, which is tmpfs. This means that /var/run/ceph does
     not persist across reboots on those systems.

Remove the %ghost directive; it makes more sense for RPM to simply
install this directory like the rest of the %files.

Add a "_with_systemd" conditional so we know which distros use systemd
as their init system.  Add the /etc/tmpfiles.d/ceph.conf file on those
distros. See
http://www.freedesktop.org/software/systemd/man/tmpfiles.d.html

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-03-17 12:28:28 -06:00
Ken Dreyer
353a325896 ceph.spec.in: rm EOL Fedoras; add OBS RHEL5 instead
Fedora 12 has been EOL for a long time. Remove the reference in the
RPM .spec file.

Since RHEL 5 support for Ceph is a work in progress, we won't remove
this entire python_sitelib / python_sitearch conditional for now, since
those are still needed on RHEL 5.

Add the rhel_version macro to make the conditional compatible with
SUSE's OBS.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-03-16 10:02:57 -06:00
Ken Dreyer
338b44bc74 packaging: include ceph_perf_objectstore
The /usr/bin/ceph_perf_objectstore file is installed by default. Prior
to this commit it was missing from the packaging. This caused the RPM to
fail to build in mock.

Add ceph_perf_objectstore to the "ceph-test" RPM and Debian package.

If we end up developing further ceph_perf_* utilities, it would make
sense to glob them all with a wildcard, similar to what we are doing
with all the ceph_test_* utilities in ceph-test.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-03-13 16:14:51 -06:00
John Spray
c3ef6409b2 ceph.in: add 'daemonperf' command
This is inspired by dstat and scripts/perf-watch.py, to
give a convenient live view of an interesting subset
of the performance counters from a Ceph daemon.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-03-05 20:17:35 +00:00
Ken Dreyer
924f85f157 ceph.spec.in: loosen ceph-test's dependencies
In Debian, the ceph-test package can be installed with any version of
ceph-common.

Prior to this commit, in RHEL, we're much more strict about which
version of the dependencies we require. We depend directly on
librados2/librbd1/libcephfs1 instead of ceph-common, and we also require
the specific versions of these libraries to match the version of
ceph-test.

For testing Ceph, it is nice to have the ability to upgrade the
librados2/librbd1/libcephfs1 libraries on a host without having to also
upgrade the ceph-test package as well.

Remove the version number requirements, and change the dependencies from
librados2/librbd1/libcephfs1 to simply "ceph-common". That will make
/etc/ceph/ and /var/log/ceph present for the tests.

http://tracker.ceph.com/issues/10989 Refs: #10989

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-03-04 15:18:13 -07:00
Ken Dreyer
f3ad61a674 packaging: move rbd udev rules to ceph-common
We should ship the RBD udev rules in the same package that ships
/usr/bin/rbd.  This package happens to be ceph-common, so move the udev
rules there.

The udev rules rely on the ceph-rbdnamer utility, so move that utility
and its man page as well.

http://tracker.ceph.com/issues/10864 Refs: #10864

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-02-25 17:43:01 -08:00
Boris Ranto
d1c82ea9f4 ceph.spec: specify version
Signed-off-by: Boris Ranto <branto@redhat.com>
2015-02-24 18:30:18 -08:00
Boris Ranto
39982b10ad Split python-ceph to appropriate python-* packages
python-ceph contains various header files/bindings for serveral
libraries, this patch creates *-devel packages for all the
libraries separately and provides the compatibility layer for
the split.

Signed-off-by: Boris Ranto <branto@redhat.com>
2015-02-24 12:50:27 -08:00
Boris Ranto
c341c52984 ceph.spec: split ceph-devel to appropriate *-devel packages
ceph-devel contains various header files/bindings for several
libraries, this patch creates *-devel packages for all the libraries
separately and provides the compatibility layer for the split.

http://tracker.ceph.com/issues/10884 Refs: #10884

Signed-off-by: Boris Ranto <branto@redhat.com>

Amended by Ken Dreyer <kdreyer@redhat.com> to add version numbers to the
Obsoletes, add Obsoletes to the libradosstriper1-devel and
libcephfs_jni1-devel subpackages, adjust the librados documentation, and
add the Redmine issue number to this commit log.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-02-16 16:21:42 -07:00
Loic Dachary
3c05c9c829 tests: no need for python-flask at build time
http://tracker.ceph.com/issues/10845 Refs: #10845

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-02-12 00:55:49 +01:00
Sage Weil
f65cb09e17 Merge pull request #3092 from abartlet/ceph-dmcrypt-plain
Ceph dmcrypt with LUKS (split into 4 patches)

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2015-02-11 09:21:53 -08:00
Loic Dachary
4f36eaee9e ceph.spec.in: junit always except for EPEL 6
The package was renamed a long time ago (around the Fedora 15
timeframe). The "junit4" name is only relevant for EPEL 6. For EPEL 7
and Fedora 20, the "junit" package has "Provides: junit4". And most
recently, in the junit package that ships in Fedora 21 and 22, the
package maintainer dropped the old Provides: line.

http://tracker.ceph.com/issues/10728 Fixes: #10728

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
Signed-off-by: Loic Dachary <ldachary@redhat.com>
2015-02-11 00:02:28 +01:00
Yehuda Sadeh
e6c2c82306 Merge pull request #3476 from ktdreyer/wip-rpm-radosgw-logrotate
ceph.spec.in: move rgw logrotate to rgw subpackage

Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2015-01-30 09:11:36 -08:00
Andrew Bartlett
2113524b9d Add tests for ceph dmcrypt encryption
Signed-off-by: Andrew Bartlett <abartlet@catalyst.net.nz>
2015-01-30 14:34:42 +13:00
Andrew Bartlett
6a45b8ed04 add all possible ceph-disk run-time requirements to build time deps
There really should be a better way than this to ensure the right things are installed for make check.

The existing list in ceph.spec.in has been re-sorted, just as the debian/control is

Andrew Bartlett
2015-01-30 14:34:09 +13:00
Ken Dreyer
9b220bddea ceph.spec.in: use wildcards to capture man pages
Use wildcard to capture gzipped man pages for ceph-clsinfo(8) and
librados-config(8). In addition to future-proofing us against
possible compression type changes down the road, this also aligns us
with the existing convention that's used to capture the rest of the man
page files.
2015-01-23 15:08:34 -07:00
Ken Dreyer
9edd0a5334 ceph.spec.in: move rgw logrotate to rgw subpackage
Prior to this commit, the radosgw logrotate config was in the main
"ceph" package. This meant that if a user had installed "ceph", but not
"ceph-radosgw", they would end up with a logrotate configuration that
was unnecessary.

Only install the logrotate configuration file if the user has installed
ceph-radosgw.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-01-23 09:37:56 -07:00
Ken Dreyer
fff3cf91de ceph.spec.in: capitalization and punctuation
Ensure that each sub-package's %description starts with a capital letter
and ends with a dot.

rpmlint has a rule that checks the Summary field, but not %description
(yet).

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2015-01-22 16:45:28 -07:00
Gregory Farnum
2a4cbfcca6 Merge pull request #3335 from ceph/wip-cephfs-tabletool
Create cephfs-table-tool

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
2015-01-15 21:58:17 -08:00
John Spray
2f3160636b tools: create cephfs-table-tool
It was unnatural to shoehorn resetting tables
into the journaltool.  This new tool initially
can simply dump or reset the session/snap/ino
tables, and would also be a place for any
more complex operations in future.

Signed-off-by: John Spray <john.spray@redhat.com>
2015-01-16 00:45:25 +00:00
Sage Weil
f4ff12aebc drop ceph_mon_store_converter
This was needed for upgrades in the cuttlefish era; no longer useful.

Signed-off-by: Sage Weil <sage@redhat.com>
2015-01-12 09:37:08 -08:00
Loic Dachary
bb921a8014 packages: add python-virtualenv and xmlstarlet
python-virtualenv is required to run make check and xmlstarlet is useful
to develop shell base tests using ceph --format xml osd dump.

Signed-off-by: Loic Dachary <ldachary@redhat.com>
2014-12-22 00:22:44 +01:00
Loic Dachary
8547d9baae Merge pull request #3207 from ceph/wip-cot-rename
ceph_objectstore_tool: Rename generated binary to ceph-objectstore-tool

Reviewed-by: Loic Dachary <ldachary@redhat.com>
2014-12-19 01:12:10 +01:00
Nilamdyuti Goswami
2b577cef00 packaging: package ceph-deploy(8)
Fixes merge conflict.

Signed-off-by: Nilamdyuti Goswami <ngoswami@redhat.com>
2014-12-18 14:32:05 +05:30
David Zafman
4f72ba545e ceph_objectstore_tool: Rename generated binary to ceph-objectstore-tool
Signed-off-by: David Zafman <dzafman@redhat.com>
2014-12-17 17:09:09 -08:00
Ken Dreyer
69fa5329ce ceph.spec.in: quote %files macro in comment
Prior to this commit, RPM would expand the %files macro that was present
in the comment.

Use a double percent sign to quote the macro so that RPM will not expand
it.

This fixes an rpmlint warning, "W: macro-in-comment %files"

More information from rpmlint's "-I" (help) command:

  $ rpmlint -I macro-in-comment
  macro-in-comment:
  There is a unescaped macro after a shell style comment in the
  specfile.  Macros are expanded everywhere, so check if it can cause a
  problem in this case and escape the macro with another leading % if
  appropriate.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2014-12-17 13:06:58 -07:00
Ken Dreyer
b743a95111 packaging: package ceph-disk(8)
The ceph-disk man page was added in
a450cab2b8, but this was not added to the
RPM or DEB packaging. Add it here.

Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2014-12-02 16:13:19 -07:00
Ken Dreyer
6a98dacde1 rpm: unconditionally package rbd-replay-prep(8)
The build system will conditionally build and install the
rbd-replay-prep utility based on the presence of lttng.

Commit 230c5b8e7f adjusted the RPM
packaging so that we only package and ship the rbd-replay-prep utility
and its man page when we're on a platform that has lttng.

The problem is that this is only half-correct. The build system
unconditionally installs the man page for rbd-replay-prep, regardless of
whether lttng was present or absent, and (by extension,) without regard
for whether we've built and installed the rbd-replay-prep binary or not.

We have two options: either the build system should be adjusted to
conditionally skip installing rbd-replay-prep(8), or else we should just
adjust the RPM packaging to always ship the man page. This commit does
the latter.

Backport: firefly
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
2014-11-26 17:01:17 -07:00
Sage Weil
b889b6b5bf remove ceph_dupstore
This is broken and useless.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-27 16:58:00 -07:00
Loic Dachary
5ff4a850a0 rpm: 95-ceph-osd-alt.rules is not needed for centos7 / rhel7
The || instead of && had it always installed. That was fixed in EPEL
already.

http://tracker.ceph.com/issues/9747 Fixes: #9747

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-10-11 18:20:36 +02:00
Sage Weil
1036e9827c Merge remote-tracking branch 'gh/giant'
Conflicts:
	src/osdc/Objecter.cc
2014-10-07 12:40:45 -07:00
Sage Weil
6b9e20ac8d ceph.spec: make ceph -> python-ceph dependency specify version
It does this indirectly via ceph -> ceph-common -> python-ceph, but do so
here too for clarity/consistency.

Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-06 09:15:29 -07:00
Sage Weil
38dde3d3e2 Merge remote-tracking branch 'gh/giant' 2014-10-03 17:56:31 -07:00
Sage Weil
da9ae5c92e ceph.spec: fix typo
Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-01 12:33:38 -07:00
Sage Weil
8388836208 ceph.spec.: add epoch
This is done in fedora packaging.  Do it here too so that you can move
between upstream packages (from ceph.com) and fedora and other derivatives
will builds.

Backport: firefly, dumpling
Signed-off-by: Sage Weil <sage@redhat.com>
2014-10-01 06:02:02 -07:00
Sage Weil
8cda623e0b ceph.spec.in: move ceph_rest_api.py into ceph
Signed-off-by: Sage Weil <sage@redhat.com>
2014-09-29 14:24:01 -07:00
Sage Weil
b2416240b8 ceph.spec: fix python-flask dependency
This is needed by ceph-rest-api, which is in ceph.rpm; it's not related to
python-ceph (except that ceph-rest-api happens to require that too).

Backport: firefly
Signed-off-by: Sage Weil <sage@redhat.com>
2014-09-29 13:44:03 -07:00
Adam Crume
675a6a6704 rbd-replay: Add rbd-replay-many
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-09-11 16:48:03 -07:00
Loic Dachary
e9b09e8cc1 packaging: add all erasure code plugins to RPM packages
It means distributing a few plugins that are only used for unit testing
but it does not use much disk space and this is otherwise harmless.

Explicitly listing which plugins are to be installed is problematic
because some of them (isa for now and maybe more later) are not
available for all architectures. Properly maintaining the list of
plugins to install would therefore mean exactly matching which
architecture has which plugins.

http://tracker.ceph.com/issues/9381 Fixes: #9381

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
2014-09-09 17:05:56 +02:00
Samuel Just
038992b1da Merge pull request #2332 from ceph/wip-8231-forreview
Wip 8231 forreview

Reviewed-by: Samuel Just <sam.just@inktank.com>
2014-08-28 16:37:37 -07:00
David Zafman
83fbc91e5c Complete replacement of ceph_filestore_tool and ceph_filestore_dump
with unified ceph_objectstore_tool

Move list-lost-objects and fix-lost-objects features from
  ceph_filestore_tool to ceph_objectstore_tool as list-lost, fix-lost
Change --type to --op for info, log, export...operations
Add --type for the ObjectStore type (defaults to filestore)
Change --filestore-path to --data-path
Update installation, Makefile.am, and .gitignore
Fix and rename test case to match
  Add some additional invalid option checks

Signed-off-by: David Zafman <david.zafman@inktank.com>
2014-08-28 16:22:15 -07:00
Dan Mick
7474f720c2 ceph.spec.in: tests for rhel or centos need to not include _version
rhel_version and centos_version are apparently the OpenSUSE Build
names; the native macros are just "rhel" and "centos" (and contain
a version number, should it be necessary).

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2014-08-27 12:56:08 -07:00
Dan Mick
e37b262c79 ceph.spec.in: Add a small comment on the empty %files section
as suggested by Dan Mick.

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
2014-08-27 12:56:08 -07:00
Dan Mick
875a99e25f ceph.spec.in: Obsolete all older versions.
Now this changeset can be used on all current ceph releases that already
have the package split.

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
2014-08-27 12:56:08 -07:00
Dan Mick
8f95daf66b ceph.spec.in: No version on ceph-libs Obsoletes.
If we are installing with the new package structure we don't ever want the
new package to co-exist with the old one; this includes the mistakenly-
released v0.81 on Fedora, which should be removed in favor of this
version.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2014-08-27 12:56:07 -07:00
Sandon Van Ness
75985024bd ceph.spec.in: Obselete ceph-libcephfs (not libcephfs)
I am guessing that because it was a sub-package libcephfs was mistakenly
used instead of ceph-libcephfs.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2014-08-27 12:56:07 -07:00
Erik Logtenberg
00877ae502 ceph.spec.in: We need those nice recent changes for rhel7 in Fedora too.
Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
2014-08-27 12:56:07 -07:00
Erik Logtenberg
461523b06c ceph.spec.in, init-ceph.in: Don't autostart ceph service on Fedora.
This patch is taken from the current Fedora package and makes the upstream
ceph.spec compliant with Fedora policy. The goal is to be fully compliant
upstream so that we can replace current Fedora package with upstream
package to fix many bugs in Fedora.

Addition from Dan Mick <dan.mick@inktank.com>:
Do this for RHEL and Centos as well, since they surely will benefit
from the same policy.   Note: this requires changes to
autobuild-ceph and ceph-build scripts, which currently copy
only the dist tarball to the rpmbuild/SOURCES dir.

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
Signed-off-by: Dan Mick <dan.mick@inktank.com>:
2014-08-27 12:56:07 -07:00
Erik Logtenberg
e9da2d8f21 ceph.spec.in: Add obsoletes for libcephfs
This fixes a bug for Fedora:
https://bugzilla.redhat.com/show_bug.cgi?id=1116614

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
2014-08-27 12:56:07 -07:00
Erik Logtenberg
6c264f2204 ceph.spec.in: add ceph-libs-compat
Added a ceph-libs-compat package in accordance with Fedora packaging
guidelines [1], to handle the recent package split more gracefully.
In Fedora this is necessary because there are already other packages
depending on ceph-libs, that need to be adjusted to depend on the new
split packages instead. In the mean time, ceph-libs-compat prevents
breakage.

[1] http://fedoraproject.org/wiki/Upgrade_paths_%E2%80%94_renaming_or_splitting_packages

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
2014-08-27 12:56:07 -07:00
Adam Crume
230c5b8e7f lttng: Only install rbd-replay-prep when enabled
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:34 -07:00
Adam Crume
861e6a3920 lttng: Update packaging
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:34 -07:00
Adam Crume
7ff6ed11b5 lttng: Only require lttng for Fedora >= 20 and RHEL == 6 for RPM distros
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:34 -07:00
Adam Crume
fed22f496e lttng: Add distro packaging
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:33 -07:00
Adam Crume
0cd2651cad rbd-replay: Add man page and package binaries for rbd-replay-prep
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:33 -07:00
Adam Crume
e18748ed99 rbd-replay: Add man page, and add binaries to Debian packaging
Signed-off-by: Adam Crume <adamcrume@gmail.com>
2014-08-21 10:57:33 -07:00
Sage Weil
213e0acf7e debian, rpm: build rocksdb statically if we can
Signed-off-by: Sage Weil <sage@redhat.com>
2014-07-31 21:11:25 -07:00
Sage Weil
a497a3b42e debian, rpm: build require bzip2 dev
Signed-off-by: Sage Weil <sage@redhat.com>
2014-07-31 21:11:24 -07:00
Sandon Van Ness
1526546ddc Remove reference from mkcephfs.
A bit of colission from spec changes for the rhel7/ceph-common
changes and alfredo's pull request for wip-die-ceph-mkcephfs.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2014-07-28 10:38:41 -07:00
Sage Weil
cb20b99641 Merge pull request #2154 from simon3z/master
init: add systemd service files

Reviewed-by: Alfredo Deza <alfredo.deza@inktank.com>
Reviewed-by: Sage Weil <sage@redhat.com>
2014-07-28 09:22:47 -07:00
Dan Mick
c0cb56f6c8 ceph.spec.in: add bash completion file for radosgw-admin
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
(cherry picked from commit b70096307130bcbac176704493a63c5d039d3edc)
2014-07-23 13:32:00 -07:00
Dan Mick
1ad4cd386e ceph.spec.in: rhel7-related changes:
udev rules: /lib -> /usr/lib
/sbin binaries move to /usr/sbin or %{_sbindir}

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
(cherry picked from commit 235e4c7de8f8efe491edefbdde8e5da4dfc44034)
2014-07-23 13:31:53 -07:00
Dan Mick
c57811fc4b Fix/add missing dependencies:
- rbd-fuse depends on librados2/librbd1
- ceph-devel depends on specific releases of libs and libcephfs_jni1
- librbd1 depends on librados2
- python-ceph does not depend on libcephfs1

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
(cherry picked from commit 7cf81322391b629b241da90181800ca1f138ce78)
2014-07-23 13:31:47 -07:00
Dan Mick
793e05a27a ceph.spec.in: whitespace fixes
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
(cherry picked from commit ec8af52a5ede78511423a1455a496d46d580c644)
2014-07-23 13:31:39 -07:00
Dan Mick
dae6ecbc31 ceph.spec.in: split out ceph-common as in Debian
Move files, postun scriptlet, and add dependencies on ceph-common
where appropriate

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
(cherry picked from commit e131b9d5a5e90e87d8a8346cb96cb5a26135c144)
2014-07-23 13:31:22 -07:00
Federico Simoncelli
c26477448e init: add systemd service files
This patch adds systemd service files. It is possible to start and
enable multiple instances (per monid, osdid, mds name), e.g.

 # systemctl start ceph-mon@node01
 # systemctl enable ceph-mon@node01

 # systemctl start ceph-osd@0
 # systemctl enable ceph-osd@0

The ceph cluster can be set in the system config file:

 /etc/sysconfig/ceph

adding or editing the CLUSTER environment variable.

Signed-off-by: Federico Simoncelli <fsimonce@redhat.com>
2014-07-22 11:30:55 -04:00
Sage Weil
58cc894b32 Revert "ceph.spec: move ceph-dencoder to ceph from ceph-common"
This reverts commit 95f5a448b52db545a2b9bbad47fdb287254f93ea.
2014-07-18 20:55:39 -07:00
Alfredo Deza
0f11aaeefd remove suse service restarts
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
2014-07-17 15:06:10 -04:00
Alfredo Deza
e3a5756f58 remove ceph restarts on upgrades for RPMs
Signed-off-by: Alfredo Deza <alfredo.deza@inktank.com>
2014-07-17 15:03:19 -04:00
Sage Weil
95f5a448b5 ceph.spec: move ceph-dencoder to ceph from ceph-common
Signed-off-by: Sage Weil <sage@redhat.com>
2014-07-14 17:02:05 -07:00
Dan Mick
b700963071 ceph.spec.in: add bash completion file for radosgw-admin
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2014-07-07 13:12:41 -07:00
Dan Mick
235e4c7de8 ceph.spec.in: rhel7-related changes:
udev rules: /lib -> /usr/lib
/sbin binaries move to /usr/sbin or %{_sbindir}

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2014-07-07 13:12:41 -07:00
Dan Mick
7cf8132239 Fix/add missing dependencies:
- rbd-fuse depends on librados2/librbd1
- ceph-devel depends on specific releases of libs and libcephfs_jni1
- librbd1 depends on librados2
- python-ceph does not depend on libcephfs1

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2014-07-07 13:12:23 -07:00
Dan Mick
ec8af52a5e ceph.spec.in: whitespace fixes
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2014-07-07 13:11:14 -07:00
Dan Mick
e131b9d5a5 ceph.spec.in: split out ceph-common as in Debian
Move files, postun scriptlet, and add dependencies on ceph-common
where appropriate

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2014-07-07 13:09:50 -07:00
Sebastien Ponce
910d73c4a8 Added RPM and debian packaging for libradosstriper, creating a new package called libradosstriper1
Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
2014-06-06 18:12:34 -07:00
Sebastien Ponce
8c124910a8 Fixed usage of rhel_version in spec file : it should have been rhel
Signed-off-by: Sebastien Ponce <sebastien.ponce@cern.ch>
2014-06-05 10:07:16 -07:00
John Spray
78313b7d5d Merge pull request #1739 from ceph/wip-journal-tool
cephfs-journal-tool
2014-05-27 14:51:18 +01:00
Sage Weil
401319a152 ceph.spec.in: remove BuildRoot
Deprecated

Fixes: #8143
Signed-off-by: Sage Weil <sage@inktank.com>
2014-05-20 13:41:35 -07:00
John Spray
403e0288d9 rpm: add cephfs-journal-tool to RPM build
Signed-off-by: John Spray <john.spray@inktank.com>
2014-05-20 14:07:49 +01:00
Alfredo Deza
82a3668e7c Merge pull request #1629 from ceph/wip-die-mkcephfs
remove mkcephfs (merge post-firefly?)

Reviewed-by:  Alfredo Deza <alfredo.deza@inktank.com>
2014-04-30 13:52:00 -04:00
Ilya Dryomov
2651750498 rbd: add libkrbd convenience library
Add libkrbd libtool convenience library to provide an interface for
mapping and unmapping rbd images programmatically.  This will be used
by the rbd binary itself and the librbd_fsx testing tool.

libkrbd takes care of the kernel module stuff (common/module.h) and
makes use of libudev to be able to properly wait for block device
creation and deletion and tell which block device got assigned by the
kernel to the newly created mapping.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-04-23 13:33:43 +04:00
Sage Weil
f1c6b65b47 ceph.spec.in: require redhat-lsb-core
We need this for /lib/lsb/init-functions.

Fixes: #8028
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-09 07:05:36 -07:00
Sage Weil
084db49ed3 remove mkcephfs
Fixes: #7552
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-08 14:34:15 -07:00
Sage Weil
72dc7327e9 ceph.spec: update ceph description
Fixes: #5835
Signed-off-by: Sage Weil <sage@inktank.com>
2014-04-08 14:18:44 -07:00
Michael Nelson
cd1a9c496a Add ceph-client-debug and jerasure shared objects to RPM spec file. 2014-03-31 12:35:56 -07:00
Sage Weil
0fd636c488 Merge remote-tracking branch 'gh/firefly'
Conflicts:
	README
2014-03-07 08:19:20 -08:00
Sandon Van Ness
65f3354903 Make symlink of librbd to qemu's folder so it can detect it.
Per issue #7293.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
2014-03-04 16:15:15 -08:00
Ilya Dryomov
1f5b796f58 FileStore: introduce XfsFileStoreBackend class
Introduce XfsFileStoreBackend class, currently the only filestore
backend implementing SETALLOCHINT op.  This commit adds a build-time
dependency on libxfs as xfs-specific ioctl (XFS_IOC_FSSETXATTR /
XFS_XFLAG_EXTSIZE) is used to implement the new set_alloc_hint()
method.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2014-03-03 20:33:44 +02:00
Dan Mick
799cde0a7b Fix python-requests package dependencies.
python-ceph does not require requests, but ceph-common does (for ceph-brag).

Signed-off-by: Dan Mick <dan.mick@inktank.com>
(cherry picked from commit 9a0ef6a181e90b81cdccbd54298270f5aa960767)
2014-02-28 08:34:43 -08:00
Dan Mick
9a0ef6a181 Fix python-requests package dependencies.
python-ceph does not require requests, but ceph-common does (for ceph-brag).

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2014-02-26 17:11:05 -08:00
Ken Dreyer
133ddb7df9 packaging: match all test files
It's tedious to try to keep the list of test files up to date in the RPM
spec file. Use a wildcard to match them all.

Reported-by: huangjun <hjwsm1989@gmail.com>
Signed-off-by: Ken Dreyer <ken.dreyer@inktank.com>
2014-02-21 15:18:23 -07:00
huangjun
1c129dfc7d packaging: add missing file
Signed-off-by: huangjun <hjwsm1989@gmail.com>
Reviewed-by: Ken Dreyer <ken.dreyer@inktank.com>
2014-02-21 15:17:31 -07:00
Josh Durgin
7a760337e2 packaging: add test programs for librados c object operations
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2014-02-18 12:34:33 -08:00
Sage Weil
871a5f04f0 ceph.spec: add ceph-brag
Signed-off-by: Sage Weil <sage@inktank.com>
2014-02-15 10:15:16 -08:00
Alexandre Oliva
5a6c9508e0 packaging: do not package libdir/ceph recursively
Package libdir/ceph non-recursively, to avoid duplicates, and
package libdir/ceph/ceph_common.sh explicitly.

Signed-off-by: Alexandre Oliva <oliva@gnu.org>
Signed-off-by: Ken Dreyer <ken.dreyer@inktank.com>
2014-02-12 11:17:07 -07:00
Loic Dachary
840e918fd4 tests: fix packaging for s/filestore/objectstore/
The binaries file name have changed and need to be updated in the
packaging files for deb and rpm. Fix a few leftovers as well.

Fixing 1a588f18ba0e57df64f8a48c1393a4bc65019571

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-12 12:46:14 +01:00
Loic Dachary
e80b084f91 erasure-code: add ceph_erasure_code debug command
It loads a designated erasure-code plugin and calls its
methods. It is convenient to figure out and tune the number of data
chunks, the size of an aligned chunk etc. For instance:

ceph_erasure_code \
      --parameter erasure-code-plugin=jerasure \
      --parameter erasure-code-directory=.libs \
      --parameter erasure-code-technique=reed_sol_van \
      --parameter erasure-code-k=2 \
      --parameter erasure-code-m=2 \
      --all

displays the chunk size when encoding an object of 1024 bytes.

get_chunk_size(1024)	512
get_data_chunk_count	2
get_chunk_count	4

Signed-off-by: Loic Dachary <loic@dachary.org>
2014-02-04 15:58:19 +01:00
Derek Yarnell
64a0b4fa56 packaging: apply udev hack rule to RHEL
In the RPM spec file there is a test to deploy the uuid hack udev rules
for older udev operating systems. This includes CentOS and RHEL, but the
check currently only is for CentOS, causing RHEL clients to get a bogus
osd rules file.

Adjust the conditional to apply to RHEL as well as CentOS. (The %{rhel}
macro is defined in both platforms' redhat-rpm-config package.)

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

Signed-off-by: Ken Dreyer <ken.dreyer@inktank.com>
2014-01-27 12:32:51 -07:00
Noah Watkins
aae47009ba libc++: use ceph::shared_ptr in installed header
librados.hpp uses std::tr1::shared_ptr which may not be available such
as in libc++. This switches the use to ceph::shared_ptr and as a result
also ships include/memory.h for the definition.

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2014-01-18 14:03:54 -08:00
Ken Dreyer
2d0d48b829 packaging: ship libdir/ceph
Automake puts ceph_common.sh into libdir/ceph, but the Red Hat packaging
was not capturing this file.

Add the libdir/ceph location to the RPM packaging.

Fixes #7117
2014-01-15 20:02:48 -07:00
Ken Dreyer
e60dcfa80d packaging: add missing test files
Two tests were inadvertantly missing from the RPM packaging:

ceph_test_c_headers was added to ceph in
ffdd30efc870eafb1047f022b16d9680d88fcc78

ceph_test_get_blkdev_size was added to ceph in
324dd54534e41598feb6169f33cfed85495fa91f

Add both of these to the packaging.

Signed-off-by: Ken Dreyer <ken.dreyer@inktank.com>
2014-01-15 19:40:40 -07:00
Loic Dachary
67f99f3455 packaging: make check needs argparse and uuidgen
Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-27 06:14:02 +01:00
Loic Dachary
af22b0a09b packaging: erasure-code plugins go in /usr/lib/ceph
Install the plugins in /usr/lib/ceph/erasure-code instead of
/usr/lib/erasure-code to comply with FHS : "Applications may use a
single subdirectory under /usr/lib."

http://refspecs.linuxfoundation.org/FHS_2.3/fhs-2.3.html

The debian package is modified to install the plugins as part of the
ceph package which also ships rados-classes.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-22 23:11:02 +01:00
Loic Dachary
42b4fe1496 osd: erasure code benchmark is installed is part of ceph-test
Add to the packaging for RPMs and DEBs

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-20 12:15:44 +01:00
Loic Dachary
087fe57f0e packaging: revert adding argparse and uuidgen
Because the gitbuilder build environment does not read the build depends
from the packages and needs to be updated independantly.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-19 15:33:07 +01:00
Loic Dachary
827253851e packaging: make check needs argparse and uuidgen
make check runs vstart.sh to setup a cluster from source and it misses
the python-argparse library as well as uuidgen otherwise it will fail
with:

    ./vstart.sh: 460: uuidgen: not found
    ...
    Error: Import No module named argparse

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-12-19 13:57:04 +01:00
Sage Weil
edc4224de4 Merge remote-tracking branch 'gh/wip-hitset'
Reviewed-by: Greg Farnum <greg@inktank.com>

Conflicts:
	src/common/config_opts.h
	src/osd/ReplicatedPG.cc
	src/osdc/Objecter.cc
	src/vstart.sh
2013-12-15 16:57:23 -08:00
Ilya Dryomov
462b3898e5 rbd: match against whole disks on unmap
Currently the way 'rbd unmap' translates a user-provided block device
into an rbd id is it matches the major number of the specified device
against /sys/bus/rbd/devices/<id>/major for each rbd mapping and
declares success on the first match.  This works for both entire disks
and partitions, because under the current device number allocation
scheme, each mapping means a new major number.

In preparation for support for single-major device number allocation
scheme, which would require matching both major and minor numbers, make
sure to always match against entire disk device numbers, by converting
the specified device major:minor pair into wholdedisk major:minor pair.
To achive that, use the libblkid library, which accomplishes this goal
by walking stable sysfs structures.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
2013-12-13 17:40:52 +02:00
Sage Weil
a0cfbfd742 librados: create new ceph_test_rados_api_tier target
Move the dirty/undirty test to it, and add one for HitSets.

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Greg Farnum <greg@inktank.com>
2013-12-06 14:37:27 -08:00
Samuel Just
878f3540d1 ceph-filestore-tool: add tool for fixing lost objects
Used to repair: #6761
Backport: emperor
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
2013-11-14 21:38:38 -08:00
Sage Weil
9f6af8b458 ceph-crush-location: new crush location hook
This generalizes the bit of code that builds a key=value pair list to
update an entity's CRUSH location.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-10-29 14:00:03 -07:00
Sage Weil
1e2e4297f8 Revert "ceph-crush-location: new crush location hook"
This reverts commit fc49065d855cfd74cb861d294f3464dd616e82ee.

Merged to wrong branch; my bad!
2013-10-29 13:58:32 -07:00
Sage Weil
fc49065d85 ceph-crush-location: new crush location hook
This generalizes the bit of code that builds a key=value pair list to
update an entity's CRUSH location.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-10-29 11:09:52 -07:00
Loic Dachary
284b73bb41 packages: ceph.spec.in is missing make as a build dependency
On a virgin centos-6.4, after yum-builddep ceph and following
http://ceph.com/docs/next/install/building-ceph/ instructions to:

cd ceph
./autogen.sh
./configure
make

it fails because make is not installed. It probably is not a problem for
most people because there are few developers who did not install make.

Signed-off-by: Loic Dachary <loic@dachary.org>
2013-10-26 00:46:32 +02:00
huangjun
7bcfe0967f ceph.spec.in: Add erasure-code related files.
Signed-off-by: huangjun  <hjwsm1989@gmail.com>
2013-10-18 18:21:22 +08:00
Sage Weil
ac533bf670 Merge pull request #722 from ceph/wip-6475
radosgw: create /var/log/radosgw in package, not init script

Reviewed-and-tested-by: Gary Lowell <gary.lowell@inktank.com>
2013-10-17 21:11:57 -07:00
Gary Lowell
2edc04cde5 ceph.spec.in: Need to cread radosgw log directory.
Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
2013-10-17 15:40:12 -07:00
Sage Weil
d3f0c0b2a6 Makefile: fix /sbin vs /usr/sbin behavior
Instead of telling configure to put things in /sbin, explicitly put the
two important items (mkcephfs and mount.fuse.ceph) in /sbin via an
automake rule.  This unbreaks FreeBSD 9.1 and probably others.

Based on patches originally from Alan Somers <asomers@gmail.com>, modified
for the current Makefile structure and applied to the specfile too.

Fixes: #6456
Signed-off-by: Sage Weil <sage@inktank.com>
Tested-by: Alan Somers <asomers@gmail.com>
2013-10-17 12:06:49 -07:00
Sage Weil
10b466e945 radosgw: create /var/log/radosgw in package, not init script
Fixes: #6475
Signed-off-by: Sage Weil <sage@inktank.com>
2013-10-16 16:16:16 -07:00
Sage Weil
5c476277a6 Merge remote-tracking branch 'gh/next' 2013-10-16 14:13:03 -07:00
Sage Weil
14e91bf124 debian, specfile: fix ceph-kvstore-tool packaging
See da69fa09c8274585225471c68c1acc788a3881f4

Signed-off-by: Sage Weil <sage@inktank.com>
2013-10-16 13:59:13 -07:00