]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
11 years agoqa/workunits/snaps: New allow_new_snaps syntax 1190/head
John Spray [Wed, 5 Feb 2014 18:44:40 +0000 (18:44 +0000)]
qa/workunits/snaps: New allow_new_snaps syntax

These were probably just obscuring other failures.

Reviewed-by: Sage Weil <sage@inktank.com>
Signed-off-by: John Spray <john.spray@inktank.com>
11 years agoMerge pull request #1183 from ceph/wip-7336
Sage Weil [Wed, 5 Feb 2014 05:33:54 +0000 (21:33 -0800)]
Merge pull request #1183 from ceph/wip-7336

rgw: fix rgw_read_user_buckets() use of max param

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agorgw: fix rgw_read_user_buckets() use of max param 1183/head
Yehuda Sadeh [Tue, 4 Feb 2014 18:34:02 +0000 (10:34 -0800)]
rgw: fix rgw_read_user_buckets() use of max param

Fixes: #7336
The rgw_read_user_buckets() treated the max param as the max number of
entries to request in a single op, but always fetched the entire list
of buckets. This is wrong, as it should have treated it as the total
number of entries requested. All the callers assume the latter.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoclient: fix warnings
Sage Weil [Tue, 4 Feb 2014 05:12:41 +0000 (21:12 -0800)]
client: fix warnings

client/Client.cc: In member function 'int Client::_read(Fh*, int64_t, uint64_t, ceph::bufferlist*)':
warning: client/Client.cc:5893:27: comparison between signed and unsigned integer expressions [-Wsign-compare]
client/Client.cc: In member function 'int Client::_write(Fh*, int64_t, uint64_t, const char*)':
warning: client/Client.cc:6235:30: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoos/KeyValueStore: fix warning
Sage Weil [Tue, 4 Feb 2014 00:54:52 +0000 (16:54 -0800)]
os/KeyValueStore: fix warning

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agorest: add a few rest api tests
Sage Weil [Tue, 4 Feb 2014 00:54:08 +0000 (16:54 -0800)]
rest: add a few rest api tests

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon: use 'mds set inline_data ...' for enable/disable of inline data
Sage Weil [Sun, 2 Feb 2014 20:02:08 +0000 (12:02 -0800)]
mon: use 'mds set inline_data ...' for enable/disable of inline data

This makes the management interface a bit more consistent.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agomon: fix 'mds set allow_new_snaps'
Sage Weil [Mon, 3 Feb 2014 21:19:14 +0000 (13:19 -0800)]
mon: fix 'mds set allow_new_snaps'

We had already added this as a flag (set/unset) when I generalized the
'mds set_max_mds' to be 'ceph mds set <var> <val>'.  Switch the snaps
flag to be a key/value to with true/false (similar to the hashpspool
pool flag) since there are fewer users and the var/val approach is more
general.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge branch 'next'
Ken Dreyer [Mon, 3 Feb 2014 22:39:26 +0000 (22:39 +0000)]
Merge branch 'next'

11 years agov0.76 v0.76
Ken Dreyer [Mon, 3 Feb 2014 18:26:25 +0000 (18:26 +0000)]
v0.76

11 years agoclient: use 64-bit value in sync read eof logic
Sage Weil [Mon, 3 Feb 2014 16:54:14 +0000 (08:54 -0800)]
client: use 64-bit value in sync read eof logic

The file size can jump to a value that is very much larger than our current
position (for example, it could be a disk image file that gets a sparse
write at a large offset).  Use a 64-bit value so that 'some' doesn't
overflow.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: John Spray <john.spray@inktank.com>
11 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Sun, 2 Feb 2014 17:40:11 +0000 (09:40 -0800)]
Merge remote-tracking branch 'gh/next'

Conflicts:
src/mon/OSDMonitor.cc
src/osd/OSDMap.h

11 years agoMerge remote-tracking branch 'gh/wip-inline'
Sage Weil [Sun, 2 Feb 2014 17:15:27 +0000 (09:15 -0800)]
Merge remote-tracking branch 'gh/wip-inline'

Passed fs suite, sage-2014-02-01_22:18:10-fs-wip-inline-testing-basic-plana,
modulo a snap test error in the suite.

Reviewed-by: Yan, Zheng <zheng.z.yan@intel.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1165 from mo22/client_fuse_multithreading
Sage Weil [Sun, 2 Feb 2014 05:00:41 +0000 (21:00 -0800)]
Merge pull request #1165 from mo22/client_fuse_multithreading

