ceph.git
7 years agoMerge pull request #13143 from linuxbox2/jewel-mdw-rgw-lf jewel-next
Nathan Cutler [Wed, 1 Feb 2017 22:28:22 +0000 (23:28 +0100)]
Merge pull request #13143 from linuxbox2/jewel-mdw-rgw-lf

jewel: rgw: radosgw/swift: clean up flush / newline behavior.

Reviewed-by: Nathan Cutler <ncutler@suse.com>
7 years agoradosgw/swift: clean up flush / newline behavior. 13143/head
Marcus Watts [Wed, 11 Jan 2017 05:06:15 +0000 (00:06 -0500)]
radosgw/swift: clean up flush / newline behavior.

The current code emits a newline after swift errors, but fails
to account for it when it calculates 'content-length'.  This results in
some clients (go github.com/ncw/swift) producing complaints about the
unsolicited newline such as this,
Unsolicited response received on idle HTTP channel starting with "\n"; err=<nil>

This logic eliminates the newline on flush.  This makes the content length
calculation correct and eliminates the stray newline.

There was already existing separator logic in the rgw plain formatter
that can emit a newline at the correct point.  It had been checking
"len" to decide if previous data had been emitted, but that's reset to 0
by flush().  So, this logic adds a new per-instance variable to separately
track state that it emitted a previous item (and should emit a newline).

Fixes: http://tracker.ceph.com/issues/18473
Signed-off-by: Marcus Watts <mwatts@redhat.com>
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit 5f229d6a33eae4906f22cdb90941835e47ee9f02)

7 years agoMerge pull request #11865 from dachary/wip-17710-jewel
Yehuda Sadeh [Thu, 8 Dec 2016 19:22:16 +0000 (11:22 -0800)]
Merge pull request #11865 from dachary/wip-17710-jewel

jewel: multisite: race between ReadSyncStatus and InitSyncStatus leads to EIO errors

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
7 years agoMerge pull request #12033 from dachary/wip-17926-jewel
Loic Dachary [Tue, 6 Dec 2016 14:54:45 +0000 (15:54 +0100)]
Merge pull request #12033 from dachary/wip-17926-jewel

jewel: ceph-disk --dmcrypt create must not require admin key

Reviewed-by: Loic Dachary <ldachary@redhat.com>
7 years agoMerge pull request #11968 from ddiss/jewel_next_flush_evict_snaps
Loic Dachary [Tue, 6 Dec 2016 08:47:07 +0000 (09:47 +0100)]
Merge pull request #11968 from ddiss/jewel_next_flush_evict_snaps

jewel: tools: snapshotted RBD extent objects can't be manually evicted from a cache tier

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #12151 from dachary/wip-18011-jewel
Loic Dachary [Tue, 6 Dec 2016 08:46:01 +0000 (09:46 +0100)]
Merge pull request #12151 from dachary/wip-18011-jewel

jewel: test fails due to The UNIX domain socket path

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #12296 from SUSE/wip-18133-jewel
Loic Dachary [Tue, 6 Dec 2016 08:45:26 +0000 (09:45 +0100)]
Merge pull request #12296 from SUSE/wip-18133-jewel

jewel: build/ops: fix undefined crypto references with --with-xio

Reviewed-by: Loic Dachary <ldachary@redhat.com>
7 years agoMerge pull request #11997 from Abhishekvrshny/wip-17876-jewel
Sage Weil [Mon, 5 Dec 2016 19:01:55 +0000 (14:01 -0500)]
Merge pull request #11997 from Abhishekvrshny/wip-17876-jewel

jewel: osd: update_log_missing does not order correctly with osd_ops

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #11944 from SUSE/wip-17866-jewel
Sage Weil [Mon, 5 Dec 2016 19:01:03 +0000 (14:01 -0500)]
Merge pull request #11944 from SUSE/wip-17866-jewel

jewel: osd: Add config option to disable new scrubs during recovery

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #11672 from linuxbox2/jewel-17663
Yehuda Sadeh [Mon, 5 Dec 2016 18:09:30 +0000 (10:09 -0800)]
Merge pull request #11672 from linuxbox2/jewel-17663

jewel: rgw_rest_s3:  apply missed base64 try-catch

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
7 years agoMerge pull request #11953 from SUSE/wip-17885-jewel
Loic Dachary [Mon, 5 Dec 2016 17:47:28 +0000 (18:47 +0100)]
Merge pull request #11953 from SUSE/wip-17885-jewel

jewel: test: temporarily disable fork()'ing tests

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #11884 from SUSE/wip-17754-jewel
Loic Dachary [Mon, 5 Dec 2016 16:39:50 +0000 (17:39 +0100)]
Merge pull request #11884 from SUSE/wip-17754-jewel

jewel: ceph-create-keys loops forever

Reviewed-by: Loic Dachary <ldachary@redhat.com>
7 years agoMerge pull request #11529 from SUSE/wip-17600-jewel
Loic Dachary [Mon, 5 Dec 2016 16:38:50 +0000 (17:38 +0100)]
Merge pull request #11529 from SUSE/wip-17600-jewel

jewel: common: Improve linux dcache hash algorithm

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agobuild/ops: fix undefined crypto references with --with-xio 12296/head
Nathan Cutler [Sat, 3 Dec 2016 12:29:56 +0000 (13:29 +0100)]
build/ops: fix undefined crypto references with --with-xio

