Commit Graph

258 Commits

Author SHA1 Message Date
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 1a588f18ba

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
ffdd30efc8

ceph_test_get_blkdev_size was added to ceph in
324dd54534

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 fc49065d85.

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 da69fa09c8

Signed-off-by: Sage Weil <sage@inktank.com>
2013-10-16 13:59:13 -07:00
huangjun
02b5eb281a ceph.spec.in: do not list ceph-rest-api twice; add missing cls_hello files
Reported-by: hjwsm1989@gmail.com
Signed-off-by: Sage Weil <sage@inktank.com>
2013-10-14 17:05:49 -07:00
Alan Grosskurth
16dec28c02 ceph.spec.in: Always depend on junit4 (fixes bug #6216)
The RPM spec file currently lists `junit` as a dependency on all
platforms except recent versions of OpenSUSE. This is problematic
because `junit` refers to version 3.x, which doesn't satisfy the check
in the configure script:

    configure: Cannot find junit4.jar (apt-get install junit4)

As a result, rpmbuild doesn't build `libcephfs-test.jar` and fails:

    http://tracker.ceph.com/issues/6216

So let's depend on `junit4` in all cases. This package is provided by
all supported platforms (el6, fc17, fc18, fc19, opensuse12.2,
opensuse12, sles11), and my testing on CentOS 6 shows that rpmbuild
now succeeds and produces the expected `libcephfs_jni1` RPM.
2013-10-06 00:42:43 -07:00
Loic Dachary
8f0bb2f02f pybind: unit tests for ceph_argparse::parse_json_funcsigs
Run parse_json_funcsigs against the builtin commands found
in mon/MonCommands.h. Although it does not provide for a full
validation, it will detect some degenerate cases.

It is expected to raise if a space is missing at the end of an option
specification ( see https://github.com/ceph/ceph/pull/585 ) and this
case is tested. New tests of the same kind can be added whenever an
undetected error is found. Ideally a validation function is implemented
and it would be updated ( with an associated test ) when a new
pathological case is found.

The json string given to parse_json_funcsigs is obtained from
the support program get_command_descriptions.

The python-nose dependencies are added to the build requirements in
debian/control and ceph.spec.in because make check should always be run
at built time.

http://tracker.ceph.com/issues/6274 refs #6274

Reviewed-by: Dan Mick <dan.mick@inktank.com>
Reviewed-by: Joao Eduardo Luis <joao.luis@inktank.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
2013-09-23 23:46:43 +02:00
Noah Watkins
b86c068669 hadoop: remove hadoop shim
The in-tree Hadoop shim was a combination of libcephfs wrapper, and the
bits to support Hadoop. This has been replaced by src/java that
implements generic libcephfs wrappers, and externally, the hadoop shim
(see docs).

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
2013-09-13 13:39:48 -07:00
Gary Lowell
8df504c157 ceph.spec.in: radosgw package doesn't require mod_fcgi
Fixes #5702

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
2013-08-27 09:53:12 -07:00
Gary Lowell
5c5980bc84 ceph.spec.in: remove trailing paren in previous commit
Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
2013-08-22 13:30:20 -07:00
Gary Lowell
9b667cef82 ceph.spec.in: Don't invoke debug_package macro on centos.
If the redhat-rpm-config package is installed, the debuginfo rpms will
be built by default.   The build will fail when the package installed
and the specfile also invokes the macro.

Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
2013-08-22 11:07:16 -07:00
Sage Weil
8437304c93 build-depend on yasm
Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-21 08:31:12 -07:00
Sage Weil
d08e05e463 ceph-post-file: single command to upload a file to cephdrop
Use sftp to upload to a directory that only this user and ceph devs can
access.

Distribute an ssh key to connect to the account.  This will let us revoke
the key in the future if we feel the need.  Also distribute a known_hosts
file so that users have some confidence that they are connecting to the
real ceph drop account and not some third party.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Dan Mick <dan.mick@inktank.com>
2013-08-16 17:59:11 -07:00
Sage Weil
895d531cc9 cls/hello: hello, world rados class
Simple example of a rados class doing read, write, and read/modify/write
methods.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-08-15 17:21:29 -07:00
Danny Al-Gaaf
caaaf2c211 ceph.spec.in: merge back JUnit handling from SUSE spec
Merge back what we have in the (open)SUSE ceph spec file for JUnit.
Add missing Requires and the package is named junit4 on some SUSE
versions.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-08-01 15:01:22 +02:00
Danny Al-Gaaf
cbf3a11cf3 ceph.spec.in: move junit BuildRequires to the cephfs-java subpackage
JUnit is only needed by cephfs-java. Move the BuildRequires to this
subpackage.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-08-01 15:00:25 +02:00
Danny Al-Gaaf
4a95796251 ceph.spec.in: use snappy-devel only on RHEL derivatives
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-08-01 15:00:22 +02:00
Erik Logtenberg
17b460c55f ceph.spec.in: add missing buildrequires for Fedora
This patch adds two buildrequires to the ceph.spec file, that are needed
to build the rpms under Fedora. Danny Al-Gaaf commented that the
snappy-devel dependency should actually be added to the leveldb-devel
package. I will try to get that fixed too, in the mean time, this patch
does make sure Ceph builds on Fedora.

Signed-off-by: Erik Logtenberg <erik@logtenberg.eu>
2013-08-01 15:00:19 +02:00
Sage Weil
6881ab3b39 debian, rpm: make python-ceph depend on python-requests
For ceph-rest-api.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-07-27 17:32:49 -07:00
Dan Mick
41930b5e8f ceph.spec.in, debian/control: python-ceph depends on python-flask
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-24 16:31:46 -07:00
Danny Al-Gaaf
e536d66e07 ceph.spec.in: obsolete ceph-libs only on the affected distro
The ceph-libs package existed only on Redhat based distro,
there was e.g. never such a package on SUSE. Therefore: make
sure the 'Obsoletes' is only set on these affected distros.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-23 22:06:47 +02:00
Gary Lowell
eabf2f6ae1 ceph.spec.in: Obsolete ceph-libs
Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-22 09:52:19 -07:00
Dan Mick
b5659b5e7f Merge branch 'wip-wsgi' into next
* wip-wsgi:
  ceph-rest-api: separate into module and front-end for WSGI deploy
  ceph-rest-api: make main program be "shell" around WSGI guts

  Reviewed-by: Sage Weil <sage@inktank.com>
2013-07-12 16:38:28 -07:00
Dan Mick
cc10988850 ceph-rest-api: separate into module and front-end for WSGI deploy
To deploy ceph-rest-api within a WSGI server (apache/mod_wsgi,
nginx/uwsgi, etc.), there needs to be an importable (.py) module
that performs all init/config when imported.  ceph-rest-api was
close, but it needs to be named properly, and there's no argument
passing, so it needs to get args from a fixed file or the env.

Separate most of ceph-rest-api into pybind/ceph_rest_api.py, and make
its arguments come from the environment, and init errors be
ImportError exceptions.  Recase ceph-rest-api as a thin layer that
does the usual setup and arg parsing, and then sets args into the
environment and imports ceph_rest_api.py, catching exceptions and
reporting errors.  This allows standalone execution as usual.
ceph-rest-api grabs a few module globals (addr/port and the flask.app)
to use after it imports.

Accept cluster name, and do the ceph.conf search using cluster name
in the appropriate places in the searched-for files.

Also ceph_rest_api.py gets a little cleanup (fewer global variables,
cleaner conf file search algorithm, better error reporting on conf
load)

Also: doc updates, packaging updates to include ceph_rest_api.py

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-12 16:37:32 -07:00
Dan Mick
1f8fe709b6 ceph-rest-api: Missing packaging (binary in .spec, manpage in both)
Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-11 18:25:44 -07:00