client: ceph-fuse use fuse_session_loop_mt to allow multithreaded operat...

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1174 from alram/master
John Wilkins [Fri, 31 Jan 2014 22:20:37 +0000 (14:20 -0800)]
Merge pull request #1174 from alram/master

doc: rgw: el6 documentation fixes

11 years agodoc: rgw: el6 documentation fixes 1174/head
Alexandre Marangone [Fri, 31 Jan 2014 21:51:47 +0000 (13:51 -0800)]
doc: rgw: el6 documentation fixes

- fix a couple of typo for repo configuration and service restart
- the ceph package must be installed on RPM distro since the init
script relies on ceph-conf
- Note on radosgw service name for RPM distro

Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
11 years agoMerge pull request #1162 from ceph/wip-5997
David Zafman [Fri, 31 Jan 2014 20:35:56 +0000 (12:35 -0800)]
Merge pull request #1162 from ceph/wip-5997

Fixes: #5997
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoosd: Change some be_compare_scrub_objects() args to const 1162/head
David Zafman [Thu, 30 Jan 2014 01:14:09 +0000 (17:14 -0800)]
osd: Change some be_compare_scrub_objects() args to const

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Change be_scan_list() arg to const
David Zafman [Thu, 30 Jan 2014 01:13:39 +0000 (17:13 -0800)]
osd: Change be_scan_list() arg to const

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agocommon: buffer::ptr::cmp() is a const function
David Zafman [Thu, 30 Jan 2014 01:08:50 +0000 (17:08 -0800)]
common: buffer::ptr::cmp() is a const function

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Move the rest of scrubbing routines to the backend
David Zafman [Wed, 29 Jan 2014 03:18:32 +0000 (19:18 -0800)]
osd: Move the rest of scrubbing routines to the backend

Move enum scrub_error_type to osd_types.h
Move PG::_compare_scrub_objects to ReplicatedBackend::be_compare_scrub_objects
Move PG::_select_auth_object to ReplicatedBackend::be_select_auth_object
Move PG::_compare_scrubmaps to ReplicatedBackend::be_compare_scrubmaps

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Move PG::_scan_list() to backend as ReplicatedBackend::be_scan_list()
David Zafman [Sat, 25 Jan 2014 02:11:52 +0000 (18:11 -0800)]
osd: Move PG::_scan_list() to backend as ReplicatedBackend::be_scan_list()

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoosd: Add scrub_supported() backend interface
David Zafman [Fri, 24 Jan 2014 03:55:27 +0000 (19:55 -0800)]
osd: Add scrub_supported() backend interface

Signed-off-by: David Zafman <david.zafman@inktank.com>
11 years agoOSDMap: fix deepish_copy_from
Sage Weil [Wed, 29 Jan 2014 02:46:37 +0000 (18:46 -0800)]
OSDMap: fix deepish_copy_from

Start with a shallow copy!

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit d0f13f54146694a197535795da15b8832ef4b56f)

Conflicts:

src/osd/OSDMap.h

11 years agoOSDMonitor: use deepish_copy_from for remove_down_pg_temp
Sage Weil [Tue, 28 Jan 2014 19:00:34 +0000 (11:00 -0800)]
OSDMonitor: use deepish_copy_from for remove_down_pg_temp

This is a backport of 368852f6c0a884b8fdc80a5cd6f9ab72e814d412.

Make a deep copy of the OSDMap to avoid clobbering the in-memory copy with
the call to apply_incremental.

Fixes: #7060
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoOSDMap: deepish_copy_from()
Sage Weil [Fri, 24 Jan 2014 19:03:26 +0000 (11:03 -0800)]
OSDMap: deepish_copy_from()