Only with --with-xio, RPM build fails due to undefined references to various
symbols starting with "PK11_" in ./.libs/libcommon.a(Crypto.o) in several
of the unit tests.

Fixes: http://tracker.ceph.com/issues/18133
Signed-off-by: Nathan Cutler <ncutler@suse.com>
7 years agoMerge pull request #11999 from Abhishekvrshny/wip-17904-jewel
Samuel Just [Thu, 1 Dec 2016 19:50:35 +0000 (11:50 -0800)]
Merge pull request #11999 from Abhishekvrshny/wip-17904-jewel

jewel: Error EINVAL: removing mon.a at 172.21.15.16:6789/0, there will be 1 monitors

Reviewed-by: Samuel Just <sjust@redhat.com>
7 years agoMerge pull request #12174 from SUSE/wip-18025-jewel
Yehuda Sadeh [Thu, 1 Dec 2016 18:55:01 +0000 (10:55 -0800)]
Merge pull request #12174 from SUSE/wip-18025-jewel

rgw: don't store empty chains in gc

7 years agoMerge pull request #11758 from Abhishekvrshny/wip-17784-jewel
Yehuda Sadeh [Thu, 1 Dec 2016 18:46:30 +0000 (10:46 -0800)]
Merge pull request #11758 from Abhishekvrshny/wip-17784-jewel

jewel: osd crashes when radosgw-admin bi list --max-entries=1 command runing

7 years agorgw: don't store empty chains in gc 12174/head
Yehuda Sadeh [Mon, 14 Nov 2016 18:22:03 +0000 (10:22 -0800)]
rgw: don't store empty chains in gc

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

7 years agoMerge pull request #11855 from dachary/wip-17472-jewel
Loic Dachary [Wed, 23 Nov 2016 08:27:54 +0000 (09:27 +0100)]
Merge pull request #11855 from dachary/wip-17472-jewel

jewel: rpm: /etc/ceph/rbdmap is packaged with executable access rights

Reviewed-by: Loic Dachary <ldachary@redhat.com>
7 years agoMerge pull request #11660 from Abhishekvrshny/wip-17601-jewel
Loic Dachary [Wed, 23 Nov 2016 08:25:15 +0000 (09:25 +0100)]
Merge pull request #11660 from Abhishekvrshny/wip-17601-jewel

jewel: mon: health does not report pgs stuck in more than one state

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agotests: save 9 characters for asok paths 12151/head
Loic Dachary [Fri, 18 Nov 2016 07:06:02 +0000 (08:06 +0100)]
tests: save 9 characters for asok paths

For vstart.sh powered tests, save 9 characters in the path name
by replacing testdir/test- with td/t-

60 characters imposed by jenkins
9 characters for src/test
5 characters for td/t-

33 left (instead of 24) for the test to create asok such as out/client.admin.25327.asok

Moving these files outside of the build directory is a bad idea because
tests should only create/use files within the builddir and not write
outside of this directory. Doing so would make things more complicated
for cleanup in case the test fail and create other problems as a
consequence (filling out disk space, conflicting directories between
runs etc.).

For ceph-helpers.sh tests replace testdir with td, saving 5 characters.
This is not strictly necessary but keeps the directory names consistent:
if the developer wants to get rid of all the test leftovers, it is
enough to remove the a single directory: td.

Fixes: http://tracker.ceph.com/issues/16014
Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit cd72ff9f746fe13a245324dce2aa457d3c876331)

Conflicts:
.gitignore : test directories are not ignored in jewel
src/test/vstart_wrapper.sh : trivial context resolution

7 years agomon,ceph-disk: add lockbox permissions to bootstrap-osd 12033/head
Loic Dachary [Tue, 15 Nov 2016 16:16:37 +0000 (17:16 +0100)]
mon,ceph-disk: add lockbox permissions to bootstrap-osd

ceph-disk --dmcrypt needs to put a config-key and authorize
the OSD to get it back. The corresponding permissions are
added to the bootstrap-osd profile in the monitor.

When preparing the OSD lockbox, use the bootstrap-osd profile instead of
implicitly requiring admin permissions to perform the initial config-key
and auth get-or-create operations.

Fixes: http://tracker.ceph.com/issues/17849
Signed-off-by: Loic Dachary <loic@dachary.org>
(cherry picked from commit c1c6224bf8df788cd34e9ba7294a6515a9ab97e3)

7 years agomon: MonmapMonitor: drop unnecessary 'goto' statements 11999/head
Joao Eduardo Luis [Wed, 2 Nov 2016 15:38:36 +0000 (15:38 +0000)]
mon: MonmapMonitor: drop unnecessary 'goto' statements

Signed-off-by: Joao Eduardo Luis <joao@suse.de>
(cherry picked from commit 20dcb597e35e6961db81831facefbe22cecddec3)

7 years agomon: MonmapMonitor: return success when monitor will be removed
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)

7 years agoReplicatedPG::do_update_log_missing: take the pg lock in the callback 11997/head
Samuel Just [Thu, 3 Nov 2016 00:38:49 +0000 (17:38 -0700)]
ReplicatedPG::do_update_log_missing: take the pg lock in the callback

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

