]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
7 years agorbdmap: fix umount when multiple mounts use the same RBD 17998/head
Alexandre Marangone [Tue, 26 Sep 2017 18:35:04 +0000 (11:35 -0700)]
rbdmap: fix umount when multiple mounts use the same RBD

When a Kubernetes Pod consumes a RBD it is mounted two
times on the same host. When the host shutdown umount will
fail leading to a hung system

Signed-off-by: Alexandre Marangone <amarango@redhat.com>
(cherry picked from commit 40825daecedb2a3481021e4d36a367c339eb9b62)

7 years agoMerge pull request #17922 from batrick/kcephfs-backports
Nathan Cutler [Mon, 25 Sep 2017 13:43:06 +0000 (15:43 +0200)]
Merge pull request #17922 from batrick/kcephfs-backports

luminous: qa: kcephfs whitelist fixes

Reviewed-by: Yan, Zheng <zyan@redhat.com>
7 years agoMerge pull request #17855 from smithfarm/wip-21490-luminous
Yuri Weinstein [Fri, 22 Sep 2017 20:25:59 +0000 (13:25 -0700)]
Merge pull request #17855 from smithfarm/wip-21490-luminous

luminous: tests: test_rebuild_simple_altpool triggers MDS assertion

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
7 years agoqa: get config only on running MDS 17855/head
Patrick Donnelly [Wed, 20 Sep 2017 22:44:40 +0000 (15:44 -0700)]
qa: get config only on running MDS

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

7 years agoqa: whitelist cache too large in client-limits 17922/head
Patrick Donnelly [Fri, 22 Sep 2017 16:44:43 +0000 (09:44 -0700)]
qa: whitelist cache too large in client-limits

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

7 years agoqa: whitelist failover log warnings
Patrick Donnelly [Fri, 22 Sep 2017 16:42:06 +0000 (09:42 -0700)]
qa: whitelist failover log warnings

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

7 years agoqa: ignore evicted client in client-recovery
Patrick Donnelly [Fri, 22 Sep 2017 16:38:59 +0000 (09:38 -0700)]
qa: ignore evicted client in client-recovery

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

7 years agoMerge PR #17878 into luminous
Patrick Donnelly [Fri, 22 Sep 2017 16:53:43 +0000 (09:53 -0700)]
Merge PR #17878 into luminous

* refs/remotes/upstream/pull/17878/head:
qa/cephfs: Fix error in test_filtered_df

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Amit Kumar <amitkuma@redhat.com>
7 years agoMerge PR #17877 into luminous
Patrick Donnelly [Fri, 22 Sep 2017 16:53:41 +0000 (09:53 -0700)]
Merge PR #17877 into luminous

* refs/remotes/upstream/pull/17877/head:
client: Delete onsafe
client: add mountedness check inside client_lock

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
7 years agoMerge PR #17870 into luminous
Patrick Donnelly [Fri, 22 Sep 2017 16:53:39 +0000 (09:53 -0700)]
Merge PR #17870 into luminous

* refs/remotes/upstream/pull/17870/head:
mds: reset Formatter on error

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Amit Kumar <amitkuma@redhat.com>
7 years agoMerge PR #17854 into luminous
Patrick Donnelly [Fri, 22 Sep 2017 16:53:37 +0000 (09:53 -0700)]
Merge PR #17854 into luminous

* refs/remotes/upstream/pull/17854/head:
mds: void sending cap import message when inode is frozen
client: fix message order check in handle_cap_export()

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
7 years agoMerge PR #17852 into luminous
Patrick Donnelly [Fri, 22 Sep 2017 16:53:35 +0000 (09:53 -0700)]
Merge PR #17852 into luminous

* refs/remotes/upstream/pull/17852/head:
mds: check ongoing catter-gather process before capping log

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
7 years agoMerge PR #17822 into luminous
Patrick Donnelly [Fri, 22 Sep 2017 16:53:33 +0000 (09:53 -0700)]
Merge PR #17822 into luminous

* refs/remotes/upstream/pull/17822/head:
qa/cephfs: kill mount if it gets evicted by mds
qa/cephfs: fix test_evict_client

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Zheng Yan <zyan@redhat.com>
7 years agoMerge pull request #17817 from smithfarm/wip-21464-luminous
Yuri Weinstein [Fri, 22 Sep 2017 16:44:54 +0000 (09:44 -0700)]
Merge pull request #17817 from smithfarm/wip-21464-luminous

luminous: qa: ignorable MDS_READ_ONLY warning

Reviewed-by: Yan, Zheng <ukernel@gmail.com>
Reviewed-by: Yuri Weinstein <yweins@redhat.com>
7 years agoMerge pull request #17879 from smithfarm/wip-21449-luminous
Yuri Weinstein [Fri, 22 Sep 2017 16:41:18 +0000 (09:41 -0700)]
Merge pull request #17879 from smithfarm/wip-21449-luminous

luminous: tests: test_misc creates metadata pool with dummy object resulting in WRN: POOL_APP_NOT_ENABLED

Reviewed-by: Amit Kumar amitkuma@redhat.com
Reviewed-by: Yan, Zheng <ukernel@gmail.com>
7 years agoMerge pull request #17886 from smithfarm/wip-21486-luminous
Yuri Weinstein [Fri, 22 Sep 2017 16:40:46 +0000 (09:40 -0700)]
Merge pull request #17886 from smithfarm/wip-21486-luminous

