]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
7 years agoMerge pull request #19975 from pdvian/wip-22689-jewel
Nathan Cutler [Tue, 6 Feb 2018 13:48:06 +0000 (14:48 +0100)]
Merge pull request #19975 from pdvian/wip-22689-jewel

jewel: client: release revoking Fc after invalidate cache

Reviewed-by: Yan, Zheng <zyan@redhat.com>
7 years agoMerge pull request #18084 from batrick/i17935
Nathan Cutler [Tue, 6 Feb 2018 13:45:42 +0000 (14:45 +0100)]
Merge pull request #18084 from batrick/i17935

jewel: ceph_volume_client: fix setting caps for IDs

Reviewed-by: Ramana Raja <rraja@redhat.com>
7 years agoMerge pull request #17925 from batrick/i21519
Nathan Cutler [Tue, 6 Feb 2018 13:42:32 +0000 (14:42 +0100)]
Merge pull request #17925 from batrick/i21519

jewel: client: set client_try_dentry_invalidate to false by default

Reviewed-by: Yan, Zheng <zyan@redhat.com>
7 years agoMerge pull request #17188 from smithfarm/wip-21067-jewel
Nathan Cutler [Tue, 6 Feb 2018 13:40:50 +0000 (14:40 +0100)]
Merge pull request #17188 from smithfarm/wip-21067-jewel

jewel: mds: fix integer overflow

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
7 years agoMerge pull request #20287 from smithfarm/wip-22191-jewel
Nathan Cutler [Tue, 6 Feb 2018 13:38:04 +0000 (14:38 +0100)]
Merge pull request #20287 from smithfarm/wip-22191-jewel

jewel: class rbd.Image discard----OSError: [errno 2147483648] error discarding region

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Mykola Golub <mgolub@suse.com>
7 years agoMerge pull request #20286 from smithfarm/wip-22186-jewel
Nathan Cutler [Tue, 6 Feb 2018 13:37:10 +0000 (14:37 +0100)]
Merge pull request #20286 from smithfarm/wip-22186-jewel

jewel: abort in listing mapped nbd devices when running in a container

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Mykola Golub <mgolub@suse.com>
7 years agoMerge pull request #19801 from smithfarm/wip-21642-jewel
Nathan Cutler [Tue, 6 Feb 2018 13:36:13 +0000 (14:36 +0100)]
Merge pull request #19801 from smithfarm/wip-21642-jewel

jewel: rbd ls -l crashes with SIGABRT

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Mykola Golub <mgolub@suse.com>
7 years agoMerge pull request #20282 from smithfarm/wip-21971-jewel
Nathan Cutler [Tue, 6 Feb 2018 13:33:16 +0000 (14:33 +0100)]
Merge pull request #20282 from smithfarm/wip-21971-jewel

jewel: [journal] tags are not being expired if no other clients are registered

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoMerge pull request #20281 from smithfarm/wip-21290-jewel
Nathan Cutler [Tue, 6 Feb 2018 13:32:10 +0000 (14:32 +0100)]
Merge pull request #20281 from smithfarm/wip-21290-jewel

jewel: [rbd] image-meta list does not return all entries

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoMerge pull request #20280 from smithfarm/wip-21266-jewel
Nathan Cutler [Tue, 6 Feb 2018 13:30:55 +0000 (14:30 +0100)]
Merge pull request #20280 from smithfarm/wip-21266-jewel

jewel: [cli] rename of non-existent image results in seg fault

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoMerge pull request #19855 from pdvian/wip-22594-jewel
Nathan Cutler [Tue, 6 Feb 2018 13:28:25 +0000 (14:28 +0100)]
Merge pull request #19855 from pdvian/wip-22594-jewel

jewel: rbd: librbd: filter out potential race with image rename

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoMerge pull request #19644 from pdvian/wip-22498-jewel
Nathan Cutler [Tue, 6 Feb 2018 13:26:20 +0000 (14:26 +0100)]
Merge pull request #19644 from pdvian/wip-22498-jewel

jewel: rbd-mirror: cluster watcher should ensure it has latest OSD map

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoMerge pull request #19186 from pdvian/wip-22209-jewel
Nathan Cutler [Tue, 6 Feb 2018 13:25:12 +0000 (14:25 +0100)]
Merge pull request #19186 from pdvian/wip-22209-jewel

jewel: rbd: disk usage on empty pool no longer returns an error message

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoMerge pull request #19115 from pdvian/wip-22173-jewel
Nathan Cutler [Tue, 6 Feb 2018 13:24:10 +0000 (14:24 +0100)]
Merge pull request #19115 from pdvian/wip-22173-jewel

jewel: [rbd-nbd] Fedora does not register resize events

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoMerge pull request #19098 from pdvian/wip-22170-jewel
Nathan Cutler [Tue, 6 Feb 2018 13:22:53 +0000 (14:22 +0100)]
Merge pull request #19098 from pdvian/wip-22170-jewel

jewel: librbd: set deleted parent pointer to null

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoMerge pull request #18843 from shinobu-x/wip-21866-jewel
Nathan Cutler [Tue, 6 Feb 2018 13:21:13 +0000 (14:21 +0100)]
Merge pull request #18843 from shinobu-x/wip-21866-jewel