7 years agoMerge pull request #11976 from dachary/wip-17903-jewel
Loic Dachary [Tue, 15 Nov 2016 09:46:20 +0000 (10:46 +0100)]
Merge pull request #11976 from dachary/wip-17903-jewel

ceph-disk: fix flake8 errors

Reviewed-by: Nathan Cutler <ncutler@suse.cz>
7 years agoceph-disk: fix flake8 errors 11976/head
Ken Dreyer [Mon, 14 Nov 2016 21:49:15 +0000 (14:49 -0700)]
ceph-disk: fix flake8 errors

flake8 3.1.1 surfaces the following issues:

ceph_disk/main.py:173:1: E305 expected 2 blank lines after class or
function definition, found 1
ceph_disk/main.py:5011:1: E305 expected 2 blank lines after class or
function definition, found 1

Fixes: http://tracker.ceph.com/issues/17898
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
(cherry picked from commit 9f3403b1e1db88ff966860da13d18f89f3a8b09d)

7 years agoosd: Add config option to disable new scrubs during recovery 11944/head
Wido den Hollander [Wed, 9 Nov 2016 14:24:02 +0000 (15:24 +0100)]
osd: Add config option to disable new scrubs during recovery

The osd_scrub_during_recovery config option allows for configuring
if the OSD will schedule a new scrub while recovery is active.

When set to false no new scrubs will be initiated by the OSD while
there are recovery threads active on that OSD.

Signed-off-by: Wido den Hollander <wido@42on.com>
(cherry picked from commit 33f1f6077804dbcbb82a41ef7f6803b5f3365831)

Conflicts:
src/osd/OSD.h (between jewel and kraken, pg recovery methods were moved
        from the OSD class to OSDService)

7 years agoceph-create-keys: wait 10 minutes to get or create the bootstrap key, not forever 11884/head
Alfredo Deza [Wed, 2 Nov 2016 16:28:49 +0000 (12:28 -0400)]
ceph-create-keys: wait 10 minutes to get or create the bootstrap key, not forever

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit bea802bd13df883d06b7b67a83ac6540e44ab6c1)

7 years agoceph-create-keys: wait 10 minutes to get or create a key, not forever
Alfredo Deza [Wed, 2 Nov 2016 16:25:32 +0000 (12:25 -0400)]
ceph-create-keys: wait 10 minutes to get or create a key, not forever

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 8f84681a4d97a7ea6bc04e759eccfc40204a2fdb)

7 years agoceph-create-keys: wait for quorum for ten minutes, not forever
Alfredo Deza [Wed, 2 Nov 2016 16:19:10 +0000 (12:19 -0400)]
ceph-create-keys: wait for quorum for ten minutes, not forever

Signed-off-by: Alfredo Deza <adeza@redhat.com>
(cherry picked from commit 32cedd2c18e48d5f9a1547e5fd69c24c7eac1638)

7 years agoMerge pull request #11916 from trociny/wip-17767-jewel
Loic Dachary [Mon, 14 Nov 2016 15:42:36 +0000 (16:42 +0100)]
Merge pull request #11916 from trociny/wip-17767-jewel

jewel: librbd: restore journal access when force disabling mirroring

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoqa/workunits: update test_cache_pool.sh 11968/head
Mingxin Liu [Mon, 27 Jun 2016 06:37:30 +0000 (14:37 +0800)]
qa/workunits: update test_cache_pool.sh

Signed-off-by: Mingxin Liu <mingxin@xsky.com>
(cherry picked from commit 383177be07700f9fee067ecb7a27155c322f98dd)

7 years agotools/rados: add --with-clones option to include clones for cache-flush/cache-evict
Mingxin Liu [Mon, 27 Jun 2016 06:35:45 +0000 (14:35 +0800)]
tools/rados: add --with-clones option to include clones for cache-flush/cache-evict

Signed-off-by: Mingxin Liu <mingxin@xsky.com>
(cherry picked from commit 3dd9fa2fb39c76ba3977d7bc09cd28bb3465d56c)

7 years agotools/rados: default to include clone objects when excuting "cache-flush-evict-all"
Mingxin Liu [Sat, 25 Jun 2016 03:19:01 +0000 (11:19 +0800)]
tools/rados: default to include clone objects when excuting "cache-flush-evict-all"

Signed-off-by: Mingxin Liu <mingxin@xsky.com>
(cherry picked from commit b1cf2d9276834d04172d45d5f4dd48ca3e99d338)

7 years agoMerge pull request #11875 from dachary/wip-17842-jewel
Sage Weil [Mon, 14 Nov 2016 14:48:01 +0000 (08:48 -0600)]
Merge pull request #11875 from dachary/wip-17842-jewel

jewel: Remove the runtime dependency on lsb_release

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #11737 from Abhishekvrshny/wip-17765-jewel
Loic Dachary [Mon, 14 Nov 2016 14:39:08 +0000 (15:39 +0100)]
Merge pull request #11737 from Abhishekvrshny/wip-17765-jewel

jewel: collection_list shadow return value #

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #11873 from dachary/wip-17841-jewel
Loic Dachary [Mon, 14 Nov 2016 14:09:44 +0000 (15:09 +0100)]
Merge pull request #11873 from dachary/wip-17841-jewel