Make a deep(ish) copy of another OSDMap.  Unfortunatley we can't make the
compiler-generated copy operator/constructors private until c++11.  :(

Signed-off-by: Sage Weil <sage@inktank.com>
(cherry picked from commit bd54b9841b9255406e56cdc7269bddb419453304)

11 years agoos/KeyValueStore: fix warning
Sage Weil [Fri, 31 Jan 2014 15:19:10 +0000 (07:19 -0800)]
os/KeyValueStore: fix warning

./os/KeyValueStore.h: In member function ‘std::string KeyValueStore::strip_object_key(uint64_t)’:
warning: ./os/KeyValueStore.h:173:31: format ‘%ld’ expects argument of type ‘long int’, but argument 4 has type ‘uint64_t {aka long long unsigned int}’ [-Wformat=]

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge branch 'wip-inline' of git://github.com/kylinstorage/ceph
Sage Weil [Fri, 31 Jan 2014 15:00:49 +0000 (07:00 -0800)]
Merge branch 'wip-inline' of git://github.com/kylinstorage/ceph

Conflicts:
src/include/ceph_features.h

11 years agoMerge pull request #1171 from ceph/wip-osdmap-features
Sage Weil [Fri, 31 Jan 2014 05:01:16 +0000 (21:01 -0800)]
Merge pull request #1171 from ceph/wip-osdmap-features

mon: encode full osdmap with same feature bits as the incremental

Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #1169 from dachary/wip-ceph-disk
Josh Durgin [Fri, 31 Jan 2014 00:04:09 +0000 (16:04 -0800)]
Merge pull request #1169 from dachary/wip-ceph-disk

Reviewed-by: Sage Weil <sage.weil@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge remote-tracking branch 'origin/next'
Josh Durgin [Thu, 30 Jan 2014 23:40:09 +0000 (15:40 -0800)]
Merge remote-tracking branch 'origin/next'

Conflicts:
src/test/ceph-disk.sh

11 years agomon/OSDMonitor: encode full OSDMap with same feature bits as the Incremental 1171/head
Sage Weil [Thu, 30 Jan 2014 23:13:05 +0000 (15:13 -0800)]
mon/OSDMonitor: encode full OSDMap with same feature bits as the Incremental

Each monitor is independently encoding the full OSDMap and storing it in
its local store.  Sometime this happens when we do not have a valid value
for quorum_features (for example, it can happen during sync).

Instead, use the feature bits the Incremental was encoded with for the full
OSDMap so that they always match.

Note that this conveniently the *only* place in the mon where we encode
the full OSDMap, so we're capturing all paths.  Yay!

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoOSDMap: note encoding features in Incremental encoding
Sage Weil [Thu, 30 Jan 2014 23:09:58 +0000 (15:09 -0800)]
OSDMap: note encoding features in Incremental encoding

The monitor will need to know what features the incremental was encoded
with so that it can encode the OSDMap using the same bits.  Introduce a
member that is set during decode.  During encode, encoding the value passed
in by the caller.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1170 from ceph/wip-pybind-enverr
Josh Durgin [Thu, 30 Jan 2014 21:10:37 +0000 (13:10 -0800)]
Merge pull request #1170 from ceph/wip-pybind-enverr

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agopybind: improve EnvironmentError output 1170/head
Ilya Dryomov [Thu, 30 Jan 2014 21:04:12 +0000 (23:04 +0200)]
pybind: improve EnvironmentError output

Follow 70c7c9e600c5 ("pybind/rados.py: improve error output") and
improve EnvironmentError output for librbd and libcephfs too.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agorgw: fix build on centos
Yehuda Sadeh [Thu, 30 Jan 2014 18:35:04 +0000 (10:35 -0800)]
rgw: fix build on centos

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1145 from dachary/wip-mailmap
Loic Dachary [Thu, 30 Jan 2014 20:15:21 +0000 (12:15 -0800)]
Merge pull request #1145 from dachary/wip-mailmap

mailmap: organization affiliations

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
11 years agomailmap: Rutger ter Borg affiliation 1145/head
Loic Dachary [Mon, 27 Jan 2014 11:57:04 +0000 (12:57 +0100)]
mailmap: Rutger ter Borg affiliation

Reviewed-by: Rutger ter Borg <rutger@terborg.net>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Laurent Barbe affiliation
Loic Dachary [Mon, 27 Jan 2014 09:35:28 +0000 (10:35 +0100)]
mailmap: Laurent Barbe affiliation

Reviewed-by: Laurent Barbe <laurent@ksperis.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: anonymous contributions are unaffiliated
Loic Dachary [Mon, 27 Jan 2014 09:31:11 +0000 (10:31 +0100)]
mailmap: anonymous contributions are unaffiliated

there only are a few of them

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Andras Elso affiliation
Loic Dachary [Mon, 27 Jan 2014 06:14:11 +0000 (07:14 +0100)]
mailmap: Andras Elso affiliation

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Ma Jianpeng affiliation
Loic Dachary [Mon, 27 Jan 2014 05:40:05 +0000 (06:40 +0100)]
mailmap: Ma Jianpeng affiliation

and name normalization

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Simon Leinen is with SWITCH
Loic Dachary [Mon, 27 Jan 2014 05:35:01 +0000 (06:35 +0100)]
mailmap: Simon Leinen is with SWITCH

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: John Spray is with Inktank
Loic Dachary [Mon, 27 Jan 2014 05:33:44 +0000 (06:33 +0100)]
mailmap: John Spray is with Inktank

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Alan Somers affiliation
Loic Dachary [Mon, 27 Jan 2014 05:20:57 +0000 (06:20 +0100)]
mailmap: Alan Somers affiliation

Reviewed-by: Alan Somers <asomers@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Jonathan Dieter affiliation
Loic Dachary [Mon, 27 Jan 2014 05:17:32 +0000 (06:17 +0100)]
mailmap: Jonathan Dieter affiliation

Reviewed-by: Jonathan Dieter <jdieter@lesbg.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Christian Marie affiliation
Loic Dachary [Mon, 27 Jan 2014 05:06:34 +0000 (06:06 +0100)]
mailmap: Christian Marie affiliation

and name normalization

Reviewed-by: Christian Marie <pingu@anchor.net.au>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Dan Chai is unaffiliated
Loic Dachary [Mon, 27 Jan 2014 05:00:49 +0000 (06:00 +0100)]
mailmap: Dan Chai is unaffiliated

and name normalization

Reviewed-by: Dan Chai <tengweicai@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Kai Zhang affiliation
Loic Dachary [Mon, 27 Jan 2014 11:20:53 +0000 (12:20 +0100)]
mailmap: Kai Zhang affiliation

Reviewed-by: Kai Zhang <zakir.exe@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Ron Allred name normalization
Loic Dachary [Mon, 27 Jan 2014 04:38:51 +0000 (05:38 +0100)]
mailmap: Ron Allred name normalization

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Thomas Bechtold affiliation
Loic Dachary [Mon, 27 Jan 2014 04:20:16 +0000 (05:20 +0100)]
mailmap: Thomas Bechtold affiliation

and canonical name. Also fix the name "Deutsche Telekom"

Reviewed-by: Thomas Bechtold <t.bechtold@telekom.de>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Xihui He affiliation
Loic Dachary [Mon, 27 Jan 2014 04:12:51 +0000 (05:12 +0100)]
mailmap: Xihui He affiliation

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Adam Twardowski affiliation
Loic Dachary [Mon, 27 Jan 2014 04:03:21 +0000 (05:03 +0100)]
mailmap: Adam Twardowski affiliation

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Huang Jun is unaffiliated
Loic Dachary [Mon, 27 Jan 2014 03:43:51 +0000 (04:43 +0100)]
mailmap: Huang Jun is unaffiliated

and name normalization

Reviewed-by: Huang Jun <hjwsm1989@gmail.com>
Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agomailmap: Kun Huang affiliation
Loic Dachary [Mon, 27 Jan 2014 02:58:06 +0000 (03:58 +0100)]
mailmap: Kun Huang affiliation

As found at https://github.com/pyKun

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: support and test the absence of PATH 1169/head
Loic Dachary [Wed, 29 Jan 2014 10:00:08 +0000 (11:00 +0100)]
ceph-disk: support and test the absence of PATH

Although this is not exactly the context in which ceph-disk is run when
invoked by udev, it makes sure there is at least one sensible way of
using it when PATH is undefined.

Also make src/ceph.in not fail if PATH is not defined.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoceph-disk: larger timeout in the test script
Loic Dachary [Tue, 14 Jan 2014 09:18:15 +0000 (10:18 +0100)]
ceph-disk: larger timeout in the test script

Otherwise slow machines may timeout just because they are slow and not
because the process is blocked by an actual problem.

Signed-off-by: Loic Dachary <loic@dachary.org>
11 years agoFileStore: avoid leveldb check for xattr when possible
Haomai Wang [Thu, 30 Jan 2014 03:11:12 +0000 (19:11 -0800)]
FileStore: avoid leveldb check for xattr when possible

Maintain an internal xattr called "spill_out" that indicates whether we
(may) have xattrs stored in omap.  If attribute is set, it will indicate
that we should or should not look in omap.  If the attribute is not
present, then we do not know and will also need to check.

For new stores, this will avoid the overhead of consulting omap in the
general case until a particular objects gets enough (or big) xattrs and
spills over.

For old stores, we will effectively fall back to the previous behavior
of always checking.

Implements #7059

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Samuel Just <sam.just@inktank.com>
11 years agoMerge pull request #1159 from ceph/wip-rbd-rm-watchers
Josh Durgin [Thu, 30 Jan 2014 18:52:50 +0000 (10:52 -0800)]
Merge pull request #1159 from ceph/wip-rbd-rm-watchers

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Thu, 30 Jan 2014 17:19:59 +0000 (09:19 -0800)]
Merge remote-tracking branch 'gh/next'