jewel: rbd: rbd crashes during map

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agoMerge pull request #19194 from mdw-at-linuxbox/wip-jewel-rgw-swift-anon
Nathan Cutler [Tue, 6 Feb 2018 12:47:20 +0000 (13:47 +0100)]
Merge pull request #19194 from mdw-at-linuxbox/wip-jewel-rgw-swift-anon

jewel: rgw: fix swift anonymous access

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
7 years agoMerge pull request #19804 from smithfarm/wip-21691-jewel
Jason Dillaman [Sun, 4 Feb 2018 02:29:12 +0000 (21:29 -0500)]
Merge pull request #19804 from smithfarm/wip-21691-jewel

jewel: tests: rbd_mirror_helpers.sh request_resync_image function saves image id to wrong variable

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
7 years agorbd discard return -EINVAL if len > MAX_INT32 20287/head
Huan Zhang [Fri, 24 Jun 2016 03:27:53 +0000 (11:27 +0800)]
rbd discard return -EINVAL if len > MAX_INT32

rbd discard use 'int' to return discarded length, but the 'len' user
passed is 'uint64', in some case, the ret value will be truncated
and return a negative value which means discard failed. ret -EINVAL
if len > MAX_INT32 to indicate support len <= MAX_INT32 only.

Fixes: http://tracker.ceph.com/issues/16465
Signed-off-by: Huan Zhang <zhanghuan@chinac.com>
(cherry picked from commit ec259dfde87ed9bc5e7247f311b629707c636895)

7 years agolibrbd: prevent overflow of discard API result code
Jason Dillaman [Wed, 15 Nov 2017 14:09:15 +0000 (09:09 -0500)]
librbd: prevent overflow of discard API result code

Prevent discard/writesame lengths larger than 2GB.

Fixes: http://tracker.ceph.com/issues/21966
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 3effd324db181e625665be33b5c6529dca723cc5)
Signed-off-by: Nathan Cutler <ncutler@suse.com>
Conflicts:
PendingReleaseNotes (adapted for jewel)
src/librbd/librbd.cc (no writesame in jewel)

7 years agorbd-nbd: fix unused nbd device search bug in container 20286/head
Li Wang [Wed, 1 Nov 2017 09:21:29 +0000 (09:21 +0000)]
rbd-nbd: fix unused nbd device search bug in container

In some container scenarios, the host may choose to
map a specific nbd device, for example, /dev/nbd6 into the
container, in that case, the nbd device available in the
container is not numbered from 0. The current unused
nbd device search function will return no result.
This patch fixes it.

Fixes: http://tracker.ceph.com/issues/22012
Signed-off-by: Li Wang <laurence.liwang@gmail.com>
Reviewed-by: Yunchuan Wen <yunchuan.wen@kylin-cloud.com>
(cherry picked from commit be0f9581f9727187ca03232e0b368e7da7a60609)

7 years agorbd-nbd: only try to load nbd module once when open nbd device, during do_map operation.
Pan Liu [Sat, 11 Mar 2017 13:50:00 +0000 (21:50 +0800)]
rbd-nbd: only try to load nbd module once when open nbd device, during do_map operation.

Signed-off-by: Pan Liu <liupan1111@gmail.com>
(cherry picked from commit 37aa18858b38cee61e122adc0a1834ca797ea84f)

7 years agocls/journal: ensure tags are properly expired 20282/head
Jason Dillaman [Fri, 27 Oct 2017 20:45:54 +0000 (16:45 -0400)]
cls/journal: ensure tags are properly expired

Previously, if only the local image was using the journal or if
a disconnected peer was attached, the tag entries could not be
expired even if unreferenced.

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

Conflicts:
src/cls/journal/cls_journal.cc (jewel does not have d3de6f5e07cb30d81ce8cc539256c6cf754b28d5)

7 years agorbd: support iterating over metadata items when listing 20281/head
Jason Dillaman [Wed, 6 Sep 2017 20:14:58 +0000 (16:14 -0400)]
rbd: support iterating over metadata items when listing

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

7 years agolibrbd: rename of non-existent image results in seg fault 20280/head
Jason Dillaman [Tue, 5 Sep 2017 16:11:45 +0000 (12:11 -0400)]
librbd: rename of non-existent image results in seg fault

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

Conflicts:
        src/librbd/internal.cc (retain redundant "delete ictx" that has been
            dropped in master)

7 years agoMerge pull request #20070 from smithfarm/wip-22771-jewel
David Zafman [Sat, 3 Feb 2018 00:44:42 +0000 (16:44 -0800)]
Merge pull request #20070 from smithfarm/wip-22771-jewel

jewel: tools: ceph-objectstore-tool set-size should clear data-digest

Reviewed-by: David Zafman <dzafman@redhat.com>
7 years agoMerge pull request #19469 from linuxbox2/jewel-22410
Nathan Cutler [Fri, 2 Feb 2018 21:20:33 +0000 (22:20 +0100)]
Merge pull request #19469 from linuxbox2/jewel-22410

jewel: rgw: fix chained cache invalidation to prevent cache size growth

Reviewed-by: Mark Kogan <mkogan@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
7 years agoMerge pull request #19747 from linuxbox2/jewel-rgw-21984
Nathan Cutler [Fri, 2 Feb 2018 21:17:55 +0000 (22:17 +0100)]
Merge pull request #19747 from linuxbox2/jewel-rgw-21984