jewel: mds fails to respawn if executable has changed

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #11862 from dachary/wip-17582-jewel
Loic Dachary [Mon, 14 Nov 2016 14:09:25 +0000 (15:09 +0100)]
Merge pull request #11862 from dachary/wip-17582-jewel

jewel: monitor assertion failure when deactivating mds in (invalid) fscid 0

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #11861 from dachary/wip-17615-jewel
Loic Dachary [Mon, 14 Nov 2016 14:09:11 +0000 (15:09 +0100)]
Merge pull request #11861 from dachary/wip-17615-jewel

jewel: mds: false failing to respond to cache pressure warning

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #11860 from dachary/wip-17617-jewel
Loic Dachary [Mon, 14 Nov 2016 14:08:40 +0000 (15:08 +0100)]
Merge pull request #11860 from dachary/wip-17617-jewel

jewel: [cephfs] fuse client crash when adding a new osd

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #11858 from dachary/wip-17697-jewel
Loic Dachary [Mon, 14 Nov 2016 14:08:21 +0000 (15:08 +0100)]
Merge pull request #11858 from dachary/wip-17697-jewel

jewel: MDS long-time blocked ops. ceph-fuse locks up with getattr of file

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #11857 from dachary/wip-17706-jewel
Loic Dachary [Mon, 14 Nov 2016 14:08:08 +0000 (15:08 +0100)]
Merge pull request #11857 from dachary/wip-17706-jewel

jewel: multimds: mds entering up:replay and processing down mds aborts

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #11856 from dachary/wip-17720-jewel
Loic Dachary [Mon, 14 Nov 2016 14:07:51 +0000 (15:07 +0100)]
Merge pull request #11856 from dachary/wip-17720-jewel

jewel: MDS: false failing to respond to cache pressure warning

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #11413 from dachary/wip-17478-jewel
Loic Dachary [Mon, 14 Nov 2016 14:07:36 +0000 (15:07 +0100)]
Merge pull request #11413 from dachary/wip-17478-jewel

jewel: MDS goes damaged on blacklist (failed to read JournalPointer: -108 ((108) Cannot send after transport endpoint shutdown)

Reviewed-by: John Spray <john.spray@redhat.com>
7 years agoMerge pull request #11743 from tchaikov/wip-17558-jewel
Loic Dachary [Mon, 14 Nov 2016 13:59:00 +0000 (14:59 +0100)]
Merge pull request #11743 from tchaikov/wip-17558-jewel

jewel: mon: send updated monmap to its subscribers

Reviewed-by: Loic Dachary <ldachary@redhat.com>
7 years agoMerge pull request #11736 from Abhishekvrshny/wip-17732-jewel
Loic Dachary [Mon, 14 Nov 2016 13:09:26 +0000 (14:09 +0100)]
Merge pull request #11736 from Abhishekvrshny/wip-17732-jewel

jewel: ceph daemons DUMPABLE flag is cleared by setuid preventing coredumps

Reviewed-by: Loic Dachary <ldachary@redhat.com>
7 years agoMerge pull request #11735 from Abhishekvrshny/wip-17721-jewel
Loic Dachary [Mon, 14 Nov 2016 13:06:33 +0000 (14:06 +0100)]
Merge pull request #11735 from Abhishekvrshny/wip-17721-jewel

jewel: osd_max_backfills default has changed, documentation should reflect that.

Reviewed-by: Loic Dachary <ldachary@redhat.com>
7 years agoMerge pull request #11606 from dzafman/wip-17666
Loic Dachary [Mon, 14 Nov 2016 13:04:48 +0000 (14:04 +0100)]
Merge pull request #11606 from dzafman/wip-17666

jewel: osd: Remove extra call to reg_next_scrub() during splits

Reviewed-by: Loic Dachary <ldachary@redhat.com>
7 years agotest: temporarily disable fork()'ing tests 11953/head
John Spray [Thu, 13 Oct 2016 18:25:10 +0000 (19:25 +0100)]
test: temporarily disable fork()'ing tests

Fixes: http://tracker.ceph.com/issues/16556
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 1f3d96c501ad666b9878269de25bb0172516fc53)

Conflicts:
src/test/libcephfs/recordlock.cc (file does not exist in jewel)

7 years agoMerge pull request #10865 from dachary/wip-17057-jewel
Loic Dachary [Fri, 11 Nov 2016 20:33:39 +0000 (21:33 +0100)]
Merge pull request #10865 from dachary/wip-17057-jewel

jewel: The request lock RPC message might be incorrectly ignored

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
7 years agolibrbd: restore journal access when force disabling mirroring 11916/head
Mykola Golub [Thu, 10 Nov 2016 13:35:59 +0000 (15:35 +0200)]
librbd: restore journal access when force disabling mirroring

If mirroring is force disabled on a demoted image, the journal was
being left in an inconsistent ownership state.

This is a direct commit to jewel as the fix in the master was
against the newly added async version of mirror disable, which is
not going to be merged to jewel.

Fixes: http://tracker.ceph.com/issues/17767
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
7 years agoMerge pull request #11854 from dachary/wip-17712-jewel
Loic Dachary [Fri, 11 Nov 2016 15:39:45 +0000 (16:39 +0100)]
Merge pull request #11854 from dachary/wip-17712-jewel

jewel: 'rbd du' of missing image does not return error

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoMerge pull request #11870 from dachary/wip-17844-jewel
Loic Dachary [Fri, 11 Nov 2016 15:39:19 +0000 (16:39 +0100)]
Merge pull request #11870 from dachary/wip-17844-jewel

