Commit Graph

338 Commits

Author SHA1 Message Date
Dan Mick
793e05a27a ceph.spec.in: whitespace fixes
Signed-off-by: Sandon Van Ness <sandon@inktank.com>
(cherry picked from commit ec8af52a5e)
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 e131b9d5a5)
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 95f5a448b5.
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 9a0ef6a181)
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 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
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
Sage Weil
253069e047 ceph.spec: include partuuid rules in package
Commit f3234c147e missed this.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-17 11:16:41 -07:00
Sage Weil
cc9b83a802 ceph.spec: install/uninstall init script
This was commented out almost years ago in commit 9baf5ef4 but it is not
clear to me that it was correct to do so.  In any case, we are not
installing the rc.d links for ceph, which means it does not start up after
a reboot.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-17 09:49:54 -07:00
Sage Weil
f3234c147e ceph.spec: include by-partuuid udev workaround rules
These are need for old or buggy udev.  Having them for new and unbroken
udev is harmless.

Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-14 14:04:42 -07:00
Sage Weil
1aa7f59537 ceph.spec: add missing ceph_test_rados_api_cmd to package
Signed-off-by: Sage Weil <sage@inktank.com>
2013-06-14 14:04:24 -07:00
Dan Mick
3ac6ffe802 Merge branch 'wip-ceph-cli' into master
Conflicts:
	src/include/rados/librados.h
	src/librados/librados.cc
	src/osdc/Objecter.cc
	src/pybind/rados.py

Required modifications to:
	src/osd/OSD.cc

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-06-06 20:08:15 -07:00
Josh Durgin
5a53da3c16 ceph-test: add ceph_test_rados_api_lock to packaging and qa
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
2013-06-05 12:58:44 -07:00
Dan Mick
70a96973e9 packaging fixes around the new ceph cli:
Remove ceph-legacy-cli
Include ceph in proper places to get it built/installed/packaged
Make ceph-common (deb) or ceph (rpm) pkg depend on python-ceph pkg

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-05-21 20:33:23 -07:00
Dan Mick
850a4cc4f1 Rename "ceph" tool to "ceph-legacy-cli"
Conflicts:
	src/Makefile.am

Signed-off-by: Dan Mick <dan.mick@inktank.com>
2013-05-21 15:54:12 -07:00
Gary Lowell
e5b25bd36b Merge branch 'next' 2013-05-06 19:51:47 -07:00