luminous: tests: [kcephfs] test_client_pin times out waiting for dentry release from kernel

Reviewed-by: Amit Kumar amitkuma@redhat.com
Reviewed-by: Yan, Zheng <ukernel@gmail.com>
7 years agoMerge pull request #17887 from smithfarm/wip-21487-luminous
Yuri Weinstein [Fri, 22 Sep 2017 16:39:26 +0000 (09:39 -0700)]
Merge pull request #17887 from smithfarm/wip-21487-luminous

luminous: cephfs: MDS rank add/remove log messages say wrong number of ranks

Reviewed-by: Amit Kumar amitkuma@redhat.com
Reviewed-by: Yan, Zheng <ukernel@gmail.com>
7 years agoMerge pull request #17888 from smithfarm/wip-21488-luminous
Yuri Weinstein [Fri, 22 Sep 2017 16:37:42 +0000 (09:37 -0700)]
Merge pull request #17888 from smithfarm/wip-21488-luminous

luminous: tests: failures from pjd fstest

Reviewed-by: Amit Kumar amitkuma@redhat.com
Reviewed-by: Yan, Zheng <ukernel@gmail.com>
7 years agoMerge pull request #17812 from liewegas/wip-21410-luminous
Sage Weil [Thu, 21 Sep 2017 15:56:16 +0000 (10:56 -0500)]
Merge pull request #17812 from liewegas/wip-21410-luminous

Revert "osd/OSDMap: allow bidirectional swap of pg-upmap-items"

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
7 years agoceph: do link/rename semantic checks after srcdn is readable 17888/head
Yan, Zheng [Sun, 17 Sep 2017 08:51:04 +0000 (16:51 +0800)]
ceph: do link/rename semantic checks after srcdn is readable

For hard link, source inode must not be directory. For rename,
types of source/destination inodes must match. If srcdn is replica
and we do these checks while it's not readble, it's possible that
wrong source inode is used in these checks.

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

7 years agomon/MDSMonitor: fix clog msgs on MDS rank add/rm 17887/head
John Spray [Mon, 18 Sep 2017 17:16:40 +0000 (13:16 -0400)]
mon/MDSMonitor: fix clog msgs on MDS rank add/rm

Because these were generated before the actual
change, the get_num_in values did not make sense.

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

7 years agoclient: set client_try_dentry_invalidate to false by default 17886/head
Yan, Zheng [Tue, 19 Sep 2017 06:38:13 +0000 (14:38 +0800)]
client: set client_try_dentry_invalidate to false by default

By default, ceph-fuse uses side effect of 'dentry invalidation' to
trim kernel dcache if it runs on kernel < 3.18. The implemention of
kernel function d_invalidate() changed in 3.18 kernel, the method no
longer works for upstream kernel >= 3.18.

RHEL 3.10 kernel includes backport of patches that change implemention
of d_invalidate(). So checking kernel version to decide if 'dentry
invalidation' method works is unreliable.

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

7 years agoqa/tasks/cephfs: Whitelist POOL_APP_NOT_ENABLED for test_misc 17879/head
Douglas Fuller [Tue, 12 Sep 2017 17:22:09 +0000 (13:22 -0400)]
qa/tasks/cephfs: Whitelist POOL_APP_NOT_ENABLED for test_misc

test_misc verifies that ceph fs new will not create a filesystem
on a pool that already contains objects. As part of the test, it
inserts a dummy object into a pool and then attempts to use it for
CephFS. This triggers POOL_APP_NOT_ENABLED. Setting the application
metadata for the pool (and having ceph fs new fail because of the
existing metadata) would then exercise a different failure case.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
(cherry picked from commit eba01c48ca8b3113b1faf353990533a5ae39232c)

7 years agoqa/cephfs: Fix error in test_filtered_df 17878/head
Douglas Fuller [Wed, 13 Sep 2017 18:00:20 +0000 (14:00 -0400)]
qa/cephfs: Fix error in test_filtered_df

ceph df accounts for pool size, so there is no need to do it in the test.

Fixes: http://tracker.ceph.com/issues/21381
Signed-off-by: Douglas Fuller <dfuller@redhat.com>
(cherry picked from commit b059cb6290d81df07bd8ec4e1ec9ef0be24892a2)

7 years agoclient: Delete onsafe 17877/head
Jos Collin [Thu, 7 Sep 2017 07:11:40 +0000 (12:41 +0530)]
client: Delete onsafe

Variable "onsafe" going out of scope leaks the storage it points to. This fixes the Coverity
Scan CID 1417473.

Signed-off-by: Jos Collin <jcollin@redhat.com>
(cherry picked from commit e24a91e9189587c800ef5709c78f1bc0e0ac8419)

7 years agoclient: add mountedness check inside client_lock
Jeff Layton [Fri, 25 Aug 2017 12:31:47 +0000 (08:31 -0400)]
client: add mountedness check inside client_lock

Currently we check for mountedness in the high level wrappers, but those
checks are lockless. It's possible to have a call that races with
ceph_unmount(). It could pass one of the is_mounted() checks in the
wrapper, and then block on the client_lock while the unmount is actually
running. Eventually it picks up and runs after the unmount returns, with
questionable results -- possibly even a crash in some cases.