jewel: rbd-nbd: disallow mapping images >2TB in size

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoMerge pull request #11869 from dachary/wip-17845-jewel
Loic Dachary [Fri, 11 Nov 2016 15:38:08 +0000 (16:38 +0100)]
Merge pull request #11869 from dachary/wip-17845-jewel

jewel: rbd-mirror: snap protect of non-layered image results in split-brain

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoMerge pull request #11574 from gaurav36/jewel-backport-period-prepare-command
Loic Dachary [Fri, 11 Nov 2016 15:32:20 +0000 (16:32 +0100)]
Merge pull request #11574 from gaurav36/jewel-backport-period-prepare-command

jewel: rgw multisite: obsolete 'radosgw-admin period prepare' command

Reviewed-by: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #11864 from dachary/wip-17733-jewel
Loic Dachary [Fri, 11 Nov 2016 15:31:21 +0000 (16:31 +0100)]
Merge pull request #11864 from dachary/wip-17733-jewel

jewel: multisite: after finishing full sync on a bucket, incremental sync starts over from the beginning

Reviewed-by: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #11675 from asheplyakov/jewel-17674
Loic Dachary [Fri, 11 Nov 2016 15:30:55 +0000 (16:30 +0100)]
Merge pull request #11675 from asheplyakov/jewel-17674

jewel: rgw: fix put_acls for objects starting and ending with underscore

Reviewed-by: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #11852 from dachary/wip-17766-jewel
Loic Dachary [Fri, 11 Nov 2016 15:26:14 +0000 (16:26 +0100)]
Merge pull request #11852 from dachary/wip-17766-jewel

jewel: Exclusive lock improperly initialized on read-only image when using snap_set API

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
7 years agoMerge pull request #11853 from dachary/wip-17763-jewel
Loic Dachary [Fri, 11 Nov 2016 15:25:55 +0000 (16:25 +0100)]
Merge pull request #11853 from dachary/wip-17763-jewel

jewel: TestLibRBD.DiscardAfterWrite doesn't handle rbd_skip_partial_discard = true

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
7 years agoMerge pull request #11760 from Abhishekvrshny/wip-17769-jewel
Orit Wasserman [Fri, 11 Nov 2016 11:43:19 +0000 (12:43 +0100)]
Merge pull request #11760 from Abhishekvrshny/wip-17769-jewel

jewel: disable virtual hosting of buckets when no hostnames are configured
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
7 years agoMerge pull request #11867 from dachary/wip-17675-jewel
Orit Wasserman [Fri, 11 Nov 2016 11:37:39 +0000 (12:37 +0100)]
Merge pull request #11867 from dachary/wip-17675-jewel

jewel: RGWRados::get_system_obj() sends unnecessary stat request before read
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
7 years agoMerge pull request #11863 from dachary/wip-17735-jewel
Orit Wasserman [Fri, 11 Nov 2016 11:36:31 +0000 (12:36 +0100)]
Merge pull request #11863 from dachary/wip-17735-jewel

jewel: RGW will not list Argonaut-era bucket via HTTP (but radosgw-admin works)
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
7 years agoMerge pull request #11627 from cbodley/wip-17343
Loic Dachary [Fri, 11 Nov 2016 11:23:46 +0000 (12:23 +0100)]
Merge pull request #11627 from cbodley/wip-17343

jewel: rgw: work around curl_multi_wait bug with non-blocking reads

Reviewed-by: Loic Dachary <ldachary@redhat.com>
7 years agorgw: add missing mutex header for std::once_flag 11627/head
Casey Bodley [Wed, 9 Nov 2016 19:27:11 +0000 (14:27 -0500)]
rgw: add missing mutex header for std::once_flag

this fix was added directly to the jewel branch rather than backporting
from master, because the code on master compiles without this specific
include - it's likely included by another header, but backporting would
involve pulling in unrelated changes

Signed-off-by: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #11822 from SUSE/wip-17816-jewel
Loic Dachary [Wed, 9 Nov 2016 19:53:18 +0000 (20:53 +0100)]
Merge pull request #11822 from SUSE/wip-17816-jewel

jewel: Missing comma in ceph-create-keys causes concatenation of arguments

Reviewed-by: Loic Dachary <ldachary@redhat.com>
7 years agorgw: remove suggestion to upgrade libcurl
Casey Bodley [Mon, 24 Oct 2016 19:02:39 +0000 (15:02 -0400)]
rgw: remove suggestion to upgrade libcurl

Reported-by: Ken Dreyer <kdreyer@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit dcff120edaabb6fb0ebba73a716e4d42fa10dcd8)

7 years agorgw/rgw_http_client: add compat.h include for TEMP_FAILURE_RETRY
John Coyle [Thu, 16 Jun 2016 01:06:54 +0000 (21:06 -0400)]
rgw/rgw_http_client: add compat.h include for TEMP_FAILURE_RETRY

Signed-off-by: John Coyle <dx9err@gmail.com>
(cherry picked from commit 00f4554aa5511d86ea45aec90c16617c419ca7c3)

7 years agorgw: detect and work around a curl_multi_wait bug
Casey Bodley [Fri, 9 Sep 2016 20:46:54 +0000 (16:46 -0400)]
rgw: detect and work around a curl_multi_wait bug