11 years agounittest_striper: fix warning
Sage Weil [Thu, 30 Jan 2014 17:13:30 +0000 (09:13 -0800)]
unittest_striper: fix warning

In file included from test/test_striper.cc:1:0:
../src/gtest/include/gtest/gtest.h: In function ‘testing::AssertionResult testing::internal::CmpHelperEQ(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = unsigned int]’:
../src/gtest/include/gtest/gtest.h:1300:30: instantiated from ‘static testing::AssertionResult testing::internal::EqHelper::Compare(const char*, const char*, const T1&, const T2&) [with T1 = int, T2 = unsigned int, bool lhs_is_null_literal = false]’
test/test_striper.cc:57:223: instantiated from here
warning: ../src/gtest/include/gtest/gtest.h:1263:3: comparison between signed and unsigned integer expressions [-Wsign-compare]

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1167 from mourgaya/master
Loic Dachary [Thu, 30 Jan 2014 15:42:04 +0000 (07:42 -0800)]
Merge pull request #1167 from mourgaya/master

doc: cls moved to subdirectory

Reviewed-By: Christophe Courtaut <christophe.courtaut@gmail.com>
11 years agodoc: cls moved to subdirectory 1167/head
Eric Mourgaya [Thu, 30 Jan 2014 14:26:04 +0000 (15:26 +0100)]
doc: cls moved to subdirectory