For now, we can explain this away with a simple admonition that
applications should ensure that no calls are running when ceph_unmount
is called. In the future though, we may need to forcibly shut down the
mount when certain events occur (not returning a lease or delegation in
time, for instance).

Sprinkle in a bunch of "unmounting" checks after taking the client_lock,
and simply have the functions return errors (or sensible values in some
cases) when the Client is being downed. With that, we ensure that this
sort of race can't occur, even when the unmount is not being driven by
userland. Note too that in some places I've replaced assertions in the
code with error returns, as that's nicer behavior for libraries.

Note that this can't replace the ->is_mounted() checks in the lockless
wrappers as those are needed to determine whether the client pointer in
the ceph_mount_info is still valid. The admonition not to allow
ceph_unmount to race with other calls is therefore still necessary.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
(cherry picked from commit efca340596ef4da2b254ff1c64ec4c462d7b95a5)

7 years agomds: reset Formatter on error 17870/head
Patrick Donnelly [Tue, 5 Sep 2017 21:44:49 +0000 (14:44 -0700)]
mds: reset Formatter on error

This prevents partial results from concatenating with the error message.

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

7 years agoqa/cephfs: Refactor alternate pool test
Douglas Fuller [Wed, 12 Jul 2017 15:48:42 +0000 (10:48 -0500)]
qa/cephfs: Refactor alternate pool test

Remove the alternate pool recovery test from test_data_scan. Newer
commits will place the test in its own file.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
(cherry picked from commit 47318f8ac4391148a1394846dd77c8452b7cf5ae)

7 years agoqa/cephfs: test CephFS recovery pools
Douglas Fuller [Wed, 12 Jul 2017 15:45:13 +0000 (10:45 -0500)]
qa/cephfs: test CephFS recovery pools

Test recovering metadata in to a separate RADOS pool with
cephfs_data_scan and friends.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
(cherry picked from commit 6af2ae80d327e564ad17f2caeded9c8142becf29)

7 years agoqa/cephfs: support CephFS recovery pools
Douglas Fuller [Wed, 12 Jul 2017 15:43:39 +0000 (10:43 -0500)]
qa/cephfs: support CephFS recovery pools

Add support for testing recovery of CephFS metadata into an alternate
RADOS pool, useful as a disaster recovery mechanism that avoids
modifying the metadata in-place.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
(cherry picked from commit 8f9a25202093339afb5308051d354d3ae79c6b2d)

7 years agoqa/cephfs: Allow deferred fs creation
Douglas Fuller [Wed, 26 Jul 2017 17:05:59 +0000 (13:05 -0400)]
qa/cephfs: Allow deferred fs creation

Permit Filesystem objects to be created and settings modified before
calling Filesystem.create().

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
(cherry picked from commit 5fafc03cb9e6d5f39ce494375ea28c89b896e2f5)

7 years agoqa/ceph_test_case: support CephFS recovery pools
Douglas Fuller [Wed, 12 Jul 2017 15:41:11 +0000 (10:41 -0500)]
qa/ceph_test_case: support CephFS recovery pools

Add support for testing recovery of CephFS metadata into an alternate
RADOS pool, useful as a disaster recovery mechanism that avoids
modifying the metadata in-place.

Signed-off-by: Douglas Fuller <dfuller@redhat.com>
(cherry picked from commit c85562c94a80b8a18975b8d0ee6a7fbd932cf024)

7 years agomds: void sending cap import message when inode is frozen 17854/head
Yan, Zheng [Tue, 29 Aug 2017 03:35:56 +0000 (11:35 +0800)]
mds: void sending cap import message when inode is frozen

To export an inode to other mds, mds need to:

- Freeze the inode (stop issuing caps to clients)
- Flush client sessions (ensure client have received all cap messages)
- Send cap export message

These steps guarantee that clients receive cap import/export messages
in proper order (In the case that inode gets exported servel times
within a short time)

When inode is frozen, mds may have already flushed client sessions.
So mds shouldn't send cap import messages.

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

7 years agoclient: fix message order check in handle_cap_export()
Yan, Zheng [Mon, 28 Aug 2017 09:13:31 +0000 (17:13 +0800)]
client: fix message order check in handle_cap_export()

If importer mds' cap already exists, but cap ID mismatches, client
should have received corresponding import message (the imported caps
got released later). Because cap ID does not change as long as client
holds the caps.

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

7 years agomds: check ongoing catter-gather process before capping log 17852/head
Yan, Zheng [Thu, 21 Sep 2017 02:56:07 +0000 (10:56 +0800)]
mds: check ongoing catter-gather process before capping log

When deactivating mds, MDLog::trim() may start scatter-gather
process on mdsdir inode. Locker::scatter_writebehind() submits
log entry. So mds should make sure there is no scatter-gather
before capping log.

Fixes: http://tracker.ceph.com/issues/21467
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
7 years agoMerge pull request #17829 from jdurgin/wip-21428-luminous
Josh Durgin [Wed, 20 Sep 2017 15:08:14 +0000 (08:08 -0700)]
Merge pull request #17829 from jdurgin/wip-21428-luminous

osd/PrimaryLogPG: request osdmap update in the right block

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoosd/PrimaryLogPG: request osdmap update in the right block 17829/head
Josh Durgin [Wed, 20 Sep 2017 05:18:35 +0000 (01:18 -0400)]
osd/PrimaryLogPG: request osdmap update in the right block

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

