ceph_objectstore_tool: MemStore needs a CephContext

Pass g_ceph_context to ObjectStore::create() needed by MemStore

Fixes: #9661

Signed-off-by: David Zafman <dzafman@redhat.com>
MemStore: Need set/get_allow_sharded_objects() to work for ceph_objectstore_tool

Keep a bool sharded in memory and use for set/get_allow_sharded_objects()
Create a file "sharded" in the data dir when sharded is true during _save()
Check for file "sharded" during _load()

Fixes: #9661

Signed-off-by: David Zafman <dzafman@redhat.com>
rados.h: use macros to generate osd ops definitons and strings

Eliminate multiple points of maintenance by using macros - no
functional changes apart from adding strings which were missing.

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
doc: update kernel recommendations, add tunables link

No 3.16.[0-2] - same rbd deadlock regression as in 3.15.

Signed-off-by: Ilya Dryomov <idryomov@redhat.com>
Merge pull request #2649 from ceph/wip-os-recommend-doc-fix

doc: update kernel recommendations, add tunables link
tools: remove old ceph.cc

Signed-off-by: John Spray <john.spray@redhat.com>
Merge pull request #2639 from ceph/wip-9661

Fix 9661: ceph_objectstore_tool doesn't work with memstore

Reviewed-by: Samuel Just <sam.just@inktank.com>
ceph_objectstore_tool: Accept CEPH_ARGS environment arguments

Signed-off-by: David Zafman <dzafman@redhat.com>
Merge pull request #2651 from ceph/wip-ostool

ceph_objectstore_tool: Accept CEPH_ARGS environment arguments

Reviewed-by: Sage Weil <sage@redhat.com>
doc/release-notes: v0.86

Signed-off-by: Sage Weil <sage@redhat.com>
doc: missing osd prefix to ioprio config options

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
Merge pull request #2653 from dachary/wip-9676-ioprio-doc

doc: missing osd prefix to ioprio config options

Reviewed-by: Mehdi Abaakouk <sileht@sileht.net>
Run configure without liblttng on squeeze as well.

Signed-off-by: Sandon Van Ness <sandon@inktank.com>
Merge pull request #2646 from ceph/wip-osd-op-macro

rados.h: use macros to generate osd ops definitons and strings

Reviewed-by: Sage Weil <sage@redhat.com>
Merge pull request #2647 from ceph/wip-rm-legacy-cli

tools: remove old ceph.cc

Reviewed-by: Loic Dachary <loic@dachary.org>
doc: update debian compilation dependencies

Using the content of debian/control.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
ceph-disk: run partprobe after zap

Not running partprobe after zapping a device can lead to the following:

* ceph-disk prepare /dev/loop2
* links are created in /dev/disk/by-partuuid
* ceph-disk zap /dev/loop2
* links are not removed from /dev/disk/by-partuuid
* ceph-disk prepare /dev/loop2
* some links are not created in /dev/disk/by-partuuid

This is assuming there is a bug in the way udev events are handled by
the operating system.

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

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
ceph-disk: implement init=none for block devices

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
tests: helper to run unit / function tests in docker

For instance

   test/docker-test.sh --os-type ubuntu --os-version 14.04 \
        test/ceph-disk.sh

runs test/ceph-disk.sh in a ubuntu 14.04 docker container. Once the
container is populated and ceph compiled, running a test script roughly
requires entering the container and running make TESTS=tests/foo.sh check

* docker pull ubuntu:14.04
* docker run apt-get install ceph compilation / run dependencies
* docker commit ceph-ubuntu-14.04 # to re-use
* git clone the-local-clone ceph-ubuntu-14.04
* docker run ceph-ubuntu-14.04 make -j4 in the ceph-ubuntu-14.04 clone
* docker run test/ceph-disk.sh

test/docker-test.sh is the command line interface for
test/docker-test-helper.sh which can be invoked from shell scripts.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>
ceph-disk: test prepare / activate on a device

This indirectly tests that partprobe is called after zap because it
would fail to map the partitions to /dev/disk/by-partuuid otherwise.

It also indirectly test the implementation of init=none when using a
block device because the test would fail to put an object into the rbd
pool using the device otherwise.

Signed-off-by: Loic Dachary <loic-201408@dachary.org>