Signed-off-by: Eric Mourgaya <eric.mourgaya@gmail.com>
11 years agorun-rbd-tests: run remove_with_watcher test 1159/head
Ilya Dryomov [Thu, 30 Jan 2014 12:44:56 +0000 (14:44 +0200)]
run-rbd-tests: run remove_with_watcher test

Bug #2533 has been fixed for a while now, start running
remove_with_watcher test.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agorbd: don't forget to call close_image() if remove_child() fails
Ilya Dryomov [Wed, 29 Jan 2014 14:12:01 +0000 (16:12 +0200)]
rbd: don't forget to call close_image() if remove_child() fails

close_image() among other things unregisters a watcher that's been
registered by open_image().  Even though it'll timeout in 30 or so
seconds, it's not nice now that we check for watchers before starting
the removal process.

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agorbd: check for watchers before trimming an image on 'rbd rm'
Ilya Dryomov [Wed, 29 Jan 2014 14:12:01 +0000 (16:12 +0200)]
rbd: check for watchers before trimming an image on 'rbd rm'

Check for watchers before trimming image data to try to avoid getting
into the following situation:

  - user does 'rbd rm' on a mapped image with an fs mounted from it
  - 'rbd rm' trims (removes) all image data, only header is left
  - 'rbd rm' tries to remove a header and fails because krbd has a
    watcher registered on the header
  - at this point image cannot be unmapped because of the mounted fs
  - fs cannot be unmounted because all its data and metadata is gone

Unfortunately, this fix doesn't make it impossible to happen (the
required atomicity isn't there), but it's a big improvement over the
status quo.

Fixes: http://tracker.ceph.com/issues/7076
Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agopybind: work around find_library() not searching LD_LIBRARY_PATH
Ilya Dryomov [Thu, 30 Jan 2014 11:39:15 +0000 (13:39 +0200)]
pybind: work around find_library() not searching LD_LIBRARY_PATH

