]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
8 years agorgw: do not abort when accept a CORS request with short origin 12398/head
LiuYang [Thu, 8 Dec 2016 06:21:43 +0000 (14:21 +0800)]
rgw: do not abort when accept a CORS request with short origin

Fixed: #18187

when accept a CROS request, the request http origin shorter than the bucket's corsrule
(eg. origin: http://s.com corsrule: <AllowedOrigin>*.verylongdomain.com</AllowedOrigin>).
the rgw_cors.cc::is_string_in_set() will have a wrong index, the radosrgw server will
abort.

$ curl http://test.localhost:8000/app.data -H "Origin:http://s.com"

 0> 2016-12-05 03:22:29.548138 7f6add05d700 -1 *** Caught signal (Aborted) **
 in thread 7f6add05d700 thread_name:civetweb-worker

 ceph version 11.0.2-2168-gd2f8fb4 (d2f8fb4a6ba75af7e6da0f5a7f1b49ec998b1631)
 1: (()+0x50720a) [0x7f6b147c420a]
 2: (()+0xf370) [0x7f6b09a33370]
 3: (gsignal()+0x37) [0x7f6b081ca1d7]
 4: (abort()+0x148) [0x7f6b081cb8c8]
 5: (__gnu_cxx::__verbose_terminate_handler()+0x165) [0x7f6b08ace9d5]
 6: (()+0x5e946) [0x7f6b08acc946]
 7: (()+0x5e973) [0x7f6b08acc973]
 8: (()+0x5eb93) [0x7f6b08accb93]
 9: (std::__throw_out_of_range(char const*)+0x77) 0x7f6b08b21a17]
 10: (()+0xbd97a) [0x7f6b08b2b97a]
 11: (()+0x449c1e) [0x7f6b14706c1e]
 12: (RGWCORSRule::is_origin_present(char const*)+0x48) [0x7f6b147073b8]
 13: (RGWCORSConfiguration::host_name_rule(char const*)+0x37) [0x7f6b147074e7]
 14: (RGWOp::generate_cors_headers(std::string&, std::string&, std::string&, std::string&, unsigned int*)+0xa3) [0x7f6b14593e63]
 15: (dump_access_control(req_state*, RGWOp*)+0x61) [0x7f6b14653f91]

Signed-off-by: LiuYang <yippeetry@gmail.com>
(cherry picked from commit 67d4d9e64bc224e047cf333e673bb22cd6290789)

8 years agoMerge pull request #11457 from tchaikov/wip-17558-hammer
Nathan Cutler [Tue, 29 Nov 2016 21:16:34 +0000 (22:16 +0100)]
Merge pull request #11457 from tchaikov/wip-17558-hammer

hammer: mon: send updated monmap to its subscribers

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
8 years agoMerge pull request #11628 from ceph/wip-hammer-11567
Nathan Cutler [Tue, 29 Nov 2016 21:12:46 +0000 (22:12 +0100)]
Merge pull request #11628 from ceph/wip-hammer-11567

hammer: rgw: Don't loop forever when reading data from 0 sized segment.

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
8 years agoMerge pull request #10437 from odivlad/fix-doc
Nathan Cutler [Thu, 24 Nov 2016 08:15:50 +0000 (09:15 +0100)]
Merge pull request #10437 from odivlad/fix-doc

hammer: docs: Bucket object versions

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
8 years agoDon't loop forever when reading data from 0 sized segment. 11628/head
Marcus Watts [Fri, 14 Oct 2016 01:12:36 +0000 (21:12 -0400)]
Don't loop forever when reading data from 0 sized segment.