7 years agoqa/cephfs: kill mount if it gets evicted by mds 17822/head
Yan, Zheng [Wed, 13 Sep 2017 08:34:40 +0000 (16:34 +0800)]
qa/cephfs: kill mount if it gets evicted by mds

otherwise, teardown() hange at umount

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

7 years agoqa/cephfs: fix test_evict_client
Yan, Zheng [Wed, 13 Sep 2017 08:15:31 +0000 (16:15 +0800)]
qa/cephfs: fix test_evict_client

executing mount_a.kill() twice, then executing mount_b.kill_cleanup()
twice do not make sense.

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

7 years agoMerge pull request #17796 from jdurgin/wip-21428-luminous
Josh Durgin [Tue, 19 Sep 2017 23:45:40 +0000 (16:45 -0700)]
Merge pull request #17796 from jdurgin/wip-21428-luminous

osd: request new map from PG when needed

Reviewed-by: Sage Weil <sage@redhat.com>
7 years agoqa: whitelist expected MDS_READ_ONLY for kcephfs test 17817/head
Yan, Zheng [Tue, 5 Sep 2017 09:09:32 +0000 (17:09 +0800)]
qa: whitelist expected MDS_READ_ONLY for kcephfs test

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

7 years agoosd: request new map from PG when needed 17796/head
Josh Durgin [Tue, 19 Sep 2017 02:31:10 +0000 (22:31 -0400)]
osd: request new map from PG when needed

The fast dispatch refactor in 3cc48278bf0ee5c9535d04b60a661f988c50063b
eliminated the osdmap subscription in the ms_fast_dispatch path, which
meant ops could reach a PG without having the latest map. In a cluster
with few osdmap updates, where the monitor fails to send a new map to
an osd (it tries one random osd), this can result in indefinitely
blocked requests.

Fix this by adding an OSDService mechanism for scheduling a new osdmap
subscription request.

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

7 years agoRevert "osd/OSDMap: allow bidirectional swap of pg-upmap-items" 17812/head
Sage Weil [Fri, 15 Sep 2017 20:52:28 +0000 (16:52 -0400)]
Revert "osd/OSDMap: allow bidirectional swap of pg-upmap-items"

This reverts commit 09af9b8afb40cc8aa629501582a75e03edf0bf2e.

We need to prevent duplicates in the final result.  For example, we
can currently take
 [1,2,3] and apply [(1,2)] and get [2,2,3]
or
 [1,2,3] and apply [(3,2)] and get [1,2,2]

The rest of the system is not prepared to handle duplicates in the
result set like this.

The reverted commit was intended to allow

 [1,2,3] and [(1,2),(2,1)] to get [2,1,3]

to reorder primaries.  First, this bidirectional swap is hard to implement
in a way that also prevents dups.  For example,
 [1,2,3] and [(1,4),(2,3),(3,4)] would give [4,3,4]
but would we just drop the last step we'd have [4,3,3] which
is also invalid, etc.  Simpler to just not handle bidirectional
swaps.  In practice, they are not needed: if you just want to choose
a different primary then use primary_affinity, or pg_upmap
(not pg_upmap_items).

Fixes: http://tracker.ceph.com/issues/21410
Signed-off-by: Sage Weil <sage@redhat.com>
(cherry picked from commit 9c73305e3ad11177d58632eba6ece5d2c0e701da)

7 years agoMerge pull request #17724 from theanalyst/wip-21374-luminous
Abhishek L [Fri, 15 Sep 2017 20:46:27 +0000 (22:46 +0200)]
Merge pull request #17724 from theanalyst/wip-21374-luminous

luminous: incorrect erasure-code space in command ceph df

Reviewed-By: Josh Durgin <jdurgin@redhat.com>
7 years agoMerge pull request #17745 from tchaikov/wip-luminous-20529
Josh Durgin [Fri, 15 Sep 2017 20:35:36 +0000 (13:35 -0700)]
Merge pull request #17745 from tchaikov/wip-luminous-20529

luminous: rocksdb,cmake:  build portable binaries

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
7 years agoMerge pull request #17635 from smithfarm/wip-21342-luminous
Abhishek L [Fri, 15 Sep 2017 19:58:05 +0000 (21:58 +0200)]
Merge pull request #17635 from smithfarm/wip-21342-luminous

luminous: ceph mgr versions shows active mgr as Unknown

Reviewed-By: Josh Durgin <jdurgin@redhat.com>
7 years agoMerge pull request #17634 from smithfarm/wip-21341-luminous
Abhishek L [Fri, 15 Sep 2017 19:57:54 +0000 (21:57 +0200)]
Merge pull request #17634 from smithfarm/wip-21341-luminous

luminous: mon/OSDMonitor: deleting pool while pgs are being created leads to assert(p != pools.end) in update_creating_pgs()

Reviewed-By: Josh Durgin <jdurgin@redhat.com>
7 years agoMerge pull request #17624 from tchaikov/wip-luminous-pr-17599
Abhishek L [Fri, 15 Sep 2017 19:57:13 +0000 (21:57 +0200)]
Merge pull request #17624 from tchaikov/wip-luminous-pr-17599

luminous: encoding: reset optional<> if it is uninitialized