jewel: rgw: fix doubled underscore with s3/swift server-side copy

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Marcus Watts <mwatts@redhat.com>
7 years agoMerge pull request #19769 from linuxbox2/jewel-rgw-22517
Nathan Cutler [Fri, 2 Feb 2018 21:15:21 +0000 (22:15 +0100)]
Merge pull request #19769 from linuxbox2/jewel-rgw-22517

jewel: rgw: resolve Random 500 errors in Swift PutObject (22517)

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
Reviewed-by: Orit Wasserman <owasserm@redhat.com>
7 years agoMerge pull request #18303 from smithfarm/wip-21632-jewel
Nathan Cutler [Thu, 1 Feb 2018 23:18:49 +0000 (00:18 +0100)]
Merge pull request #18303 from smithfarm/wip-21632-jewel

jewel: doc: remove region from INSTALL CEPH OBJECT GATEWAY

Reviewed-by: Orit Wasserman <owasserm@redhat.com>
7 years agoMerge pull request #18951 from dzafman/wip-21440
David Zafman [Fri, 26 Jan 2018 22:50:27 +0000 (14:50 -0800)]
Merge pull request #18951 from dzafman/wip-21440

Jewel: Performance: Only scan for omap corruption once

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
7 years agoMerge pull request #18690 from dzafman/wip-1508935
David Zafman [Fri, 26 Jan 2018 15:56:00 +0000 (07:56 -0800)]
Merge pull request #18690 from dzafman/wip-1508935

jewel: osd: recover_replicas: object added to missing set for backfill, but is not in recovering, error!

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #18925 from ivancich/jewel-backport-18821
Nathan Cutler [Tue, 23 Jan 2018 14:36:21 +0000 (15:36 +0100)]
Merge pull request #18925 from ivancich/jewel-backport-18821

jewel: rgw: Fix swift object expiry not deleting objects

Reviewed-by: Casey Bodley <cbodley@redhat.com>
7 years agoceph-objectstore-tool: Fix set-size to clear data_digest if changing disk size 20070/head
David Zafman [Fri, 10 Nov 2017 00:11:14 +0000 (16:11 -0800)]
ceph-objectstore-tool: Fix set-size to clear data_digest if changing disk size

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 7ca3ce93099de9412012b7a88121f9fced34f4b8)

Conflicts:
    src/tools/ceph_objectstore_tool.cc (in jewel, ::encode() takes only two
        arguments, while in luminous/master it takes a third which we omit
        here)

7 years agotest: Add undocumented corrupt-size for testing
David Zafman [Fri, 30 Jun 2017 00:13:50 +0000 (17:13 -0700)]
test: Add undocumented corrupt-size for testing

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit c0606b9eea977074b560b44c4cd1a3d8e8bc3e0a)
(cherry picked from commit feb02bdd64531e9098dca580b673e3886ba922b1)

7 years agoclient: fix cap revoke race 19975/head
Yan, Zheng [Thu, 11 Jan 2018 09:50:22 +0000 (17:50 +0800)]
client: fix cap revoke race

If caps are been revoking by the auth MDS, don't consider them as
issued even they are still issued by non-auth MDS. The non-auth
MDS should also be revoking/exporting these caps, the client just
hasn't received the cap revoke/export message.

The race I encountered is: When caps are exporting to new MDS, the
client receives cap import message and cap revoke message from the
new MDS, then receives cap export message from the old MDS. When
the client receives cap revoke message from the new MDS, the revoking
caps are still issued by the old MDS, so the client does nothing.
Later when the cap export message is received, the client removes
the caps issued by the old MDS. (Another way to fix the race is
calling ceph_check_caps() in handle_cap_export())

copid from kernel commit b1530f57

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

Conflicts:
src/client/Inode.cc: Resolved for loop conflict in << operator
                             and caps_issued func

7 years agoclient: release revoking Fc after invalidate cache
Yan, Zheng [Thu, 11 Jan 2018 08:22:12 +0000 (16:22 +0800)]
client: release revoking Fc after invalidate cache

this issue is likely revealed by commit 7bc1fa04
"client: avoid adding checked inode to the delayed_caps"

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

7 years agorgw: Fix swift object expiry not deleting objects 18925/head
Pavan Rallabhandi [Wed, 8 Nov 2017 16:05:54 +0000 (21:35 +0530)]
rgw: Fix swift object expiry not deleting objects

In cls_timeindex_list() though `to_index` has expired for a timespan, the marker is set for a subsequent index during the time boundary check.
This marker is further returned to RGWObjectExpirer::process_single_shard(), where this out_marker is trimmed from the respective shard,
resulting in a lost removal hint and a leaked object.

Fixes: http://tracker.ceph.com/issues/22084
Signed-off-by: Pavan Rallabhandi <PRallabhandi@walmartlabs.com>
(cherry picked from commit 70adfaae5073d2680a9722526a6a19795dd18780)

7 years agolibrbd: filter out potential race with image rename 19855/head
Jason Dillaman [Wed, 20 Dec 2017 21:55:06 +0000 (16:55 -0500)]
librbd: filter out potential race with image rename

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