Fixes: http://tracker.ceph.com/issues/15915
Fixes: http://tracker.ceph.com/issues/16695
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 0359be62b79857357f6d0d4fb81c6bb4e0c381a6)

7 years agorgw: use non-blocking reads for clear_signal
Casey Bodley [Fri, 9 Sep 2016 20:01:16 +0000 (16:01 -0400)]
rgw: use non-blocking reads for clear_signal

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 1101fcc750cdd8702b2ca570da2cecb47d0ddeae)

7 years agorgw: factored clear_signal out of do_curl_wait
Casey Bodley [Fri, 9 Sep 2016 19:58:50 +0000 (15:58 -0400)]
rgw: factored clear_signal out of do_curl_wait

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit f2f5cdf3aadfa265e2e834a9354c2aacf274212d)

7 years agorgw: do_curl_wait uses ldout
Casey Bodley [Fri, 9 Sep 2016 19:58:21 +0000 (15:58 -0400)]
rgw: do_curl_wait uses ldout

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 208098441366cc7446138cc15afd4a99cd30a2fc)

7 years agorgw: add pipe fd to set for select() in do_curl_wait()
Casey Bodley [Fri, 17 Jun 2016 02:51:54 +0000 (22:51 -0400)]
rgw: add pipe fd to set for select() in do_curl_wait()

when HAVE_CURL_MULTI_WAIT is 0, the pipe fd is never added to the
readfds for select(), so FD_ISSET() is always false. this prevents us
from ever trying to read from the fd, and the pipe's buffer eventually
fills up and deadlocks callers of RGWHTTPManager::signal_thread() when
they try to write to the pipe

Fixes: http://tracker.ceph.com/issues/16368
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 75897f82abde818fde6e1625c6977dcdd639a1f0)

7 years agorgw: clean up thread_pipe in RGWHTTPManager::stop
Casey Bodley [Fri, 13 May 2016 17:03:18 +0000 (13:03 -0400)]
rgw: clean up thread_pipe in RGWHTTPManager::stop

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit c93959b182c4394517a9ec9e29e3b14ee8030fc6)

7 years agorgw: create thread_pipe before RGWHTTPManager::ReqsThread
Casey Bodley [Fri, 13 May 2016 17:01:38 +0000 (13:01 -0400)]
rgw: create thread_pipe before RGWHTTPManager::ReqsThread

closes a potential race between pipe creation and
RGWHTTPManager::reqs_thread_entry()'s access of thread_pipe

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 9161e9fdbfb2aa529a87197ef1a34f03917b80d9)

7 years agocommon: Remove the runtime dependency on lsb_release 11875/head
Brad Hubbard [Fri, 7 Oct 2016 04:51:41 +0000 (14:51 +1000)]
common: Remove the runtime dependency on lsb_release

With modern releases we should be able to make do with the call to
os_release_parse only which uses /etc/os-release which should be available on
most (all?) releases we currently support. this then allows us to remove the
runtime dependency which pulls in several other packages and would be nice to
avoid.

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

Conflicts:
debian/control: trivial context resolution

7 years agocommon/util: add support for distro info from /etc/os-release file
John Coyle [Fri, 1 Apr 2016 05:58:39 +0000 (01:58 -0400)]
common/util: add support for distro info from /etc/os-release file

test/cephtool-test-mon.sh tests osd metadata for distro info. This fails on Alpine because lsb_release is not supported.

Updated collect_sys_info() to detect distro info in /etc/os-release as a fallback to lsb_release.

Added unit test for distro info detection.

Signed-off-by: John Coyle <dx9err@gmail.com>
(cherry picked from commit a9487e2ad09546f8cd06a371cfed9e4ba992c679)

7 years agomds: respawn using /proc/self/exe 11873/head
Patrick Donnelly [Thu, 6 Oct 2016 22:54:44 +0000 (18:54 -0400)]
mds: respawn using /proc/self/exe

This allows the MDS to respawn using the same executable file even if it
has since been deleted (on Linux). Otherwise, the execv fails because
the readlink returns "/path/to/deleted (deleted)". (There is no path to
the old executable.)

Fixes: http://tracker.ceph.com/issues/17531
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 66a122025f6cf023cf7b2f3d8fbe4964fb7568a7)

7 years agorbd-nbd: disallow mapping images >2TB in size 11870/head
Mykola Golub [Wed, 2 Nov 2016 08:49:23 +0000 (10:49 +0200)]
rbd-nbd: disallow mapping images >2TB in size

Fixes: http://tracker.ceph.com/issues/17219
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit 2012b4dfc65414751e3da8386a3a14da8b7c1249)

7 years agorbd-mirror: snap protect of non-layered image results in split-brain 11869/head
Mykola Golub [Wed, 2 Nov 2016 10:43:45 +0000 (12:43 +0200)]
rbd-mirror: snap protect of non-layered image results in split-brain

Fixes: http://tracker.ceph.com/issues/16962
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
(cherry picked from commit 8e1cc88e068fe57e9bbfa1ebbc6bbf89fb62aaac)

7 years agorgw: get_system_obj does not use result of get_system_obj_state 11867/head
Casey Bodley [Wed, 12 Oct 2016 12:55:52 +0000 (08:55 -0400)]
rgw: get_system_obj does not use result of get_system_obj_state