Reviewed-By: Josh Durgin <jdurgin@redhat.com>
7 years agoMerge pull request #17487 from smithfarm/wip-21231-luminous
Abhishek L [Fri, 15 Sep 2017 19:55:41 +0000 (21:55 +0200)]
Merge pull request #17487 from smithfarm/wip-21231-luminous

luminous: core: interval_set: optimize intersect_of insert operations

Reviewed-By: Josh Durgin <jdurgin@redhat.com>
7 years agoMerge pull request #17712 from batrick/bp21221
Abhishek L [Fri, 15 Sep 2017 19:49:37 +0000 (21:49 +0200)]
Merge pull request #17712 from batrick/bp21221

luminous: MDCache::try_subtree_merge() may print N^2 lines of debug message

Reviewed-By: Yan Zhen <zyan@redhat.com>
7 years agoMerge pull request #17623 from liewegas/wip-pr-17572-luminous
Abhishek L [Fri, 15 Sep 2017 19:45:04 +0000 (21:45 +0200)]
Merge pull request #17623 from liewegas/wip-pr-17572-luminous

tools/ceph_objectstore_tool: fix 'dup' unable to duplicate meta PG

Reviewed-By: Josh Durgin <jdurgin@redhat.com>
7 years agoMerge pull request #17584 from jdurgin/wip-recovery-delete-encoding-luminous
Abhishek L [Fri, 15 Sep 2017 19:43:22 +0000 (21:43 +0200)]
Merge pull request #17584 from jdurgin/wip-recovery-delete-encoding-luminous

osd/PGBackend, MOSDPGRecoveryDelete[Reply]: handle incompatible encoding

Reviewed-By: Sage Weil <sage@redhat.com>
7 years agoMerge pull request #17686 from ukernel/luminous-21070
Abhishek L [Fri, 15 Sep 2017 19:39:49 +0000 (21:39 +0200)]
Merge pull request #17686 from ukernel/luminous-21070

luminous: mds: fix 'dirfrag end' check in Server::handle_client_readdir

Reviewed-By: Patrick Donnelly <pdonelly@redhat.com>
7 years agoMerge pull request #17711 from batrick/bp20594
Abhishek L [Fri, 15 Sep 2017 19:38:36 +0000 (21:38 +0200)]
Merge pull request #17711 from batrick/bp20594

luminous: mds: support limiting cache by memory

Reviewed-By: Yan Zheng <zyan@redhat.com>
7 years agoMerge pull request #17714 from batrick/bp21222
Abhishek L [Fri, 15 Sep 2017 19:36:00 +0000 (21:36 +0200)]
Merge pull request #17714 from batrick/bp21222

luminous: MDS: standby-replay mds should avoid initiating subtree export

Reviewed-By: Yan, Zheng <zyan@redhat.com>
7 years agoMerge pull request #17570 from theanalyst/wip-luminous-21233
Abhishek L [Fri, 15 Sep 2017 19:25:56 +0000 (21:25 +0200)]
Merge pull request #17570 from theanalyst/wip-luminous-21233

luminous: rgw: memory leak in MetadataHandlers

Reviewed-By: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #17642 from theanalyst/wip-21350-luminous
Abhishek L [Fri, 15 Sep 2017 19:25:31 +0000 (21:25 +0200)]
Merge pull request #17642 from theanalyst/wip-21350-luminous

luminous: rgw: data encryption sometimes fails to follow AWS settings

Reviewed-By: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #17674 from theanalyst/luminous-rgw-reshard-enable
Abhishek L [Fri, 15 Sep 2017 19:23:01 +0000 (21:23 +0200)]
Merge pull request #17674 from theanalyst/luminous-rgw-reshard-enable

luminous: rgw: reshard enable

Reviewed-By: Orit Wasserman <owasserm@redhat.com>
7 years agoMerge pull request #17479 from smithfarm/wip-21139-luminous
Abhishek L [Fri, 15 Sep 2017 19:22:05 +0000 (21:22 +0200)]
Merge pull request #17479 from smithfarm/wip-21139-luminous

luminous: rgw: put lifecycle configuration fails if Prefix is not set

Reviewed-By: Daniel Gryniewicz <dang@redhat.com>
7 years agocmake: do not pass $SIMD_COMPILE_FLAGS to rocksdb cmake 17745/head
Kefu Chai [Fri, 15 Sep 2017 02:30:16 +0000 (10:30 +0800)]
cmake: do not pass $SIMD_COMPILE_FLAGS to rocksdb cmake

which enables SSE42 globally in rocksdb. and we will end up with a
binary not portable on non-SSE42 enabled machines.