7 years agoMerge pull request #19840 from joscollin/wip-jewel-backport-22569-2
Jos Collin [Mon, 8 Jan 2018 14:16:46 +0000 (14:16 +0000)]
Merge pull request #19840 from joscollin/wip-jewel-backport-22569-2

jewel: doc: clarify Path Restriction instructions

Reviewed-by: Nathan Cutler <ncutler@suse.com>
7 years agodoc: hyperlink fix 19840/head
Drunkard Zhang [Wed, 1 Mar 2017 01:51:01 +0000 (09:51 +0800)]
doc: hyperlink fix

Signed-off-by: Drunkard Zhang <gongfan193@gmail.com>
(cherry picked from commit f763bacab3ea66ab13b4d62ad883c365a8e0a604)

7 years agoMerge pull request #19795 from joscollin/wip-jewel-backport-22569
Jos Collin [Mon, 8 Jan 2018 04:21:32 +0000 (04:21 +0000)]
Merge pull request #19795 from joscollin/wip-jewel-backport-22569

jewel: doc: clarify Path Restriction instructions

Reviewed-by: Nathan Cutler <ncutler@suse.com>
7 years agodoc/mds: add generated files into the /etc/ceph/ 19795/head
huanwen ren [Thu, 4 Aug 2016 11:50:18 +0000 (19:50 +0800)]
doc/mds: add generated files into the /etc/ceph/

Fixes: 16906
Signed-off-by: huanwen ren <ren.huanwen@zte.com.cn>
(cherry picked from commit d1277f116cd297bae8da7b3e1a7000d3f99c6a51)

7 years agoqa/workunits/rbd: fixed variable name for resync image id 19804/head
Jason Dillaman [Tue, 3 Oct 2017 17:25:33 +0000 (13:25 -0400)]
qa/workunits/rbd: fixed variable name for resync image id

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

7 years agolibrbd: hold cache_lock while clearing cache nonexistence flags 19801/head
Jason Dillaman [Wed, 27 Sep 2017 13:40:08 +0000 (09:40 -0400)]
librbd: hold cache_lock while clearing cache nonexistence flags

When transitioning from a snapshot that had an associated parent
to a snapshot where the parent was flattened and removed, the cache
was being referenced without holding the required lock.

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

7 years agorgw: Plumb refresh logic into object cache 19769/head
Adam C. Emerson [Wed, 20 Dec 2017 22:06:32 +0000 (17:06 -0500)]
rgw: Plumb refresh logic into object cache

Now when we force a refetch of bucket info it will actually go to the
OSD rather than simply using the objects in the object cache.

Fixes: http://tracker.ceph.com/issues/22517
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit d997f657750faf920170843e62deacab70008d8b)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
7 years agorgw: Add expiration in the object cache
Adam C. Emerson [Tue, 19 Dec 2017 21:47:09 +0000 (16:47 -0500)]
rgw: Add expiration in the object cache

We had it in the chained caches, but it doesn't do much good if
they just fetch objects out of the object cache.

Fixes: http://tracker.ceph.com/issues/22517
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 82a7e6ca31b416a7f0e41b5fda4c403d1d6be947)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
7 years agorgw: retry CORS put/delete operations on ECANCELLED
Adam C. Emerson [Tue, 19 Dec 2017 17:53:05 +0000 (12:53 -0500)]
rgw: retry CORS put/delete operations on ECANCELLED

Fixes: http://tracker.ceph.com/issues/22517
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit bff7e61ca5a66b301ec49c1cf9054d1b74535832)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
7 years agorgw: Expire entries in bucket info cache
Adam C. Emerson [Fri, 17 Nov 2017 22:15:26 +0000 (17:15 -0500)]
rgw: Expire entries in bucket info cache

To bound the degree to which an RGW instance can go out to lunch if
the watch/notify breaks down, force refresh of any cache entry over a
certain age.

Fifteen minutes by default, and expiration can be turned off entirely.

This is separate from the LRU. The LRU removes entries based on the
last time of access. This expiration patch forces refresh based on the
last time they were updated.

Fixes: http://tracker.ceph.com/issues/22517
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 4489cb58a15647a31ac0546d70400af5668404cb)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
7 years agorgw: Handle stale bucket info in RGWDeleteBucketWebsite
Adam C. Emerson [Fri, 17 Nov 2017 21:05:06 +0000 (16:05 -0500)]
rgw: Handle stale bucket info in RGWDeleteBucketWebsite

Fixes: http://tracker.ceph.com/issues/22517
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit f4d274248e43cb38ff2b27782c010b2c35b12b2b)

7 years agorgw: Handle stale bucket info in RGWSetBucketWebsite
Adam C. Emerson [Fri, 17 Nov 2017 21:03:13 +0000 (16:03 -0500)]
rgw: Handle stale bucket info in RGWSetBucketWebsite

Fixes: http://tracker.ceph.com/issues/22517
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit b2b7385f194def1025a8947bab876c9856b06400)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
7 years agorgw: Handle stale bucket info in RGWSetBucketVersioning
Adam C. Emerson [Fri, 17 Nov 2017 20:59:44 +0000 (15:59 -0500)]
rgw: Handle stale bucket info in RGWSetBucketVersioning