The 0 sized segment can arise depending on how
the client uploads the object in the first place.
The cpu loop then happens during a swift `GET'.

Signed-off-by: Marcus Watts <mwatts@redhat.com>
(cherry picked from commit 46c5f9773246522e66bb2cca49345d0b62a16c42)

8 years agoMerge pull request #9873 from odivlad/fix-init-el7-hammer
Nathan Cutler [Wed, 23 Nov 2016 21:50:58 +0000 (22:50 +0100)]
Merge pull request #9873 from odivlad/fix-init-el7-hammer

hammer: build/ops: remove SYSTEMD_RUN from initscript

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
8 years agoMerge pull request #10238 from aiicore/hammer
Nathan Cutler [Wed, 23 Nov 2016 21:49:29 +0000 (22:49 +0100)]
Merge pull request #10238 from aiicore/hammer

hammer: mon: fix memory leak in prepare_beacon

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: John Spray <john.spray@redhat.com>
8 years agoMerge pull request #10569 from jschmid1/wip-16918-hammer
Nathan Cutler [Wed, 23 Nov 2016 21:44:19 +0000 (22:44 +0100)]
Merge pull request #10569 from jschmid1/wip-16918-hammer

hammer: build/ops: make stop.sh more portable

Reviewed-by: Nathan Cutler <ncutler@suse.com>
8 years agoMerge pull request #10724 from Vicente-Cheng/wip-16584-hammer
Nathan Cutler [Wed, 23 Nov 2016 21:40:28 +0000 (22:40 +0100)]
Merge pull request #10724 from Vicente-Cheng/wip-16584-hammer

hammer: crush: reset bucket->h.items[i] when removing tree item

Reviewed-by: Kefu Chai <kchai@redhat.com>
8 years agoMerge pull request #10904 from tchaikov/wip-14470-hammer
Nathan Cutler [Wed, 23 Nov 2016 21:20:29 +0000 (22:20 +0100)]
Merge pull request #10904 from tchaikov/wip-14470-hammer

hammer: mon: return size_t from MonitorDBStore::Transaction::size()

Reviewed-by: Joao Eduardo Luis <joao@suse.de>
Reviewed-by: Kefu Chai <kchai@redhat.com>
8 years agoMerge pull request #10905 from SUSE/wip-11101-hammer
Nathan Cutler [Wed, 23 Nov 2016 21:18:42 +0000 (22:18 +0100)]
Merge pull request #10905 from SUSE/wip-11101-hammer

hammer: build/ops: improve ceph.in error message

Reviewed-by: Sage Weil <sage@redhat.com>
8 years agoMerge pull request #10987 from Vicente-Cheng/wip-16592-hammer
Nathan Cutler [Wed, 23 Nov 2016 21:16:48 +0000 (22:16 +0100)]
Merge pull request #10987 from Vicente-Cheng/wip-16592-hammer

hammer: librbd: ceph 10.2.2 rbd status on image format 2 returns "(2) No such file or directory"

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
8 years agoMerge pull request #11125 from tchaikov/wip-17179-hammer
Nathan Cutler [Wed, 23 Nov 2016 21:13:05 +0000 (22:13 +0100)]
Merge pull request #11125 from tchaikov/wip-17179-hammer

hammer: tools: add a tool to rebuild mon store from OSD

Reviewed-by: Nathan Cutler <ncutler@suse.com>
8 years agoMerge pull request #11273 from aiicore/wip-17403-hammer
Nathan Cutler [Wed, 23 Nov 2016 21:10:54 +0000 (22:10 +0100)]
Merge pull request #11273 from aiicore/wip-17403-hammer

hammer: mon: OSDMonitor: Missing nearfull flag set

Reviewed-by: Sage Weil <sage@redhat.com>
8 years agoMerge pull request #11618 from asheplyakov/hammer-16546
Nathan Cutler [Wed, 23 Nov 2016 21:06:32 +0000 (22:06 +0100)]
Merge pull request #11618 from asheplyakov/hammer-16546

hammer: rbd: fix possible rbd data corruption

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
8 years agoMerge pull request #11676 from asheplyakov/hammer-16151
Nathan Cutler [Wed, 23 Nov 2016 20:56:22 +0000 (21:56 +0100)]
Merge pull request #11676 from asheplyakov/hammer-16151

hammer: osd: update PGPool to detect map gaps and reset cached_removed_snaps

Reviewed-by: Samuel Just <sjust@redhat.com>
8 years agoMerge pull request #11899 from SUSE/wip-17840-hammer
Nathan Cutler [Wed, 23 Nov 2016 20:54:39 +0000 (21:54 +0100)]
Merge pull request #11899 from SUSE/wip-17840-hammer

hammer: rgw: the value of total_time is wrong in the result of 'radosgw-admin log show' opt

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
8 years agoMerge pull request #11927 from SUSE/wip-17764-hammer
Nathan Cutler [Wed, 23 Nov 2016 20:53:40 +0000 (21:53 +0100)]
Merge pull request #11927 from SUSE/wip-17764-hammer

hammer: osd: fix collection_list shadow return value

Reviewed-by: Haomai Wang <haomai@xsky.com>
Reviewed-by: Samuel Just <sjust@redhat.com>
8 years agoMerge pull request #12071 from SUSE/wip-17957-hammer
Nathan Cutler [Wed, 23 Nov 2016 20:50:04 +0000 (21:50 +0100)]
Merge pull request #12071 from SUSE/wip-17957-hammer

hammer: RWLock.h: 124: FAILED assert(r == 0) in rados-jewel-distro-basic-smithi

Reviewed-by: Samuel Just <sjust@redhat.com>
8 years agoMerge pull request #11929 from SUSE/wip-17359-hammer
Nathan Cutler [Wed, 23 Nov 2016 20:47:24 +0000 (21:47 +0100)]
Merge pull request #11929 from SUSE/wip-17359-hammer

hammer: tools: ceph-objectstore-tool crashes if --journal-path <a-directory>

Reviewed-by: Kefu Chai <kchai@redhat.com>
8 years agoMerge pull request #11930 from SUSE/wip-17346-hammer
Nathan Cutler [Wed, 23 Nov 2016 20:46:08 +0000 (21:46 +0100)]
Merge pull request #11930 from SUSE/wip-17346-hammer

hammer: cephx: Fix multiple segfaults due to attempts to encrypt or decrypt

Reviewed-by: Brad Hubbard <bhubbard@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
8 years agoMerge pull request #11931 from SUSE/wip-17333-hammer
Nathan Cutler [Wed, 23 Nov 2016 20:44:39 +0000 (21:44 +0100)]
Merge pull request #11931 from SUSE/wip-17333-hammer

hammer: tools: crushtool --compile generates output despite missing item

Reviewed-by: Kefu Chai <kchai@redhat.com>
8 years agoMerge pull request #11932 from SUSE/wip-17146-hammer
Nathan Cutler [Wed, 23 Nov 2016 20:43:19 +0000 (21:43 +0100)]
Merge pull request #11932 from SUSE/wip-17146-hammer

hammer: PG::choose_acting valgrind error or ./common/hobject.h: 182: FAILED assert(!max || (*this == hobject_t(hobject_t::get_max())))

Reviewed-by: Samuel Just <sjust@redhat.com>
8 years agoMerge pull request #11933 from SUSE/wip-17142-hammer
Nathan Cutler [Wed, 23 Nov 2016 20:42:24 +0000 (21:42 +0100)]
Merge pull request #11933 from SUSE/wip-17142-hammer

hammer: osd: PG::_update_calc_stats wrong for CRUSH_ITEM_NONE up set items

Reviewed-by: Samuel Just <sjust@redhat.com>
8 years agoMerge pull request #11934 from SUSE/wip-17120-hammer
Nathan Cutler [Wed, 23 Nov 2016 20:40:47 +0000 (21:40 +0100)]
Merge pull request #11934 from SUSE/wip-17120-hammer

hammer: mon: %USED of ceph df is wrong

Reviewed-by: Kefu Chai <kchai@redhat.com>
8 years agoMerge pull request #11935 from SUSE/wip-16870-hammer
Nathan Cutler [Wed, 23 Nov 2016 20:39:12 +0000 (21:39 +0100)]
Merge pull request #11935 from SUSE/wip-16870-hammer

hammer: osd: crash on EIO during deep-scrubbing

Reviewed-by: Samuel Just <sjust@redhat.com>
8 years agoMerge pull request #11937 from SUSE/wip-16428-hammer
Nathan Cutler [Wed, 23 Nov 2016 20:33:27 +0000 (21:33 +0100)]
Merge pull request #11937 from SUSE/wip-16428-hammer

hammer: mon: prepare_pgtemp needs to only update up_thru if newer than the existing one

Reviewed-by: Samuel Just <sjust@redhat.com>
8 years agoMerge pull request #11938 from SUSE/wip-14323-hammer
Nathan Cutler [Wed, 23 Nov 2016 20:31:15 +0000 (21:31 +0100)]
Merge pull request #11938 from SUSE/wip-14323-hammer

hammer: msg: OpTracker needs to release the message throttle in _unregistered

Reviewed-by: Samuel Just <sjust@redhat.com>
8 years agoMerge pull request #11939 from SUSE/wip-13927-hammer
Nathan Cutler [Wed, 23 Nov 2016 20:29:45 +0000 (21:29 +0100)]
Merge pull request #11939 from SUSE/wip-13927-hammer

hammer: mds: fix cephfs-java ftruncate unit test failure

Reviewed-by: John Spray <john.spray@redhat.com>
8 years agorgw: doc: Mark S3 object version API as supported 10437/head
Yuan Zhou [Mon, 20 Jul 2015 07:37:09 +0000 (15:37 +0800)]
rgw: doc: Mark S3 object version API as supported

S3 object version is already in since Hammer.
Ref: http://marc.info/?l=ceph-devel&m=143715290627682

Signed-off-by: Yuan Zhou <yuan.zhou@intel.com>
(cherry picked from commit b62c3b9537e8ab33416a7fb0dd7b801a790d42ee)

8 years agodoc: add bucket object version description.
shawn [Thu, 30 Jul 2015 02:09:12 +0000 (10:09 +0800)]
doc: add bucket object version description.
bucket object version has been supported, but do not have description in the docs,
so add this part.

Signed-off-by: shawn chen <cxwshawn@gmail.com>
(cherry picked from commit 5c395ff85627f0f4154af27aff03dd0a9c409fb4)

8 years agoMerge pull request #11946 from SUSE/wip-17883-hammer
Nathan Cutler [Wed, 23 Nov 2016 09:52:43 +0000 (10:52 +0100)]
Merge pull request #11946 from SUSE/wip-17883-hammer

hammer: mon: OSDs marked OUT wrongly after monitor failover

Reviewed-by: Kefu Chai <kchai@redhat.com>
8 years agoMerge pull request #11948 from SUSE/wip-17671-hammer
Nathan Cutler [Wed, 23 Nov 2016 09:51:51 +0000 (10:51 +0100)]
Merge pull request #11948 from SUSE/wip-17671-hammer

hammer: rbd: export diff should open image as read-only

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
8 years agoMerge pull request #11949 from SUSE/wip-17374-hammer
Nathan Cutler [Wed, 23 Nov 2016 09:48:06 +0000 (10:48 +0100)]
Merge pull request #11949 from SUSE/wip-17374-hammer

hammer: librbd: image.stat() call in librbdpy fails sometimes

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
8 years agoMerge pull request #11950 from SUSE/wip-17123-hammer
Nathan Cutler [Wed, 23 Nov 2016 09:41:03 +0000 (10:41 +0100)]
Merge pull request #11950 from SUSE/wip-17123-hammer

hammer: rgw: COPY broke multipart files uploaded under dumpling

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
8 years agoMerge pull request #11951 from SUSE/wip-16594-hammer
Nathan Cutler [Wed, 23 Nov 2016 09:39:46 +0000 (10:39 +0100)]
Merge pull request #11951 from SUSE/wip-16594-hammer

hammer: rgw: swift: ranged request on a DLO provides wrong values in Content-Range HTTP header

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
8 years agoMerge pull request #11952 from SUSE/wip-16318-hammer
Nathan Cutler [Wed, 23 Nov 2016 09:17:00 +0000 (10:17 +0100)]
Merge pull request #11952 from SUSE/wip-16318-hammer

hammer: rgw: fix inconsistent uid/email handling in radosgw-admin

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
8 years agoMerge pull request #12018 from trociny/wip-17068-hammer
Nathan Cutler [Wed, 23 Nov 2016 09:14:10 +0000 (10:14 +0100)]
Merge pull request #12018 from trociny/wip-17068-hammer

hammer: librbd: request exclusive lock if current owner cannot execute op

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
8 years agoMerge pull request #11045 from SUSE/wip-17150-hammer
Nathan Cutler [Wed, 23 Nov 2016 05:42:06 +0000 (06:42 +0100)]
Merge pull request #11045 from SUSE/wip-17150-hammer

hammer: rgw: Anonymous user is able to read bucket with authenticated read ACL

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
8 years agoMerge pull request #11809 from SUSE/wip-17631-hammer
Nathan Cutler [Wed, 23 Nov 2016 05:32:09 +0000 (06:32 +0100)]
Merge pull request #11809 from SUSE/wip-17631-hammer

hammer: rgw: fix crash when client posts object with null condition

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
8 years agoPendingReleaseNotes: document the feature to rebuild monstore 11125/head
Kefu Chai [Tue, 22 Nov 2016 03:53:57 +0000 (11:53 +0800)]
PendingReleaseNotes: document the feature to rebuild monstore

Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agodoc: fill keyring with caps before passing it to ceph-monstore-tool
Kefu Chai [Mon, 10 Oct 2016 10:43:39 +0000 (18:43 +0800)]
doc: fill keyring with caps before passing it to ceph-monstore-tool

to make sure the recovered monitor store is ready for use.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit af8e21163735377071b6832d8a81b035bb835257)

8 years agotools/ceph_monstore_tool: bail out if no caps found for a key
Kefu Chai [Mon, 10 Oct 2016 08:32:27 +0000 (16:32 +0800)]
tools/ceph_monstore_tool: bail out if no caps found for a key

we take it as an error if no caps is granted to an entity in the
specified keyring file when rebuilding the monitor db.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit b4bd4004a836121c11b0bb97d8123df54c271f04)

8 years agotools/ceph_monstore_tool: update pgmap_meta also when rebuilding store.db
Kefu Chai [Fri, 30 Sep 2016 09:58:14 +0000 (17:58 +0800)]
tools/ceph_monstore_tool: update pgmap_meta also when rebuilding store.db

we should rebuild pgmap_meta table from the collected osdmaps

Fixes: http://tracker.ceph.com/issues/17400
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit cdfa7a69f63d047205dcfccd63b5d58ab0d4695b)
Conflicts:
src/tools/ceph_monstore_tool.cc: remove C++11-ism

8 years agotools/rebuild_mondb: kill compiling warning
xie xingguo [Sun, 18 Sep 2016 03:40:56 +0000 (11:40 +0800)]
tools/rebuild_mondb: kill compiling warning

As follow:

[ 72%] Building CXX object src/tools/CMakeFiles/ceph-objectstore-tool.dir/RadosDump.cc.o
/home/jenkins-build/build/workspace/ceph-pull-requests/src/tools/rebuild_mondb.cc: In function ‘int update_mon_db(ObjectStore&, OSDSuperblock&, const string&, const string&)’:
/home/jenkins-build/build/workspace/ceph-pull-requests/src/tools/rebuild_mondb.cc:289:22: warning: ‘crc’ may be used uninitialized in this function [-Wmaybe-uninitialized]
         if (have_crc && osdmap.get_crc() != crc) {
                      ^
/home/jenkins-build/build/workspace/ceph-pull-requests/src/tools/rebuild_mondb.cc:238:14: note: ‘crc’ was declared here
     uint32_t crc;

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit f16a31476a3f9b44a7c3dabf0dfd2a0d015b11b9)

8 years agotools/rebuild_mondb: return error if ondisk version of pg_info is incompatible
xie xingguo [Sun, 18 Sep 2016 02:43:10 +0000 (10:43 +0800)]
tools/rebuild_mondb: return error if ondisk version of pg_info is incompatible

In this case "r" will be >= 0 and caller will be able to catch
this kind of error.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit ac7c1dca0a4f6e92e50d362784122e2d3200e6b5)

8 years agotools/rebuild_mondb: avoid unnecessary result code cast
xie xingguo [Sun, 18 Sep 2016 02:33:56 +0000 (10:33 +0800)]
tools/rebuild_mondb: avoid unnecessary result code cast

In general we return negative codes for error cases, so there is
no need perform the cast here.

Signed-off-by: xie xingguo <xie.xingguo@zte.com.cn>
(cherry picked from commit 6a1c01d334fe65124043aa68a6e0cfaea43836b5)

8 years agodoc: add rados/operations/disaster-recovery.rst
Kefu Chai [Tue, 30 Aug 2016 16:59:58 +0000 (00:59 +0800)]
doc: add rados/operations/disaster-recovery.rst

document the process to recover from leveldb corruption.

Fixes: http://tracker.ceph.com/issues/17179
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 79a9f299253e24d20547131b3c9c9e0667e3b869)

8 years agotools/ceph_monstore_tool: add "rebuild" command
Kefu Chai [Mon, 29 Aug 2016 11:53:11 +0000 (19:53 +0800)]
tools/ceph_monstore_tool: add "rebuild" command

Fixes: http://tracker.ceph.com/issues/17179
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit d909fa035c8fbbded786b2ca072acc10ea6b6052)

Conflicts:
ceph_monstore_tool.cc: remove C++11ish

8 years agotools/ceph-objectstore-tool: add "update-mon-db" command
Kefu Chai [Mon, 29 Aug 2016 11:52:19 +0000 (19:52 +0800)]
tools/ceph-objectstore-tool: add "update-mon-db" command

Fixes: http://tracker.ceph.com/issues/17179
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 24faea7ce446bbf09cbd4a9d3434dd5444a6c295)

Conflicts:
src/tools/Makefile-server.am: add rebuild_mondb.{cc,h}, as autotools
          support is dropped in master
ceph_objectstore_tool.cc, rebuild_mondb.cc: remove C++11ish
          adapt to hammer

8 years agomon/AuthMonitor: make AuthMonitor::IncType public
Kefu Chai [Wed, 31 Aug 2016 05:11:24 +0000 (13:11 +0800)]
mon/AuthMonitor: make AuthMonitor::IncType public

so ceph-objectstore-tool is able to use it when rebuilding monitor
db.

Fixes: http://tracker.ceph.com/issues/17179
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 19ef4f16b3aba04119ac647cd6261c74a57ce829)

8 years agohammer: ObjectCacher: fix bh_read_finish offset logic 11618/head
Greg Farnum [Mon, 23 May 2016 22:14:21 +0000 (15:14 -0700)]
hammer: ObjectCacher: fix bh_read_finish offset logic

If we have an incoming read split across multiple BufferHeads, we want to
line up the BufferHead's bl with the incoming OSDOp's bl at the right offset. We
were erroneously using this nonsense calculation (always equal to zero!) when
a much simpler comparison of the BufferHead's logical object offset to the
incoming OSDOp's logical offset will do the trick nicely.

Fixes: http://tracker.ceph.com/issues/16002
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 9ec6e7f608608088d51e449c9d375844631dcdde)

8 years agohammer: test: build a correctness test for the ObjectCacher
Greg Farnum [Sat, 11 Jun 2016 00:01:09 +0000 (17:01 -0700)]
hammer: test: build a correctness test for the ObjectCacher

For now it's very specifically designed to reproduce
http://tracker.ceph.com/issues/16002, but it can
be extended to other patterns in the future.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit 0fd55a9886dd8da344c23a5e9898ee5c5061e8f9)

Hammer specific changes:

* use utime_t instead of ceph::real_time
* ObjectCacher::prepare_write() has no journal_tid argument
* rewrite the code in C++98

8 years agohammer: test: split objectcacher test into 'stress' and 'correctness'
Greg Farnum [Tue, 31 May 2016 23:18:19 +0000 (16:18 -0700)]
hammer: test: split objectcacher test into 'stress' and 'correctness'

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit cc9aab1b0a22c3f7320046b97f75dccf2b86cc6d)

8 years agohammer: test: add a data-storing MemWriteback for testing ObjectCacher
Greg Farnum [Thu, 23 Jun 2016 20:41:46 +0000 (13:41 -0700)]
hammer: test: add a data-storing MemWriteback for testing ObjectCacher

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit ed5801492bf2850e80a328ce5a61cb1ff2709215)

Hammer specific changes:

* use utime_t instead of ceph::real_time
* ObjectCacher::prepare_write() has no journal_tid argument
* rewrite code in C++98

8 years agohammer: objectcacher: introduce ObjectCacher::flush_all()
Yan, Zheng [Wed, 28 Oct 2015 09:06:59 +0000 (17:06 +0800)]
hammer: objectcacher: introduce ObjectCacher::flush_all()

Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit bd86c301a54a6e23cf2ce257b8024b6b92dfbe11)

Conflicts:
src/osdc/ObjectCacher.h - whitespace only changes

Semantic conflicts:
        ObjectCacher::flush_all(): dirty_or_tx_bh is a set<BufferHead *>
in Hammer

8 years agohammer: osd: provide some contents on ObjectExtent usage in testing
Greg Farnum [Thu, 23 Jun 2016 21:23:51 +0000 (14:23 -0700)]
hammer: osd: provide some contents on ObjectExtent usage in testing

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
(cherry picked from commit a555d9a0c7d3b6c2206520cf78445234b0834639)

8 years agostop.sh: make more portable 10569/head
Mykola Golub [Mon, 14 Dec 2015 09:41:10 +0000 (09:41 +0000)]
stop.sh: make more portable

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit 27f2d806f905df1a51b11bd79f1af4c26471407a)

8 years agoMerge pull request #12006 from SUSE/wip-17905-hammer
Sage Weil [Mon, 21 Nov 2016 15:03:44 +0000 (09:03 -0600)]
Merge pull request #12006 from SUSE/wip-17905-hammer

hammer: mon: MonmapMonitor should return success when MON will be removed

Reviewed-by: Sage Weil <sage@redhat.com>
8 years agoceph.in: improve the error message 10905/head
Kefu Chai [Tue, 5 Jan 2016 07:00:59 +0000 (15:00 +0800)]
ceph.in: improve the error message

Fixes: #11101
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit e19e8f1553fdf8b6b642d3222d28f242fab696f0)

8 years agoos/ObjectStore: fix _update_op for split dest_cid 12071/head
Sage Weil [Tue, 29 Mar 2016 19:24:34 +0000 (15:24 -0400)]
os/ObjectStore: fix _update_op for split dest_cid

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

8 years agomon/MDSMonitor: fix memory leak in prepare_beacon 10238/head
Igor Podoski [Mon, 11 Jul 2016 10:37:25 +0000 (12:37 +0200)]
mon/MDSMonitor: fix memory leak in prepare_beacon

prepare_beacon() case of prepare_update() should put()
message in two more cases, because is the last step
of dispatch()

Fixes: http://tracker.ceph.com/issues/17285
Signed-off-by: Igor Podoski <igor.podoski@ts.fujitsu.com>
8 years agomon: OSDMonitor: Missing nearfull flag set 11273/head
Igor Podoski [Wed, 14 Sep 2016 11:36:43 +0000 (07:36 -0400)]
mon: OSDMonitor: Missing nearfull flag set

Output from 'ceph -s -f json-pretty' wans't showing nearfull flag set.

Signed-off-by: Igor Podoski <igor.podoski@ts.fujitsu.com>
(cherry picked from commit 754887b575795ef96cda095f7f0d8c898e20f00f)

8 years agomon: send updated monmap to its subscribers 11457/head
Kefu Chai [Thu, 13 Oct 2016 05:19:27 +0000 (13:19 +0800)]
mon: send updated monmap to its subscribers

prior to this change, we sends monmap when serving the subscription
requests, but the updates are not sent to the subscribers anymore.
so we need to send latest monmap to subscribes and update the
subscription status accordingly when the monmap is updated.

http://tracker.ceph.com/issues/17558
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit c2b348b12c47ba505f72228ae0ea9b1a1b674719)
Conflicts:
src/mon/Monitor.cc: resolve conflicts
src/mon/MonmapMonitor.cc: remove C++11-ism

8 years agorbd: this command should be EXPORT_DIFF 11948/head
YankunLi [Tue, 6 Sep 2016 08:16:58 +0000 (16:16 +0800)]
rbd: this command should be EXPORT_DIFF

Fixes: http://tracker.ceph.com/issues/17671
Signed-off-by: liyankun <lioveni99@gmail.com>
8 years agomon: update mon(peon)'s down_pending_out when osd up 11946/head
Dong Wu [Thu, 27 Oct 2016 03:02:36 +0000 (11:02 +0800)]
mon: update mon(peon)'s down_pending_out when osd up

Fixes: http://tracker.ceph.com/issues/17719
Signed-off-by: Dong Wu <archer.wudong@gmail.com>
(cherry picked from commit 664254a17afbad86983ea5b5b8d385662d89e65e)

Conflicts:
    src/mon/OSDMonitor.cc (auto declaration for variable "found" is a C++11ism,
        replace with the full verbose C++98 type)

8 years agolibrbd: request exclusive lock if current owner cannot execute op 12018/head
Mykola Golub [Wed, 16 Nov 2016 10:01:00 +0000 (12:01 +0200)]
librbd: request exclusive lock if current owner cannot execute op

This is a direct commit to hammer due to librbd code has evolved
significantly in the master.

Fixes: http://tracker.ceph.com/issues/17068
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
8 years agocrush: reset bucket->h.items[i] when removing tree item 10724/head
Kefu Chai [Fri, 1 Jul 2016 12:44:35 +0000 (20:44 +0800)]
crush: reset bucket->h.items[i] when removing tree item

* crush: so we don't see the reference after the removing, this keeps
  check_item_loc() happy, and move_bucket() use check_item_loc() to see if
  the removed bucket disappears after the removal.
* test: also add unittest_crush_wrapper::CrushWrapper.insert_item

Fixes: http://tracker.ceph.com/issues/16525
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit a7069c7aab6b3f605f3d8f909af96f87977e8698)

Backport change: modify some codes that only works on c++ 11

8 years agomon: MonmapMonitor: return success when monitor will be removed 12006/head
Joao Eduardo Luis [Wed, 2 Nov 2016 15:33:52 +0000 (15:33 +0000)]
mon: MonmapMonitor: return success when monitor will be removed

Fixes: http://tracker.ceph.com/issues/17725
Signed-off-by: Joao Eduardo Luis <joao@suse.de>
(cherry picked from commit c9d46cfbf2512bc3495c6901de2b8f711bef9bae)

Conflicts:
src/mon/MonmapMonitor.cc (just inserted the "err = 0" assignment
        immediately after the error message line)

8 years agolibrbd: prevent creation of v2 image ids that are too large 10987/head
Jason Dillaman [Fri, 5 Aug 2016 00:40:10 +0000 (20:40 -0400)]
librbd: prevent creation of v2 image ids that are too large

The librbd API is capped at 24 characters for expressing the
object prefix for data blocks (including trailing null byte).

Fixes: http://tracker.ceph.com/issues/16887
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 4de7c8d0a7222c83268d03b99015c6b9d25f124d)

8 years agoPG: update PGPool to detect map gaps and reset cached_removed_snaps 11676/head
Samuel Just [Thu, 19 May 2016 23:00:35 +0000 (16:00 -0700)]
PG: update PGPool to detect map gaps and reset cached_removed_snaps

Fixes: http://tracker.ceph.com/issues/15943
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 5798fb3bf6d726d14a9c5cb99dc5902eba5b878a)

Conflicts:
src/osd/OSD.cc: trivial, fuzz is too big so git prefers to be safe

8 years agorgw-admin: return error on email address conflict (add user) 11952/head
Matt Benjamin [Mon, 18 Jan 2016 20:58:07 +0000 (15:58 -0500)]
rgw-admin: return error on email address conflict (add user)

Fixes the error return inconsistency documented in upstream
Ceph issue #13598

Revised after upstream review, permits changing email address as
originally (but use case-insensitive comp).

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit 90c143efa2156e55dc017ebe81005315cacaf2c5)

Conflicts:
src/rgw/rgw_user.cc (there is no op_state.found_by_email
        conditional in hammer)

8 years agorgw-admin: convert user email addresses to lower case
Matt Benjamin [Mon, 18 Jan 2016 20:06:19 +0000 (15:06 -0500)]
rgw-admin: convert user email addresses to lower case

Fixes the email address inconsistency documented in upstream
Ceph BUG #13598

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit 4c438dbbc0e6eda6b9a3018d60019a1a780d6f65)

8 years agorgw: fix wrong length in Content-Range HTTP header of Swift's DLO. 11951/head
Radoslaw Zarzynski [Mon, 12 Oct 2015 16:43:27 +0000 (18:43 +0200)]
rgw: fix wrong length in Content-Range HTTP header of Swift's DLO.

Fixes: #13452
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
(cherry picked from commit b48f3d774129e0b37531fccda513626bd8ef07e5)

8 years agorgw: fix wrong first byte pos in Content-Range HTTP header of Swift's DLO.
Radoslaw Zarzynski [Mon, 12 Oct 2015 15:32:21 +0000 (17:32 +0200)]
rgw: fix wrong first byte pos in Content-Range HTTP header of Swift's DLO.

Fixes: #13452
Signed-off-by: Radoslaw Zarzynski <rzarzynski@mirantis.com>
(cherry picked from commit 66f47f35bbb4966cb289811672938b90ae6d44ae)

8 years agorgw: adjust manifest head object 11950/head
Yehuda Sadeh [Fri, 8 Jul 2016 01:01:54 +0000 (18:01 -0700)]
rgw: adjust manifest head object

adjust the manifest head object:
 - when reading manifest, set the head object to the object
   we read the manifest from (and its size). Some manifests are
   broken and point at a different object
 - when copying multipart object, set the manifest head object to
   point at the new head object

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 419264586fc46337322f0d60b0ffcdcce3bb5c5a)

8 years agorgw: adjust objs when copying obj with explicit_objs set
Yehuda Sadeh [Thu, 7 Jul 2016 22:49:07 +0000 (15:49 -0700)]
rgw: adjust objs when copying obj with explicit_objs set

If the head object contains data, need to set it in the list of
objs (in addition to being pointed at by head_obj).

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 1e012112b99004745952accc6fb11ada5e8e0045)

8 years agorgw: patch manifest to handle explicit objs copy issue
Yehuda Sadeh [Thu, 7 Jul 2016 22:36:33 +0000 (15:36 -0700)]
rgw: patch manifest to handle explicit objs copy issue

Fixes: http://tracker.ceph.com/issues/16435
Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit b51476466e5bb03bbaa6e428bb6bb189a259b9fd)

8 years agolibrbd: block name prefix might overflow fixed size C-string 11949/head
Jason Dillaman [Tue, 20 Sep 2016 11:25:36 +0000 (07:25 -0400)]
librbd: block name prefix might overflow fixed size C-string

The issue which resulted in too large v2 image ids was fixed
under #16887.

Fixes: http://tracker.ceph.com/issues/17310
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 61734d266c6ee476c2f5fcfbbaefc7d0c7939617)

8 years agoOpRequest: release the message throttle when unregistered 11938/head
Samuel Just [Wed, 6 Jan 2016 00:24:15 +0000 (16:24 -0800)]
OpRequest: release the message throttle when unregistered

We don't want messages in the OpTracker history hanging on to
message throttle.

Fixes: #14248
Backport: hammer, firefly
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 67be35cba7c384353b0b6d49284a4ead94c4152e)

Conflicts:
    src/msg/Message.h (s/nullptr/0/ because C++98)

8 years agoOSDMonitor::prepare_pgtemp: only update up_thru if newer 11937/head
Samuel Just [Wed, 8 Jun 2016 00:15:05 +0000 (17:15 -0700)]
OSDMonitor::prepare_pgtemp: only update up_thru if newer

Fixes: http://tracker.ceph.com/issues/16185
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 5f2bd7b6b28aad96d68444b22c04b8b24564616b)

Conflicts:
src/mon/OSDMonitor.cc (master uses C++11 "auto" for new_up_thru
        iterator, replace with explicit type)
src/mon/OSDMonitor.h (trivial resolution)

8 years agocrush/CrushCompiler: error out as long as parse fails 11931/head
Kefu Chai [Tue, 20 Sep 2016 06:10:16 +0000 (14:10 +0800)]
crush/CrushCompiler: error out as long as parse fails

do not output compiled crush map if anything goes wrong when parsing
crush map.

Fixes: http://tracker.ceph.com/issues/17306
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit b2c0a079dc074c907e1bc429861230096534f597)

Conflicts:
    src/test/cli/crushtool/compile-decompile-recompile.t (hammer needs $TESTDIR/ prefix)

8 years agomds: fix out-of-order messages 11939/head
Yan, Zheng [Mon, 30 Mar 2015 09:35:59 +0000 (17:35 +0800)]
mds: fix out-of-order messages

When MDS is no longer laggy, it should process deferred messages
first, then process newly received messages.

Fix: #11258
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit ccdeaf87df8b66e09f6b20950b57ac61bf213086)

8 years agopg: restore correct behavior of read() callers 11935/head
Nathan Cutler [Sat, 12 Nov 2016 11:37:00 +0000 (12:37 +0100)]
pg: restore correct behavior of read() callers

This patch is inspired by fabd6357e42e526d2704d7cb80375c12d731df8d but is not a
cherry-pick.

Fixes: http://tracker.ceph.com/issues/16870
Signed-off-by: Nathan Cutler <ncutler@suse.com>
8 years agomon/PGMonitor: calc the %USED of pool using used/(used+avail) 11934/head
Kefu Chai [Fri, 5 Aug 2016 06:27:43 +0000 (14:27 +0800)]
mon/PGMonitor: calc the %USED of pool using used/(used+avail)

we were using
"the raw space used by this pool" / "the raw space of the whole cluster"
as the %USED. but it's wrong:

- there is chance that not all OSDs are assigned to the pool in question
- we can not utilize all the raw space for the pool: there is overhead.
  and the size of available space for a pool is capped by the assigned
  OSD with minimal free space.

so we should use
 USED / (USED + AVAIL)
as the %USED. so once we have no AVAIL space left, %USED will be 100%.

Fixes: http://tracker.ceph.com/issues/16933
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 08532ea166dfd97c548d9f1fb478e163021cdda3)

Conflicts:
src/test/mon/CMakeLists.txt (file does not exist in hammer)

8 years agomon/PGMonitor: mark dump_object_stat_sum() as static
Kefu Chai [Sat, 6 Aug 2016 16:58:04 +0000 (00:58 +0800)]
mon/PGMonitor: mark dump_object_stat_sum() as static

so we can test this method without create an instance of PGMonitor.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit af3d3e25823ca9b40ddf09835edb82795ac68f33)

Conflicts:
src/mon/PGMonitor.cc ("const" suffix of function definition was removed
            in master, but in hammer it wasn't there, so no change necessary)
src/mon/PGMonitor.h (added static prefix to function declaration; did
            not remove "const" suffix because it wasn't there in hammer)

8 years agoPG: use upset rather than up for _update_calc_stats 11933/head
Samuel Just [Thu, 11 Aug 2016 15:57:51 +0000 (08:57 -0700)]
PG: use upset rather than up for _update_calc_stats

Fixes: http://tracker.ceph.com/issues/16998
Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 200cae8c9db99b3dede377f74413cc0b15033e1f)

8 years agoPG: introduce and maintain upset
Samuel Just [Thu, 11 Aug 2016 15:57:35 +0000 (08:57 -0700)]
PG: introduce and maintain upset

Signed-off-by: Samuel Just <sjust@redhat.com>
(cherry picked from commit 80a5c21d97116e7a66351a0e1f5d9b561f8663ac)

8 years agoCleanup: delete find_best_info again 11932/head
Tao Chang [Mon, 9 May 2016 13:50:17 +0000 (09:50 -0400)]
Cleanup: delete find_best_info again

After called find_best_info find a auth_pg_shard, it must be not incomplete,
so it will not enter find_best_info again.

Signed-off-by: Tao Chang <changtao@hihuron.com>
(cherry picked from commit a25cfc4d46c03d8d78e0254c728ea5c29e2246e1)

Conflicts:
src/osd/PG.cc (trivial resolution)

8 years agocephx: Fix multiple segfaults due to attempts to encrypt or decrypt 11930/head
Brad Hubbard [Tue, 14 Jun 2016 07:34:44 +0000 (17:34 +1000)]
cephx: Fix multiple segfaults due to attempts to encrypt or decrypt
an empty secret and a null CryptoKeyHandler

Fixes: http://tracker.ceph.com/issues/16266
Signed-off-by: Brad Hubbard <bhubbard@redhat.com>
(cherry picked from commit 009e777fbd18602e5fd66f97bdad95e977e6fecc)

8 years agoos/filestore/FileJournal: fail out if FileJournal is not block device or regular... 11929/head
Kefu Chai [Tue, 20 Sep 2016 09:39:24 +0000 (17:39 +0800)]
os/filestore/FileJournal: fail out if FileJournal is not block device or regular file

otherwise JournalingFileStore will assert when deleting FileJournal
which still has the non block/regular file opened.

Fixes: http://tracker.ceph.com/issues/17307
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 7431eec6fd24cd08ca6c76a9893e3f6e8c63a916)

8 years agoosd/PGBackend: fix collection_list shadow return value 11927/head
Haomai Wang [Sun, 9 Oct 2016 10:31:54 +0000 (18:31 +0800)]
osd/PGBackend: fix collection_list shadow return value

Fixes: http://tracker.ceph.com/issues/17713
Signed-off-by: Haomai Wang <haomai@xsky.com>
(cherry picked from commit 8a53a604f375eb568a6fc88a402a6afd83fa151a)

Conflicts:
src/osd/PGBackend.cc (master is using store->collection_list and ch;
            hammer is using store->collection_list_partial and coll)

8 years ago13207: Rados Gateway: Anonymous user is able to read bucket with authenticated read ACL 11045/head
root [Wed, 23 Sep 2015 18:51:13 +0000 (00:21 +0530)]
13207: Rados Gateway: Anonymous user is able to read bucket with authenticated read ACL

Signed-off-by: root <rahul.1aggarwal@gmail.com>
(cherry picked from commit 99ba6610a8f437604cadf68cbe9969def893e870)

8 years agorgw: fix the field 'total_time' of log entry in log show opt 11899/head
weiqiaomiao [Tue, 11 Oct 2016 11:32:43 +0000 (19:32 +0800)]
rgw: fix the field 'total_time'  of log entry in log show opt

Fixes: http://tracker.ceph.com/issues/17598
Signed-off-by: weiqiaomiao <wei.qiaomiao@zte.com.cn>
(cherry picked from commit 8f4825c5f012c77a3a91e22706dcab9c6067d77e)

8 years agorgw: handle empty POST condition 11809/head
Yehuda Sadeh [Thu, 20 Oct 2016 17:17:36 +0000 (10:17 -0700)]
rgw: handle empty POST condition

Fixes: http://tracker.ceph.com/issues/17635
Before accessing json entity, need to check that iterator is valid.
If there is no entry return appropriate error code.

Signed-off-by: Yehuda Sadeh <yehuda@redhat.com>
(cherry picked from commit 23cb642243e09ca4a8e104f62a3bb7b2cbb6ea12)

8 years agoinit-radosgw: do not use systemd-run in sysvinit 9873/head
Vladislav Odintsov [Mon, 4 Jul 2016 12:29:22 +0000 (15:29 +0300)]
init-radosgw: do not use systemd-run in sysvinit

`systemd-run` logic in initscripts was introduced because of ticket
http://tracker.ceph.com/issues/7627.

If we have systemd-based operating system, we should use systemd unit files
from systemd directory to start/stop ceph daemons.
Otherwise, `daemon()` from `/etc/init.d/functions` on systemd distro starts service
in `system.slice` and everything works well.

`systemd-run` can not be run on non-systemd distros, so it's not needed
on SysV systems.

also, ceph-disk is now able to run the "systemctl"
to enable and start the ceph-osd, and ceph-deploy is also now
playing well with systemd when it comes to ceph-mon and ceph-mds

Fixes: http://tracker.ceph.com/issues/16440
Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
(cherry picked from commit 1fd4f92a025e80092b8d08d9b7da2e0b73a52f0f)

8 years agoMerge pull request #11372 from ceph/wip-17386-hammer
Loic Dachary [Sat, 29 Oct 2016 08:24:18 +0000 (10:24 +0200)]
Merge pull request #11372 from ceph/wip-17386-hammer

hammer: doc: add "Upgrading to Hammer" section

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
8 years agodoc: add "to Hammer" upgrade section 11372/head
Kefu Chai [Thu, 27 Oct 2016 07:44:09 +0000 (15:44 +0800)]
doc: add "to Hammer" upgrade section

Fixes: http://tracker.ceph.com/issues/17534
Signed-off-by: Kefu Chai <kchai@redhat.com>
8 years agoMerge pull request #11253 from ceph/wip-offline-split-hammer2
Josh Durgin [Fri, 30 Sep 2016 04:34:26 +0000 (21:34 -0700)]
Merge pull request #11253 from ceph/wip-offline-split-hammer2

ceph-objectstore-tool: add a way to split filestore directories offline

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
8 years agoceph-objectstore-tool: add a way to split filestore directories offline 11253/head
Josh Durgin [Fri, 5 Aug 2016 18:45:00 +0000 (11:45 -0700)]
ceph-objectstore-tool: add a way to split filestore directories offline

Use the usual split code, and split each dir that meets the
usual split criteria.

This can be run with lower than usual split settings, to avoid costly
online splits. To make sure the directories are not merged again, use
a load merge threshold (e.g. filestore merge threshold = 1), and
adjust the split multiplier accordingly.

Fixes: http://tracker.ceph.com/issues/17220
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
(cherry picked from commit e7b0428e0e8d8f5459311dc698d94a3ac4f04684)

Conflicts:
src/tools/ceph_objectstore_tool.cc
* remove c++11 auto usage
* change HashIndex::list_subdirs() call to use set instead of vector
* adjust to hammer signature of coll_t::is_pg()