Fixes: http://tracker.ceph.com/issues/20529
Signed-off-by: Kefu Chai <kchai@redhat.com>
Conflicts:
this change is not cherry-picked from master. because the
PR targeting master (https://github.com/ceph/ceph/pull/17388) is
still pending on review. and the cmake changes is different if
we want to use a recent commit of rocksdb, as it's doing differently
in cmake to address the portability issues.

7 years agorocksdb: pick up portable fixes
Kefu Chai [Fri, 15 Sep 2017 02:23:47 +0000 (10:23 +0800)]
rocksdb: pick up portable fixes

to pick up the the fix to disable SSE42 globally, and only enable it on
crc32c. this change is pushed to ceph/rocksdb:luminous.

Signed-off-by: Kefu Chai <kchai@redhat.com>
Conflicts:
this change is not cherry-picked from master, as the master PR
(https://github.com/ceph/ceph/pull/17388) is still pending on review.
and the latest rocksdb's cmake was revised to address the portability
issues. so the fix on ceph side is different if we want to use a
recent rocksdb's commit.

7 years agorgw: fix resource leak in rgw_bucket.cc and rgw_user.cc 17570/head
Luo Kexue [Wed, 30 Aug 2017 01:32:18 +0000 (09:32 +0800)]
rgw: fix resource leak in rgw_bucket.cc and rgw_user.cc

Fixes: http://tracker.ceph.com/issues/21214
Signed-off-by: Luo Kexue <luo.kexue@zte.com.cn>
(cherry picked from commit 1f23976adab74e25ce06941692a881521885c6ee)

7 years agorgw: add missing override in list_keys_init()
Jos Collin [Fri, 25 Aug 2017 10:02:56 +0000 (15:32 +0530)]
rgw: add missing override in list_keys_init()

Added missing override in list_keys_init().

Signed-off-by: Jos Collin <jcollin@redhat.com>
(cherry picked from commit bfc999f1db96293e6a2188922074031fa0b40ecc)

7 years agoMerge pull request #17612 from smithfarm/wip-qemu-cleanup
Abhishek L [Thu, 14 Sep 2017 09:32:28 +0000 (11:32 +0200)]
Merge pull request #17612 from smithfarm/wip-qemu-cleanup

build/ops: rpm: do not create librbd.so.1 symlink in /usr/lib64/qemu

Reviewed-By: Ken Dreyer <kdreyer@redhat.com>
7 years agoMerge pull request #17478 from smithfarm/wip-21138-luminous
Abhishek L [Thu, 14 Sep 2017 09:31:40 +0000 (11:31 +0200)]
Merge pull request #17478 from smithfarm/wip-21138-luminous

luminous: rgw: object copied from remote src acl permission become full-control issue

Reviewed-By: Orit Wasserman <owasserm@redhat.com>
7 years agoMerge pull request #17445 from smithfarm/wip-21110-luminous
Abhishek L [Thu, 14 Sep 2017 09:31:23 +0000 (11:31 +0200)]
Merge pull request #17445 from smithfarm/wip-21110-luminous

luminous: rgw: send data-log list infinitely

Reviewed-By: Orit Wasserman <owasserm@redhat.com>
7 years agomon: incorrect MAX AVAIL in "ceph df" 17724/head
liuchang0812 [Wed, 6 Sep 2017 03:50:17 +0000 (11:50 +0800)]
mon: incorrect MAX AVAIL in "ceph df"

Fixes: http://tracker.ceph.com/issues/21243
Signed-off-by: liuchang0812 <liuchang0812@gmail.com>
(cherry picked from commit 365558571c59dd42cf0934e6c31c7b4bf2c65026)

7 years agoMerge pull request #17488 from smithfarm/wip-21241-luminous
Abhishek L [Thu, 14 Sep 2017 08:33:29 +0000 (10:33 +0200)]
Merge pull request #17488 from smithfarm/wip-21241-luminous

luminous: rgw: usage of --inconsistent-index should require user confirmation and print a warning

Reviewed-By: Casey Bodley <cbodley@redhat.com>
7 years agoMerge pull request #17484 from smithfarm/wip-21184-luminous
Abhishek L [Thu, 14 Sep 2017 08:28:16 +0000 (10:28 +0200)]
Merge pull request #17484 from smithfarm/wip-21184-luminous

luminous: tests: NameError: global name 'name' is not defined

Reviewed-By: Orit Wasserman <owasserm@redhat.com>
7 years agoMerge pull request #17474 from smithfarm/wip-21114-luminous
Abhishek L [Thu, 14 Sep 2017 08:26:12 +0000 (10:26 +0200)]
Merge pull request #17474 from smithfarm/wip-21114-luminous

luminous: cephfs: tests: FS_DEGRADED spurious health warnings in some sub-suites

Reviewed-By: Patrick Donelly <pdonelly@redhat.com>
7 years agoMerge pull request #17471 from smithfarm/wip-21107-luminous
Abhishek L [Thu, 14 Sep 2017 08:25:51 +0000 (10:25 +0200)]
Merge pull request #17471 from smithfarm/wip-21107-luminous

luminous: cephfs: client/mds has wrong check to clear S_ISGID on chown

Reviewed-By: Patrick Donelly <pdonelly@redhat.com>
7 years agoceph: fix "stopping mds can't export subtree" 17714/head
Yan, Zheng [Wed, 13 Sep 2017 03:27:18 +0000 (11:27 +0800)]
ceph: fix "stopping mds can't export subtree"

caused by commit
790c34138f "Make standby-replay mds avoid initiating subtree export"

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

7 years agoMake standby-replay mds not migrate empty subtree when trimming cache
Jianyu Li [Mon, 4 Sep 2017 13:49:26 +0000 (21:49 +0800)]
Make standby-replay mds not migrate empty subtree when trimming cache

Signed-off-by: Jianyu Li <joannyli@tencent.com>
(cherry picked from commit 178ca58fec2d820f61724d223addac1c4fa67086)

7 years agoMake standby-replay mds avoid initiating subtree export
Jianyu Li [Mon, 4 Sep 2017 10:03:30 +0000 (18:03 +0800)]
Make standby-replay mds avoid initiating subtree export

Signed-off-by: Jianyu Li <joannyli@tencent.com>
(cherry picked from commit 790c34138fbdf995c72e558057b9e64c882b522b)

7 years agomds: print subtrees only after merge 17712/head
Patrick Donnelly [Mon, 4 Sep 2017 18:36:00 +0000 (11:36 -0700)]
mds: print subtrees only after merge

During up:resolve, the MDS tries to merge each subtree with its parent. During
testing, QE found that many thousands of subtrees in a directory (made possible
using pins) would cause the MDS to spend minutes printing out subtree maps to
the debug log. This causes the heartbeat code to consider the MDS as stalled so
beacons are no longer sent to the mons resulting in the MDS being removed from
the rank.

A more complete solution to this problem is to selectively print subtrees
relating to the operation (e.g. the subtree and its parents).

Fixes: http://tracker.ceph.com/issues/21221
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1485783
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit d0747a37fd06053b2206bb9a952f7ab77f0db2f0)

7 years agomds: optimize MDCache::rejoin_scour_survivor_replicas() 17711/head
Yan, Zheng [Wed, 13 Sep 2017 07:55:46 +0000 (15:55 +0800)]
mds: optimize MDCache::rejoin_scour_survivor_replicas()

avoid iterating dentries if dirfrag is non-auth

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

7 years agomds: fix MDSCacheObject::clear_replica_map
Yan, Zheng [Wed, 13 Sep 2017 07:54:45 +0000 (15:54 +0800)]
mds: fix MDSCacheObject::clear_replica_map

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

7 years agomds: support limiting cache by memory
Patrick Donnelly [Mon, 11 Sep 2017 22:21:52 +0000 (15:21 -0700)]
mds: support limiting cache by memory

This introduces two config parameters:

    mds_cache_memory_limit: Sets the soft maximum of the cache to the given
    byte count. (Like mds_cache_size, this doesn't actually limit the maximum
    size of the cache. It just dictates the steady-state size.)

    mds_cache_reservation: This replaces mds_health_cache_threshold everywhere
    except the Beacon heartbeat sent to the mons. The idea here is to specify a
    reservation of memory (5% by default) for operations and the MDS tries to
    always maintain that reservation. So, the MDS will recall caps from clients
    when it begins dipping into its reservation of memory.

mds_cache_size still limits the cache by Inode count but is now by-default 0
(i.e. unlimited). The new preferred way of specifying cache limits is by memory
size. The default is 1GB.

Fixes: http://tracker.ceph.com/issues/20594
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1464976
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit 06c94de584e6cd7d347bcdfb79d9fef4fed0d277)

 Conflicts:
PendingReleaseNotes
src/mds/MDCache.cc

7 years agocommon: refactor of lru
Patrick Donnelly [Fri, 8 Sep 2017 04:01:31 +0000 (21:01 -0700)]
common: refactor of lru

Avoids an unnecessary "max" size of the LRU which was used to calculate the
midpoint. Instead, just dynamically move the LRUObjects between top and bottom
on-the-fly.

This change is necessary for a cache which which does not limit by the number
of objects but by some other metric. (In this case, memory.)

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

7 years agomds: resolve unsigned coercion compiler warning
Patrick Donnelly [Tue, 12 Sep 2017 20:40:17 +0000 (13:40 -0700)]
mds: resolve unsigned coercion compiler warning

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

7 years agocommon: use safer uint64_t for list size
Patrick Donnelly [Fri, 8 Sep 2017 03:51:56 +0000 (20:51 -0700)]
common: use safer uint64_t for list size

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

7 years agocommon: add bytes2str pretty print function
Patrick Donnelly [Sun, 30 Jul 2017 23:09:32 +0000 (16:09 -0700)]
common: add bytes2str pretty print function

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

7 years agomds: check if waiting is allocated before use
Patrick Donnelly [Tue, 12 Sep 2017 21:31:18 +0000 (14:31 -0700)]
mds: check if waiting is allocated before use

This prevents accidental allocation of the map.

Also, privatize the variable to protect from this in child classes.

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

7 years agomds: go back to compact_map for replicas
Patrick Donnelly [Tue, 12 Sep 2017 21:29:49 +0000 (14:29 -0700)]
mds: go back to compact_map for replicas

Zheng observed that an alloc_ptr doesn't really work in this case since any
call to get_replicas() will cause the map to be allocated, nullifying the
benefit. Use a compact_map until a better solution can be written. (This means
that the map will be allocated outside the mempool.)

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

7 years agomds: use mempool for cache objects
Patrick Donnelly [Fri, 28 Jul 2017 00:21:54 +0000 (17:21 -0700)]
mds: use mempool for cache objects

The purpose of this is to allow us to track memory usage by cached objects so
we can limit cache size based on memory available/allocated to the MDS.

This commit is a first step: it adds CInode, CDir, and CDentry to the mempool
but not all of the containers in these classes (e.g. std::map). However,
MDSCacheObject has been changed to allocate its containers through the mempool
by converting compact_* containers to the std versions offered through mempool
via the new alloc_ptr.

(A compact_* class simply wraps a pointer to the std:: version to reduce memory
usage of an object when the container is only occasionally used. The alloc_ptr
allows us to achieve the same thing explicitly with only a little handholding:
when all entries in the wrapped container are deleted, the caller must call
alloc_ptr.release().)

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