get_system_obj() calls get_system_obj_state() to send a [getxattrs,stat]
request and fill out an RGWObjState - but the results are not used

Fixes: http://tracker.ceph.com/issues/17580
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 973d0076958ec9416cbe9ebc1cec03ee147ca4f9)

7 years agorgw: RGWSimpleRadosReadCR tolerates empty reads 11865/head
Casey Bodley [Fri, 14 Oct 2016 15:16:14 +0000 (11:16 -0400)]
rgw: RGWSimpleRadosReadCR tolerates empty reads

Fixes: http://tracker.ceph.com/issues/17568
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit c58ac1b0cc33505692f6244abc34ecea05e6d072)

7 years agorgw: fix for passing temporary in InitBucketSyncStatus 11864/head
Casey Bodley [Fri, 21 Oct 2016 02:59:35 +0000 (22:59 -0400)]
rgw: fix for passing temporary in InitBucketSyncStatus

Fixes: http://tracker.ceph.com/issues/17661
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 32906353c3136bc500ff06a3732a0946591118fa)

7 years agorgw multisite: fix the increamtal bucket sync init
Zengran Zhang [Wed, 19 Oct 2016 09:05:27 +0000 (17:05 +0800)]
rgw multisite: fix the increamtal bucket sync init

in the `RGWBucketShardFullSyncCR::operate`, inc_marker will assigned with remote bilog's max_marker.
but the sync_status's inc_marker cant be assigned.so the next step inc sync will always sync
from null log,which means at beginning log.

Fixes: http://tracker.ceph.com/issues/17624
Signed-off-by: Zengran Zhang <zhangzengran@h3c.com>
(cherry picked from commit 0d928c26408f2fa0b276304c4c00e9c41e0777fa)

7 years agorgw: get_zonegroup() uses "default" zonegroup if empty 11863/head
Yehuda Sadeh [Thu, 22 Sep 2016 23:03:15 +0000 (16:03 -0700)]
rgw: get_zonegroup() uses "default" zonegroup if empty

Fixes: http://tracker.ceph.com/issues/17372
An empty zonegroup should be replaced with the "default" zonegroup.
This is needed when dealing with zonegroup set in old bucket info,
that predated setting the buckets' region.

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

7 years agomds: use parse_filesystem in parse_role 11862/head
Patrick Donnelly [Mon, 10 Oct 2016 22:16:16 +0000 (18:16 -0400)]
mds: use parse_filesystem in parse_role

This allows us to reuse code in parse_filesystem and avoid
get_filesystem which may fail if the fscid does not exist. This would
result in the program (mon) aborting due to the uncaught exception.

Fixes: http://tracker.ceph.com/issues/17518
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit edc78e46cee356da1e45247c38b7428dd6c965cb)

7 years agomds: group filesystem access methods
Patrick Donnelly [Mon, 10 Oct 2016 22:14:18 +0000 (18:14 -0400)]
mds: group filesystem access methods

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 59de9919a0e8388c1b8e7968187de6b1b6492425)

7 years agomds: use reference to avoid copy
Patrick Donnelly [Mon, 10 Oct 2016 22:13:33 +0000 (18:13 -0400)]
mds: use reference to avoid copy

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 8934e95d75acadc1a82347272ac18175751a92de)

7 years agomds: fully encapsulate filesystems map
Patrick Donnelly [Mon, 10 Oct 2016 21:06:52 +0000 (17:06 -0400)]
mds: fully encapsulate filesystems map

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit de6c36af022da9599b04b59e5300fbb6a3de938f)

7 years agomds: fix false "failing to respond to cache pressure" warning 11861/head
Yan, Zheng [Sat, 8 Oct 2016 07:16:40 +0000 (15:16 +0800)]
mds: fix false "failing to respond to cache pressure" warning

the false warning happens in following sequence of events
- MDS has cache pressure, sends recall state messages to clients
- Client does not trim as many caps as MDS expected. So MDS
  does not reset session->recalled_at
- MDS no longer has cache pressure, it stop sending recall state
  messages to clients.
- Client does not release its caps. So session->recalled_at in
  MDS keeps unchanged

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

7 years agoRevert "osdc: After write try merge bh." 11860/head
John Spray [Tue, 13 Sep 2016 13:37:56 +0000 (19:07 +0530)]
Revert "osdc: After write try merge bh."

This reverts commit 1a48a8a2b222e41236341cb1241f0885a1b0b9d8.

Fixes: http://tracker.ceph.com/issues/17270
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 88dbde2fa7ce89ab58724833d436c563ba325682)

7 years agoosdc/ObjectCacher: wake up dirty stat waiters after removing buffers 11858/head
Yan, Zheng [Fri, 21 Oct 2016 13:24:15 +0000 (21:24 +0800)]
osdc/ObjectCacher: wake up dirty stat waiters after removing buffers

Fixes: http://tracker.ceph.com/issues/17275
Signed-off-by: Yan, Zheng <zyan@redhat.com>
(cherry picked from commit a684dc50873ca968131a68db65f1a1df36767d44)

7 years agomds: check if down mds is known 11857/head
Patrick Donnelly [Sat, 22 Oct 2016 22:47:03 +0000 (18:47 -0400)]
mds: check if down mds is known