Commit b28b64a0b6db ("pybind: use find_library for libcephfs and
librbd") switched us to find_library(), but this function doesn't seem
to respect LD_LIBRARY_PATH.  There are numerous python tickets, dating
back several years, but alas.  Work around it by using the soname as
a fallback.  (rados.py has been fixed by commit e46d2ca067b5 ("fix the
bug  ctypes.util.find_library to search for librados failed on
Centos6.4.")

Signed-off-by: Ilya Dryomov <ilya.dryomov@inktank.com>
11 years agoMerge pull request #1163 from ceph/wip-7264
Dan Mick [Thu, 30 Jan 2014 00:17:05 +0000 (16:17 -0800)]
Merge pull request #1163 from ceph/wip-7264

pybind/rados.py: improve error output

Reviewed-by: Dan Mick <dan.mick@inktank.com>
11 years agopybind/rados.py: improve error output 1163/head
Yehuda Sadeh [Thu, 30 Jan 2014 00:05:17 +0000 (16:05 -0800)]
pybind/rados.py: improve error output

Fixes: 7264
When failing to load librados, output the exception.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agodoc: Removed extraneous character from path.
John Wilkins [Wed, 29 Jan 2014 22:14:29 +0000 (14:14 -0800)]
doc: Removed extraneous character from path.

Signed-off-by: John Wilkins <john.wilkins@inktank.com>
11 years agoceph_test_object_map: fix build
Sage Weil [Wed, 29 Jan 2014 16:30:27 +0000 (08:30 -0800)]
ceph_test_object_map: fix build

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1156 from ceph/wip-ceph-disk
Alfredo Deza [Wed, 29 Jan 2014 15:25:07 +0000 (07:25 -0800)]
Merge pull request #1156 from ceph/wip-ceph-disk

ceph-disk: run the right executables from udev

11 years agoMerge pull request #1148 from ceph/wip-7215-quorum-features
Sage Weil [Wed, 29 Jan 2014 15:22:19 +0000 (07:22 -0800)]
Merge pull request #1148 from ceph/wip-7215-quorum-features

Add monitor quorum features

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMerge remote-tracking branch 'gh/next'
Sage Weil [Wed, 29 Jan 2014 14:59:23 +0000 (06:59 -0800)]
Merge remote-tracking branch 'gh/next'

11 years agokeyvaluestore: name to keyvaluetore-dev for now
Sage Weil [Wed, 29 Jan 2014 14:40:29 +0000 (06:40 -0800)]
keyvaluestore: name to keyvaluetore-dev for now

This helps warn the user that the ondisk format may be subject to change.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoMerge pull request #1158 from yuyuyu101/keyvaluestore-dev
Sage Weil [Wed, 29 Jan 2014 14:38:03 +0000 (06:38 -0800)]
Merge pull request #1158 from yuyuyu101/keyvaluestore-dev

Keyvaluestore Support

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agoMake ObjectStore unit tests shared with KeyValueStore 1158/head
Haomai Wang [Wed, 29 Jan 2014 13:50:29 +0000 (21:50 +0800)]
Make ObjectStore unit tests shared with KeyValueStore

Via gtest's value-parameterized feature, let the successors of
ObjectStore share the same unit tests.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
11 years agoAdd KeyValueStore implementation
Haomai Wang [Wed, 29 Jan 2014 09:50:10 +0000 (17:50 +0800)]
Add KeyValueStore implementation

KeyValueStore is another ObjectStore implementation with FileStore. It
uses KV store wrapper(StripObjectMap) which inherited GenericObjectMap
to implement ObjectStore APIs.

Each object has a header key in KV backend, which encapsulated the metadata
of object such as size, the status of keys. A complete object data maybe spread
around multi keys. The CRUD operation of object need to access the header key
of object to know the details, then the actual data keys will be get.

Now the actual KV backend of KeyValueStore is only LevelDB, more KV backend
(RocksDB, NVM API) will be introduced in the near future.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
11 years agodocs: Typo in CloudStack user creation
Wido den Hollander [Wed, 29 Jan 2014 11:16:05 +0000 (12:16 +0100)]
docs: Typo in CloudStack user creation

11 years agodocs: Improve CloudStack documentation.
Wido den Hollander [Wed, 29 Jan 2014 10:08:08 +0000 (11:08 +0100)]
docs: Improve CloudStack documentation.

Add a section about creating a CephX user for CloudStack.

11 years agoAdd a new KV wrapper GenericObjectMap
Haomai Wang [Wed, 29 Jan 2014 09:46:00 +0000 (17:46 +0800)]
Add a new KV wrapper GenericObjectMap

Now we already have DBObjectMap which implement ObjectMap and other
interfaces, and ObjectMap.h implied that ObjectMap is used to encapsulates
the FileStore key value store. There exists limitation in current DBObjectMap
implementation, such as lacking of "coll_t" in "key", complicated prefix
hard-coded and inflexible extending.

So in order to provide a more flexible API and clear implementation to wrap KV
store, I copy the origin DBObjectMap and redesign the partial implementation.
Adding "coll_t" argument to all API and export "prefix" to callers. Prefixes
are divided into two parts "INTERN" and "USER". "INTERN" keys used by self to
manage and "USER" keys are managed by callers. Besides above, misc fixes are
imported such as more clear member function name and extendible header
structure.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
11 years agocivetweb: fix warning
Sage Weil [Wed, 29 Jan 2014 05:08:03 +0000 (21:08 -0800)]
civetweb: fix warning

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocls_user: init cls_user_list_buckets_op fields
Sage Weil [Wed, 29 Jan 2014 04:08:18 +0000 (20:08 -0800)]
cls_user: init cls_user_list_buckets_op fields

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agocls_user: init cls_user_stats fields in ctor
Sage Weil [Wed, 29 Jan 2014 04:07:00 +0000 (20:07 -0800)]
cls_user: init cls_user_stats fields in ctor

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoOSDMap: fix deepish_copy_from
Sage Weil [Wed, 29 Jan 2014 02:46:37 +0000 (18:46 -0800)]
OSDMap: fix deepish_copy_from

Start with a shallow copy!

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agoceph-disk: run the right executables from udev 1156/head
Josh Durgin [Wed, 29 Jan 2014 01:26:58 +0000 (17:26 -0800)]
ceph-disk: run the right executables from udev

When run by the udev rules, PATH is not defined. Thus,
ceph-disk-activate relies on its which() function to locate the
correct executable.  The which() function used os.defpath if none was
set, and this worked for anything using it.

ad6b4b4b08b6ef7ae8086f2be3a9ef521adaa88c added a new default value to
PATH, so only /usr/bin was checked by callers that did not use
which(). This resulted in the mount command not being found when
ceph-disk-activate was run by udev, and thus osds failing to start
after being prepared by ceph-deploy.

Make ceph-disk consistently use the existing helpers (command() and
command_check_call()) that use which(), so lack of PATH does not
matter. Simplify _check_output() to use command(),
another wrapper around subprocess.Popen.

Fixes: #7258
Signed-off-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoMerge pull request #1155 from ceph/wip-7190
Gregory Farnum [Tue, 28 Jan 2014 21:14:59 +0000 (13:14 -0800)]
Merge pull request #1155 from ceph/wip-7190

OSD: don't assume we have the pool in handle_pg_create
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoMerge pull request #1154 from ceph/wip-7169-2
Josh Durgin [Tue, 28 Jan 2014 21:13:59 +0000 (13:13 -0800)]
Merge pull request #1154 from ceph/wip-7169-2

Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
11 years agoOSD: don't assume we have the pool in handle_pg_create 1155/head
Samuel Just [Tue, 28 Jan 2014 20:46:46 +0000 (12:46 -0800)]
OSD: don't assume we have the pool in handle_pg_create

The pool may have been removed since the creation message
was sent.  Previously, role would end up as -1 and this
path would be avoided.

Fixes: 7190
Introduced in 268ae82ac3fe7b541c450aae168dcf9fa7294508
Signed-off-by: Samuel Just <sam.just@inktank.com>
11 years agoleveldb: add leveldb_* options
Sage Weil [Tue, 28 Jan 2014 20:18:15 +0000 (12:18 -0800)]
leveldb: add leveldb_* options

The osd_leveldb_* and mon_leveldb_* are now deprecated.  If they are
still used, they override these values.

Signed-off-by: Sage Weil <sage@inktank.com>
11 years agorgw: fix multipart min part size 1154/head
Yehuda Sadeh [Mon, 27 Jan 2014 22:11:43 +0000 (14:11 -0800)]
rgw: fix multipart min part size

As part of the fix for wip-7169 it turned out that we removed
min_part_size. Looking back, the original implementation was broken
anyway and didn't do anything. This fixes it and makes it configurable.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoAdd a virtual interface init, open, create_and_open to KeyValueDB
Sage Weil [Tue, 28 Jan 2014 20:14:42 +0000 (12:14 -0800)]
Add a virtual interface init, open, create_and_open to KeyValueDB

This will provide an opportunity to set leveldb_* settings in the next
patch.

Signed-off-by: Haomai Wang <haomaiwang@gmail.com>
Signed-off-by: Sage Weil <sage@inktank.com>
11 years agorgw: fix multipart upload listing
Yehuda Sadeh [Fri, 17 Jan 2014 17:30:30 +0000 (09:30 -0800)]
rgw: fix multipart upload listing

Fixes: #7169
A separate fix has been created for dumpling.

Previously we read the entire list of parts, disregarding the actual
marker and the requested max parts. This fix refactors the way we read
the list of parts (doing it in parts, using marker).

Create new upload-id format that is used to identify uploads with sorted
omap entries. Make sure we're backward compatible and handle correctly
mixed-versions rgw uploads.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoosd: OSDMonitor: ignore pgtemps from removed pool
Joao Eduardo Luis [Tue, 28 Jan 2014 15:54:33 +0000 (15:54 +0000)]
osd: OSDMonitor: ignore pgtemps from removed pool

There's a window in-between receiving an MOSDPGTemp message from an OSD
and actually handling it that may lead to the pool the pg temps refer to
no longer existing. This may happen if the MOSDPGTemp message is queued
pending dispatching due to an on-going proposal (maybe even the pool
removal).

This patch fixes such behavior in two steps:

1. Check if the pool exists in the osdmap upon preprocessing
 - if pool does not exist in the osdmap, then the pool must have been
   removed prior to handling the message, but after the osd sent it.
 - safe to ignore the pg update
2. If all pg updates in the message have been ignored, ignore the whole
   message.  Otherwise, let prepare handle the rest.

3. Recheck if pool exists in the osdmap upon prepare
 - We may have ignored this pg back in preprocess, but other pgs in the
   message may have led the message to be passed on to prepare; ignore
   pg update once more.
4. Check if pool is pending removal and ignore pg update if so.

We delegate checking the pending value to prepare_pgtemp() because in this
case we should only ignore the update IFF the pending value is in fact
committed.  Otherwise we should retry the message.  prepare_pgtemp() is
the appropriate place to do so.

Fixes: 7116
Signed-off-by: Joao Eduardo Luis <joao.luis@inktank.com>
(cherry picked from commit f513f66f48383a07c70ca18a4dba6c2449ea9860)

11 years agoMerge pull request #1153 from ceph/wip-7116-joao
Sage Weil [Tue, 28 Jan 2014 19:18:48 +0000 (11:18 -0800)]
Merge pull request #1153 from ceph/wip-7116-joao

osd: OSDMonitor: ignore pgtemps from removed pool

Reviewed-by: Sage Weil <sage@inktank.com>
11 years agobuffer: make 0-length splice() a no-op
Sage Weil [Tue, 28 Jan 2014 18:26:12 +0000 (10:26 -0800)]
buffer: make 0-length splice() a no-op

This was causing a problem in the Striper, but fixing it here will avoid
corner cases all over the tree.  Note that we have to bail out before
the end-of-buffer check to avoid hitting that check when the bufferlist is
also empty.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agotest/Makefile.am: update test_cls_rgw* rules
Yehuda Sadeh [Tue, 28 Jan 2014 18:24:40 +0000 (10:24 -0800)]
test/Makefile.am: update test_cls_rgw* rules

Need to link with libcls_user_client.a

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agotest_rgw_admin_opstate: get it compiled
Yehuda Sadeh [Tue, 28 Jan 2014 18:23:59 +0000 (10:23 -0800)]
test_rgw_admin_opstate: get it compiled

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
11 years agoMerge pull request #1137 from ceph/wip-7060
Gregory Farnum [Tue, 28 Jan 2014 18:10:41 +0000 (10:10 -0800)]
Merge pull request #1137 from ceph/wip-7060

fix #7060 mon scrub problem due to osdmap copying

Reviewed-by: Greg Farnum <greg@inktank.com>
11 years agoosdc/Striper: test zero-length add_partial_result
Sage Weil [Tue, 28 Jan 2014 18:09:17 +0000 (10:09 -0800)]
osdc/Striper: test zero-length add_partial_result

If we add a partial result that is 0-length, we used to hit an assert in
buffer::list::splice().  Add a unit test to verify the fix.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Greg Farnum <greg@inktank.com>