Fixes: http://tracker.ceph.com/issues/22517
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit a0a1e7c2ef992b8758bcfb20d893730c1b202475)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
7 years agorgw: Handle stale bucket info in RGWPutMetadataBucket
Adam C. Emerson [Fri, 17 Nov 2017 20:53:05 +0000 (15:53 -0500)]
rgw: Handle stale bucket info in RGWPutMetadataBucket

Fixes: http://tracker.ceph.com/issues/22517
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit ebb86301b20098e15824f469001f6153b27965f5)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
7 years agorgw: Add retry_raced_bucket_write
Adam C. Emerson [Fri, 17 Nov 2017 20:51:42 +0000 (15:51 -0500)]
rgw: Add retry_raced_bucket_write

If the OSD informs us that our bucket info is out of date when we need
to write, we should have a way to update it.

This template function allows us to wrap relevant sections of code so
they'll be retried against new bucket info on -ECANCELED.

Fixes: http://tracker.ceph.com/issues/22517
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 1a3fcc70c0747791aa423cd0aa7d2596eaf3d73c)

7 years agorgw: Add try_refresh_bucket_info function
Adam C. Emerson [Thu, 16 Nov 2017 19:42:58 +0000 (14:42 -0500)]
rgw: Add try_refresh_bucket_info function

Sometimes operations fail with -ECANCELED. This means we got raced. If
this happens we should update our bucket info from cache and try again.

Some user reports suggest that our cache may be getting and staying
out of sync. This is a bug and should be fixed, but it would also be
nice if we were robust enough to notice the problem and refresh.

So in that case, we invalidate the cache and fetch direct from the
OSD, putting a warning in the log.

Fixes: http://tracker.ceph.com/issues/22517
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 9114e5e50995f0c7d2be5c24aa4712d89cd89f48)
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
7 years agoradosgw: fix doubled underscore with s3/swift server-side copy 19747/head
Marcus Watts [Tue, 2 Jan 2018 22:24:38 +0000 (17:24 -0500)]
radosgw: fix doubled underscore with s3/swift server-side copy

A name is almost an oid.  Except that if a name starts
with a _, the corresponding oid starts with a double _.
The copy logic passes the oid straight in as a name,
which results in a triple _ on the oid, resulting in
an object name with a double __.

Fix: remove one _ when converting an oid back into
a name, so that the final oid only has a double _.

Fixes: http://tracker.ceph.com/issues/22529
This change is not needed on master or Luminous, due to
already-merged #18662.

Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
7 years agoMerge pull request #19656 from tchaikov/wip-install-deps-jewel
Nathan Cutler [Fri, 29 Dec 2017 17:27:12 +0000 (18:27 +0100)]
Merge pull request #19656 from tchaikov/wip-install-deps-jewel

jewel: install-deps.sh: update g++ symlink also

Reviewed-by: Nathan Cutler <ncutler@suse.com>
7 years agoMerge pull request #19603 from ceph/wip-jewel-ansible-branch
Sage Weil [Fri, 29 Dec 2017 16:44:20 +0000 (10:44 -0600)]
Merge pull request #19603 from ceph/wip-jewel-ansible-branch

qa/tests: use 'stable-2.1' branch for jewel testing

7 years agoinstall-deps.sh: update g++ symlink also 19656/head
Kefu Chai [Fri, 22 Dec 2017 14:42:16 +0000 (22:42 +0800)]
install-deps.sh: update g++ symlink also

we need to update g++ symlink also, if it points to the wrong version

http://tracker.ceph.com/issues/22220
Signed-off-by: Kefu Chai <kchai@redhat.com>
Conflicts: the libboost issue does not affect master. as master builds
     boost from source. so, it's not cherry-picked from master.

7 years agorbd-mirror: cluster watcher should ensure it has latest OSD map 19644/head
Jason Dillaman [Fri, 15 Dec 2017 19:51:46 +0000 (14:51 -0500)]
rbd-mirror: cluster watcher should ensure it has latest OSD map

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

7 years agoqa/tests: use 'stable-2.1' branch for jewel testing 19603/head
Vasu Kulkarni [Tue, 19 Dec 2017 21:04:56 +0000 (13:04 -0800)]
qa/tests: use 'stable-2.1' branch for jewel testing

Signed-off-by: Vasu Kulkarni <vasu@redhat.com>
7 years agoMerge pull request #19521 from tchaikov/wip-22220-jewel
Kefu Chai [Fri, 15 Dec 2017 06:02:15 +0000 (14:02 +0800)]
Merge pull request #19521 from tchaikov/wip-22220-jewel

jewel: install-deps.sh: readlink /usr/bin/gcc not /usr/bin/x86_64-linux-gnu-gcc

Signed-off-by: Nathan Cutler <ncutler@suse.com>
7 years agoinstall-deps.sh: readlink /usr/bin/gcc not /usr/bin/x86_64-linux-gnu-gcc 19521/head
Kefu Chai [Thu, 14 Dec 2017 13:01:43 +0000 (21:01 +0800)]
install-deps.sh: readlink /usr/bin/gcc not /usr/bin/x86_64-linux-gnu-gcc

See: http://tracker.ceph.com/issues/22220
Signed-off-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #19461 from tchaikov/wip-22220-jewel
Kefu Chai [Thu, 14 Dec 2017 12:28:45 +0000 (20:28 +0800)]
Merge pull request #19461 from tchaikov/wip-22220-jewel