This avoids an assertion failure where an MDS receives an mdsmap that
causes it to enter up:replay and also see another MDS go down.

Fixes: http://tracker.ceph.com/issues/17670
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 99a21133cd3133088e3977d46aab7120524eb350)

7 years agomds: fix false "failing to respond to cache pressure" warning 11856/head
Yan, Zheng [Sat, 8 Oct 2016 07:16:40 +0000 (15:16 +0800)]
mds: fix false "failing to respond to cache pressure" warning

the false warning happens in following sequence of events
- MDS has cache pressure, sends recall state messages to clients
- Client does not trim as many caps as MDS expected. So MDS
  does not reset session->recalled_at
- MDS no longer has cache pressure, it stop sending recall state
  messages to clients.
- Client does not release its caps. So session->recalled_at in
  MDS keeps unchanged

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

7 years agorpm: fix permissions for /etc/ceph/rbdmap 11855/head
Ken Dreyer [Fri, 23 Sep 2016 20:49:56 +0000 (14:49 -0600)]
rpm: fix permissions for /etc/ceph/rbdmap

Prior to this change, the RPM packaging would install /etc/ceph/rbdmap
with exectuable permissions. The execute bit is not necessary and does
not match what the Debian packaging does. Remove the execute bit in this
case.

Fixes: http://tracker.ceph.com/issues/17395
Reported-by: Martin Bukatovic <mbukatov@redhat.com>
Signed-off-by: Ken Dreyer <kdreyer@redhat.com>
(cherry picked from commit d4b84a13960f9f46593bf89dc92bfc3e54b4851e)

Conflicts:
ceph.spec.in : trivial context resolution

7 years agorbd: return error if we specified a wrong image name for rbd du 11854/head
Dongsheng Yang [Fri, 9 Sep 2016 08:53:25 +0000 (04:53 -0400)]
rbd: return error if we specified a wrong image name for rbd du

Signed-off-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
(cherry picked from commit ce4c801cfc114f718ca51c32b657fec638ca9aaf)

7 years agotest: skip TestLibRBD.DiscardAfterWrite if skip partial discard enabled 11853/head
Jason Dillaman [Mon, 31 Oct 2016 15:08:55 +0000 (11:08 -0400)]
test: skip TestLibRBD.DiscardAfterWrite if skip partial discard enabled

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

7 years agolibrbd: exclusive lock incorrectly initialized when switching to HEAD 11852/head
Jason Dillaman [Wed, 19 Oct 2016 16:03:37 +0000 (12:03 -0400)]
librbd: exclusive lock incorrectly initialized when switching to HEAD

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

7 years agocommon: Improve linux dcache hash algorithm 11529/head
Yibo Cai [Fri, 17 Jun 2016 09:51:47 +0000 (17:51 +0800)]
common: Improve linux dcache hash algorithm

In ceph_str_hash_linux(), hash value is defined as unsigned long,
which is 8 bytes on 64-bit platforms when compiled with gcc. But
the return value is truncated to 4 bytes, and there's no need to
preserve 8 bytes intermediate value in the algorithm. The compiler
doesn't figure out this fact and produces redundant code.

After removing the "long" definition, this route runs much faster.
Following result are tested on x86_64 and aarch64 platforms, built
by gcc 5.3.1 with optimization level -O2. Same output is observed
with gcc 4.8.4 and -O3 optimization.

ARM Cortex-A57
+---------------+--------------+---------------+-------------+
| String Length | Time w/ long | Time w/o long | Improvement |
+---------------+--------------+---------------+-------------+
| 32            | 0.088 us     | 0.067 us      | 24%         |
+---------------+--------------+---------------+-------------+
| 4096          | 10.26 us     | 8.20 us       | 20%         |
+---------------+--------------+---------------+-------------+
| 65536         | 164 us       | 131 us        | 20%         |
+---------------+--------------+---------------+-------------+
1048576       | 2624 us      | 2099 us       | 20%         |
+---------------+--------------+---------------+-------------+

Intel i7-4790
+---------------+--------------+---------------+-------------+
| String Length | Time w/ long | Time w/o long | Improvement |
+---------------+--------------+---------------+-------------+
| 32            | 0.033 us     | 0.028 us      | 16.3%       |
+---------------+--------------+---------------+-------------+
| 4096          | 3.87 us      | 3.64 us       | 6.2%        |
+---------------+--------------+---------------+-------------+
| 65536         | 61.3 us      | 57.8 us       | 5.7%        |
+---------------+--------------+---------------+-------------+
1048576       | 973 us       | 917 us        | 5.8%        |
+---------------+--------------+---------------+-------------+

Signed-off-by: Yibo Cai <yibo.cai@linaro.org>
(cherry picked from commit 0cdee4bf0a55f63321957729c50caf17e7cd3b4a)

7 years agomds: handle blacklisting during journal recovery 11413/head
John Spray [Mon, 19 Sep 2016 16:34:26 +0000 (17:34 +0100)]
mds: handle blacklisting during journal recovery

EBLACKLISTED was being incorrectly handled as an
indication of metadata damage.

Fixes: http://tracker.ceph.com/issues/17236
Signed-off-by: John Spray <john.spray@redhat.com>
(cherry picked from commit 19bb8c0df9b48ebbccfd1913126bb48b6337319e)