7 years agomds: cleanup replica_map access
Patrick Donnelly [Thu, 27 Jul 2017 19:06:23 +0000 (12:06 -0700)]
mds: cleanup replica_map access

The gymnastics protecting the map failed as the code evolved. Just expose it
normally with a getter.

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

7 years agocommon: add alloc_ptr smart pointer
Patrick Donnelly [Thu, 27 Jul 2017 19:10:14 +0000 (12:10 -0700)]
common: add alloc_ptr smart pointer

This ptr is like a unique_ptr except it allocates the underlying object on
access. The idea being that we can save memory if the object is only needed
sometimes.

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

7 years agocommon: add warning on base class use of mempool
Patrick Donnelly [Thu, 27 Jul 2017 19:04:04 +0000 (12:04 -0700)]
common: add warning on base class use of mempool

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

7 years agocommon: use atomic uin64_t for counter
Patrick Donnelly [Thu, 27 Jul 2017 19:03:15 +0000 (12:03 -0700)]
common: use atomic uin64_t for counter

Making this interface thread-safe...

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

7 years agoMerge pull request #17646 from theanalyst/wip-luminous-multifixes
Abhishek L [Wed, 13 Sep 2017 21:13:03 +0000 (23:13 +0200)]
Merge pull request #17646 from theanalyst/wip-luminous-multifixes

luminous: rgw fixes for multisite tests in luminous

Reviewed-By: Casey Bodley <cbodley@redhat.com>
7 years agomds: fix 'dirfrag end' check in Server::handle_client_readdir 17686/head
Yan, Zheng [Mon, 28 Aug 2017 03:24:13 +0000 (11:24 +0800)]
mds: fix 'dirfrag end' check in Server::handle_client_readdir

The 'dirfrag end' check can be wrong when not reading from beginning
of dirfrag.

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

7 years agoMerge pull request #17647 from dillaman/wip-21345
Jason Dillaman [Tue, 12 Sep 2017 20:04:54 +0000 (16:04 -0400)]
Merge pull request #17647 from dillaman/wip-21345

luminous: qa/workunits/rbd: relax greps to support upgrade formatting change

Reviewed-by: Mykola Golub <mgolub@mirantis.com>
7 years agorgw: LCFilter_S3::to_xml the second "prefix" missed "/" 17479/head
lu.shasha [Tue, 12 Sep 2017 03:19:44 +0000 (11:19 +0800)]
rgw: LCFilter_S3::to_xml the second "prefix" missed "/"

Signed-off-by: Shasha Lu <lu.shasha@eisoo.com>
(cherry picked from commit dcef8555e1bf2656aeb5316c4b78f1facf2ae172)

7 years agotest/rgw: fix test_encrypted_object_sync for 3+ zones 17646/head
Casey Bodley [Wed, 30 Aug 2017 15:16:25 +0000 (11:16 -0400)]
test/rgw: fix test_encrypted_object_sync for 3+ zones

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

7 years agoluminous: rgw: re enable dynamic resharding 17674/head
Abhishek Lekshmanan [Tue, 12 Sep 2017 16:07:01 +0000 (18:07 +0200)]
luminous: rgw: re enable dynamic resharding

Signed-off-by: Abhishek Lekshmanan <abhishek@suse.com>
7 years agoMerge pull request #17653 from ceph/backport-wip-bz1478598
Alfredo Deza [Tue, 12 Sep 2017 12:01:43 +0000 (08:01 -0400)]
Merge pull request #17653 from ceph/backport-wip-bz1478598

luminous: ceph-volume allow filtering by `uuid`, do not require osd id

Reviewed-by: Andrew Schoen <aschoen@redhat.com>
7 years agoMerge pull request #17485 from smithfarm/wip-21185-luminous
Abhishek L [Tue, 12 Sep 2017 11:02:35 +0000 (13:02 +0200)]
Merge pull request #17485 from smithfarm/wip-21185-luminous

luminous: rgw: rgw_file:  incorrect lane lock behavior in evict_block()

Reviewed-By: Orit Wasserman <oritwas@redhat.com>
7 years agoMerge pull request #17476 from smithfarm/wip-21135-luminous
Abhishek L [Tue, 12 Sep 2017 10:40:44 +0000 (12:40 +0200)]
Merge pull request #17476 from smithfarm/wip-21135-luminous

luminous: rgw: bucket index sporadically reshards to 65521 shards

Reviewed-By: Orit Wasserman <owasserm@redhat.com>
7 years agoMerge pull request #17470 from smithfarm/wip-21104-luminous
Abhishek L [Tue, 12 Sep 2017 09:06:05 +0000 (11:06 +0200)]
Merge pull request #17470 from smithfarm/wip-21104-luminous

luminous: build/ops: ceph-fuse RPM should require fusermount

Reviewed-By: Ken Dreyer <ktdreyer@redhat.com>
Reviewed-By: Kefu Chai <kchai@redhat.com>
7 years agoMerge pull request #17477 from smithfarm/wip-21137-luminous
Abhishek L [Tue, 12 Sep 2017 09:05:14 +0000 (11:05 +0200)]
Merge pull request #17477 from smithfarm/wip-21137-luminous

luminous: mgr: 500 error when attempting to view filesystem data

Reviewed-By: John Spray <jcsp@redhat.com>