jewel: install-deps.sh: point gcc to the one shipped by distro

Reviewed-by: Nathan Cutler <ncutler@suse.com>
7 years agoinstall-deps.sh: point gcc to the one shipped by distro 19461/head
Kefu Chai [Wed, 13 Dec 2017 05:36:54 +0000 (13:36 +0800)]
install-deps.sh: point gcc to the one shipped by distro

to define a struct in a method is legal in C++11, but it causes internal
compiler error due to https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82155
if we are using GCC-7. so we need to either workaround in our source
code by moving the struct definition out of the member method or revert
to a GCC without this bug. but if we go with the first route, the jewel
build still fails, because GCC-7 starts to use the new CXX11 ABI, which
is not compatible with the libboost we use in jewel. the libboost was
still built with the old ABI for backward compatibility. so let's just
fix the install-deps.sh to point gcc to the origin one.

See: http://tracker.ceph.com/issues/22220
Signed-off-by: Kefu Chai <kchai@redhat.com>
Conflicts: the libboost issue does not affect master. as master builds
 boost from source. so, it's not cherry-picked from master.

7 years agorgw: fix chained cache invalidation to prevent cache size growth 19469/head
Mark Kogan [Tue, 12 Dec 2017 15:34:05 +0000 (10:34 -0500)]
rgw: fix chained cache invalidation to prevent cache size growth
above the rgw_cache_lru_size limit

Fixes: http://tracker.ceph.com/issues/22410
Signed-off-by: Mark Kogan <mkogan@redhat.com>
(cherry picked from commit a6a1b664d313a54ad9d2f64b859296b1352b1ce4)

7 years agoMerge pull request #19214 from liewegas/wip-no-ec-upgrade-test
Sage Weil [Tue, 28 Nov 2017 16:28:38 +0000 (10:28 -0600)]
Merge pull request #19214 from liewegas/wip-no-ec-upgrade-test

qa/workunitse/rados/test/test-upgrade-11.0.0-noec: more *EC* skipping

7 years agoqa/workunitse/rados/test/test-upgrade-11.0.0-noec: more *EC* skipping 19214/head
Sage Weil [Tue, 28 Nov 2017 16:21:59 +0000 (10:21 -0600)]
qa/workunitse/rados/test/test-upgrade-11.0.0-noec: more *EC* skipping

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agoradosgw: fix swift anonymous access. 19194/head
Marcus Watts [Sun, 26 Nov 2017 23:43:23 +0000 (18:43 -0500)]
radosgw: fix swift anonymous access.

With swift: when accessing a bucket anonymously (no credentials),
must set the bucket tenant appropriately in order to access the container.

Fixes: http://tracker.ceph.com/issues/22259
Signed-off-by: Marcus Watts <mwatts@redhat.com>
7 years agoMerge pull request #19176 from liewegas/wip-no-ec-upgrade-test
Sage Weil [Mon, 27 Nov 2017 16:30:07 +0000 (10:30 -0600)]
Merge pull request #19176 from liewegas/wip-no-ec-upgrade-test

qa/workunits/rados/test-upgrade-11.0.0-noec.yaml: skip ec tests

7 years agoqa/workunits/rados/test-upgrade-11.0.0-noec.yaml: skip ec tests 19176/head
Sage Weil [Mon, 27 Nov 2017 16:24:47 +0000 (10:24 -0600)]
qa/workunits/rados/test-upgrade-11.0.0-noec.yaml: skip ec tests

This is needed for jewel-x point to point upgrade because earlier point
releases can't handle our ec profiles with ruleset-* (later ones can) and
the test races with the mon upgrades.

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agorbd: disk usage on empty pool no longer returns an error message 19186/head
Jason Dillaman [Mon, 20 Nov 2017 16:03:17 +0000 (11:03 -0500)]
rbd: disk usage on empty pool no longer returns an error message

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

7 years agoMerge pull request #19153 from smithfarm/wip-22236-jewel
Kefu Chai [Sun, 26 Nov 2017 16:42:30 +0000 (00:42 +0800)]
Merge pull request #19153 from smithfarm/wip-22236-jewel

jewel: ceph-disk flake8 test fails on very old, and very new, versions of flake8

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agotests: ceph-disk: ignore E722 in flake8 test 19153/head
Nathan Cutler [Tue, 21 Nov 2017 10:36:02 +0000 (11:36 +0100)]
tests: ceph-disk: ignore E722 in flake8 test

Very old, and very new, versions of flake8 treat E722 as an error:

flake8 runtests: commands[0] | flake8 --ignore=H105,H405,E127 ceph_disk tests
ceph_disk/main.py:1575:9: E722 do not use bare except'
ceph_disk/main.py:1582:9: E722 do not use bare except'
ceph_disk/main.py:3252:5: E722 do not use bare except'
ceph_disk/main.py:3288:21: E722 do not use bare except'
ceph_disk/main.py:3296:17: E722 do not use bare except'
ceph_disk/main.py:4358:5: E722 do not use bare except'
tests/test_main.py:26:1: E722 do not use bare except'
ERROR: InvocationError: '/opt/j/ws/mkck/src/ceph-disk/.tox/flake8/bin/flake8 --ignore=H105,H405,E127 ceph_disk tests'

