Commit Graph

247 Commits

Author SHA1 Message Date
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
Dan Mick
4cb0e06266 Add 'ceph-rest-api'
ceph-rest-api is a Python WSGI module for accessing the Ceph cluster.
It supports most of the commands supported by the ceph CLI,
appropriately translated to HTTP GET/PUT requests.  It is not a
truly RESTful interface.

Not supported at this moment: "tell", "pg <pgid>", and "daemon"
commands.

Configuration options are specified in ceph.conf, specified with
-c/--conf or obtained from $CEPH_CONF, /etc/ceph/ceph.conf,
~/.ceph/ceph.conf, or ./ceph.conf.

-n/--name specifies the client name, used for the cluster
authentication key and for the ceph.conf section name (default
is client.restapi).

        restapi keyring = <keyring file>
        restapi public addr = listenIP:port (default 0.0.0.0:5000)
        restapi base url = <base path> (default /api/v0.1)
        restapi log level = (error, warning, info, debug)
        restapi log file = (default /var/log/ceph/<clientname>.log)

Primitive human-level command discovery is supported; GET from
BASEURL (say, http://localhost:5000/api/v0.1) will show an HTML
table of all commands and arguments, method supported, and help strings.

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-07-10 20:58:51 -07:00
Sage Weil
c124aa09ee Merge pull request #419 from dalgaaf/wip-da-fix-build-rados-classes
ceph.spec.in: add missing %{_libdir}/rados-classes/libcls_* files
2013-07-10 09:34:40 -07:00
Danny Al-Gaaf
2e79f73bd3 ceph.spec.in: add missing %{_libdir}/rados-classes/libcls_* files
Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-10 18:12:05 +02:00
Danny Al-Gaaf
640d138c80 ceph.spec.in: add some more ceph_test_cls_rgw_* files
Add new ceph_test_cls_rgw_* files to ceph-test package section.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-10 17:53:28 +02:00
Danny Al-Gaaf
78bae33f7f ceph.spec.in: add some ceph_test_cls_* files
Add some installed but not packaged ceph_test_cls_* files to
the ceph-test package.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
2013-07-10 17:51:17 +02:00
Gary Lowell
db63965a7b ceph.spec.in: Fix file name typo
Signed-off-by: Gary Lowell  <gary.lowell@inktank.com>
2013-07-03 13:14:36 -07:00
Laurent Barbe
0efcccdcc2 Move rbdmap file to /etc/ceph
Signed-off-by: Laurent Barbe <laurent@ksperis.com>
2013-07-02 16:53:11 +02:00
Laurent Barbe
ffe7045893 install rules for init-rbdmap
Signed-off-by: Laurent Barbe <laurent@ksperis.com>
2013-07-02 16:50:40 +02:00
Sage Weil
046e3b71a1 debian, rpm: remove python-lockfile dependency
As for 2a4953b697 ceph-disk no longer uses
this.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-24 13:04:58 -07:00
Dan Mick
67a3c1e48d ceph.in: rip out reusable code to pybind/ceph_argparse.py
Signed-off-by: Dan Mick <dan.mick@inktank.com>

Conflicts:
	src/ceph.in
2013-06-21 18:39:43 -07:00
Sage Weil
64ee0148a5 ceph.spec: create /var/run on package install
The %ghost %dir ... line will make this get cleaned up but won't install
it.

Reported-by: Derek Yarnell <derek@umiacs.umd.edu>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Gary Lowell <gary.lowell@inktank.com>
2013-06-18 14:51:24 -07:00