Fixes: http://tracker.ceph.com/issues/22207
References: https://gitlab.com/pycqa/flake8/issues/361

Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit 3600cd7bfdca76485d2998c5da1a0dd25816d1ce)

7 years agoMerge pull request #19121 from liewegas/wip-jewel-x-fix
Kefu Chai [Fri, 24 Nov 2017 02:08:07 +0000 (10:08 +0800)]
Merge pull request #19121 from liewegas/wip-jewel-x-fix

qa/workunits/rados/test-upgrade-11.0.0: skip LibRadosMiscECPP.CompareExtentRange

Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoqa/workunits/rados/test-upgrade-11.0.0: skip LibRadosMiscECPP.CompareExtentRange 19121/head
Sage Weil [Thu, 23 Nov 2017 21:47:56 +0000 (15:47 -0600)]
qa/workunits/rados/test-upgrade-11.0.0: skip LibRadosMiscECPP.CompareExtentRange

Signed-off-by: Sage Weil <sage@redhat.com>
7 years agolibrbd: invalidating the cache shouldn't hold write lock 19115/head
Jason Dillaman [Wed, 15 Nov 2017 15:35:16 +0000 (10:35 -0500)]
librbd: invalidating the cache shouldn't hold write lock

This can cause deadlock when readahead is in-progress since neither
can make forward progress.

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

7 years agorbd-nbd: rescan partition table after image resize event
Jason Dillaman [Wed, 15 Nov 2017 15:34:32 +0000 (10:34 -0500)]
rbd-nbd: rescan partition table after image resize event

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

Conflicts:
src/tools/rbd_nbd/rbd-nbd.cc : resolved in handle_notify

7 years agolibrbd: set deleted parent pointer to null 19098/head
Jason Dillaman [Sat, 18 Nov 2017 13:30:27 +0000 (08:30 -0500)]
librbd: set deleted parent pointer to null

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

7 years agoosd: Scrub of object with only object error(s) are not logged 18951/head
David Zafman [Sat, 21 Oct 2017 02:50:32 +0000 (19:50 -0700)]
osd: Scrub of object with only object error(s) are not logged

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 1ad05b1068ddd5d3312af45af1a60587200ddcd7)

7 years agoosd: Only scan for omap corruption once
David Zafman [Wed, 13 Sep 2017 00:17:13 +0000 (17:17 -0700)]
osd: Only scan for omap corruption once

Before
  state 2: Can have complete tables (some may be bad)
state 3: Never had complete tables
After
  state 2: Can have complete tables (some may be bad)
state 3 with legacy: Can have complete tables (bad ones are cleared)
state 3: Never had complete tables

Once OSDs boot with this change you can't downgrade to a previous release.
If someone does downgrade they could have unstable OSDs that hit assert(state.v < 3).
The following command run after shutting down the cluster but before downgrading
ceph packages would be a way to fix this.

ceph-osdomap-tool --omap-path ... --command resetv2

Fixes: http://tracker.ceph.com/issues/21328
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 8805ef53424e30fd3f24ee38f5a6bdd9e6dd8641)

Conflicts:
src/os/filestore/DBObjectMap.h (trivial)

7 years agotools: Add the ability to reset state to v2
David Zafman [Wed, 13 Sep 2017 06:14:15 +0000 (23:14 -0700)]
tools: Add the ability to reset state to v2

Available for testing and user downgrade.

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 3e4d68640cc43efc0cf10ea8119b3aa583b7f36b)

Conflicts:
src/tools/ceph_osdomap_tool.cc (trivial)

7 years agotools: Show DB state information
David Zafman [Wed, 13 Sep 2017 05:12:52 +0000 (22:12 -0700)]
tools: Show DB state information

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 3214882a95f9f70d9f6d28f4e403ee16324530f9)

7 years agotools: Add --backend option to ceph-osdomap-tool default to rocksdb
David Zafman [Wed, 13 Sep 2017 01:06:10 +0000 (18:06 -0700)]
tools: Add --backend option to ceph-osdomap-tool default to rocksdb

Fix hard-coded "leveldb" backend.  The command is broken in Luminous
now that "rocksdb" is the default.

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit de43493990923bcdd20f88e9d04647e5ba709feb)

Conflicts:
src/tools/ceph_osdomap_tool.cc (trivial)

7 years agorbd: fix crash during map 18843/head
Peter Keresztes Schmidt [Sun, 15 Oct 2017 04:36:54 +0000 (06:36 +0200)]
rbd: fix crash during map

Currently the iterator isn't advanced after the erase call leading to a
second call on the iterator, which crashes due to a double free.
Since C++11 the map::erase function returns an iterator pointing to the
next element. Use the return value to set the iterator after erasing.

Fixes: http://tracker.ceph.com/issues/21808
Signed-off-by: Peter Keresztes Schmidt <carbenium@outlook.com>
(cherry picked from commit 9e49c4124422e58dd40dfb6038425430d3845412)

7 years agotest: Fix osd-scrub-repair.sh for Jewel 18690/head
David Zafman [Fri, 3 Nov 2017 00:49:14 +0000 (17:49 -0700)]
test: Fix osd-scrub-repair.sh for Jewel

The alloc_hint addition is caused by: 3bdd4398f1dcad0b7e22f1750ca524b97feca15a

Signed-off-by: David Zafman <dzafman@redhat.com>
7 years agotest: Test case that reproduces tracker 18162
David Zafman [Mon, 2 Oct 2017 20:51:17 +0000 (13:51 -0700)]
test: Test case that reproduces tracker 18162

recover_replicas: object added to missing set for backfill, but is not in recovering, error!

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit b9de5eec267627c8bc5ff0759ddea6c4a8aa7bce)

Conflicts:
src/test/erasure-code/test-erasure-eio.sh (Errors during backfill/recovery doesn't change state)

7 years agoMerge pull request #17082 from vumrao/wip-vumrao-scrub-recovery-false
Kefu Chai [Fri, 3 Nov 2017 13:55:04 +0000 (21:55 +0800)]
Merge pull request #17082 from vumrao/wip-vumrao-scrub-recovery-false

jewel: osd: default osd_scrub_during_recovery=false

Reviewed-by: David Zafman <dzafman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #17841 from smithfarm/wip-21478-jewel
Kefu Chai [Fri, 3 Nov 2017 13:52:25 +0000 (21:52 +0800)]
Merge pull request #17841 from smithfarm/wip-21478-jewel

jewel: systemd: Add explicit Before=ceph.target

Reviewed-by: Tim Serong <tserong@suse.com>
Reviewed-by: Boris Ranto <branto@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #17847 from batrick/i21481
Kefu Chai [Fri, 3 Nov 2017 13:49:59 +0000 (21:49 +0800)]
Merge pull request #17847 from batrick/i21481

jewel: qa: use xfs instead of btrfs w/ filestore

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #17101 from vumrao/wip-vumrao-jewel
Kefu Chai [Fri, 3 Nov 2017 13:47:29 +0000 (21:47 +0800)]
Merge pull request #17101 from vumrao/wip-vumrao-jewel

jewel: core: Addition of online osd 'omap'compaction command

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: liuchang0812 <liuchang0812@gmail.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #17893 from dzafman/wip-19140-19224
Kefu Chai [Fri, 3 Nov 2017 13:42:59 +0000 (21:42 +0800)]
Merge pull request #17893 from dzafman/wip-19140-19224

jewel: osd ops (sent and?) arrive at osd out of order

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #18080 from linuxbox2/jewel-awsv4-sort
Kefu Chai [Fri, 3 Nov 2017 13:36:29 +0000 (21:36 +0800)]
Merge pull request #18080 from linuxbox2/jewel-awsv4-sort

jewel: radosgw: fix awsv4 header line sort order.

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
7 years agoMerge pull request #18165 from tchaikov/wip-no-btrfs-jewel
Kefu Chai [Fri, 3 Nov 2017 13:33:52 +0000 (21:33 +0800)]
Merge pull request #18165 from tchaikov/wip-no-btrfs-jewel

jewel: qa: use xfs instead of btrfs w/ filestore

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
7 years agoqa/suites: add objectstore facet where it was missing 18165/head
Sage Weil [Tue, 28 Mar 2017 16:03:41 +0000 (12:03 -0400)]
qa/suites: add objectstore facet where it was missing

There are places where we were testing xfs vs btrfs on
filestore and now want to cover both filestore and bluestore.

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

Conflicts: remove bluestore.yaml as jewel does not support it. and
  remove links to objectstore from where the tests do not exist in jewel
  yet, for instance, qa/suites/mgr/basic.

7 years agoMerge pull request #17594 from tchaikov/wip-jewel-20616
Kefu Chai [Fri, 3 Nov 2017 05:51:29 +0000 (13:51 +0800)]
Merge pull request #17594 from tchaikov/wip-jewel-20616

jewel: librados: copy out data to users' buffer for xio

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
7 years agoosd: Better handle failure to get enough EC shards to backfill
David Zafman [Wed, 4 Oct 2017 01:32:20 +0000 (18:32 -0700)]
osd: Better handle failure to get enough EC shards to backfill

Fixes: http://tracker.ceph.com/issues/18162
Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 6a02bfef3d44a13589c1a90bec29ff0ac64f97aa)

Conflicts:
src/osd/PGBackend.h (trivial)
src/osd/ReplicatedPG.cc (trivial)
src/osd/ReplicatedPG.h (trivial)

7 years agoosd: For recovery get all possible shards to read on errors
David Zafman [Fri, 22 Sep 2017 03:35:27 +0000 (20:35 -0700)]
osd: For recovery get all possible shards to read on errors

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 390d12f71a1bd6e07f3516b1c73e467e9960725d)

Conflicts:
src/osd/ECBackend.h (trivial)

7 years agoosd: Allow recovery to send additional reads
David Zafman [Fri, 22 Sep 2017 00:48:28 +0000 (17:48 -0700)]
osd: Allow recovery to send additional reads

For now it doesn't include non-acting OSDs
Added test for this case

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit 1235810c2ad08ccb7ef5946686eb2b85798f5bca)

7 years agotest: Allow modified options to existing setup functions
David Zafman [Thu, 21 Sep 2017 21:49:17 +0000 (14:49 -0700)]
test: Allow modified options to existing setup functions

Signed-off-by: David Zafman <dzafman@redhat.com>
(cherry picked from commit f92aa6c82449152901a4663c523e9ba43363eca3)

Conflicts:
src/test/erasure-code/test-erasure-eio.sh (trivial)