]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/log
ceph-ci.git
5 years agomds: fix deadlock when xlocking policylock
Yan, Zheng [Thu, 5 Dec 2019 09:24:47 +0000 (17:24 +0800)]
mds: fix deadlock when xlocking policylock

Previous commit makes Server::rdlock_path_pin_ref() rdlock snaplock and
policylock. Deadlock happens if we use this function for requests that
xlock snaplock or snaplock.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: handle link request with zero depth filepath2
Yan, Zheng [Sat, 12 Oct 2019 08:47:51 +0000 (16:47 +0800)]
mds: handle link request with zero depth filepath2

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: enable lock cache for openc/unlink requests
Yan, Zheng [Mon, 30 Sep 2019 06:20:18 +0000 (14:20 +0800)]
mds: enable lock cache for openc/unlink requests

when client has 'CEPH_CAP_FILE_EXCL|CEPH_CAP_DIR_UNLINK' caps of a
directory inode, it can asynchronously unlink file from the directory
if the corresponding dentry is a primary link.

when client has 'CEPH_CAP_FILE_EXCL|CEPH_CAP_DIR_CREATE' caps of a
directory inode, it can asynchronously create new file in the directory
as long as no file with the same name exists.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: include linkage type in dentry lease
Yan, Zheng [Mon, 30 Sep 2019 06:20:18 +0000 (14:20 +0800)]
mds: include linkage type in dentry lease

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: cleanup Server::set_trace_dist()
Yan, Zheng [Mon, 30 Sep 2019 06:20:18 +0000 (14:20 +0800)]
mds: cleanup Server::set_trace_dist()

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: define lease mask bits
Yan, Zheng [Mon, 30 Sep 2019 06:20:18 +0000 (14:20 +0800)]
mds: define lease mask bits

later patch will introduce new mask bits

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: delegete lock cache to client
Yan, Zheng [Mon, 30 Sep 2019 06:20:17 +0000 (14:20 +0800)]
mds: delegete lock cache to client

Define cap bits for async dir operation. Lock cache for a given type of
dir operation can be delegeted to client through cap mechanism. As long
as client holds correspondindg cap, dir operation requests from the
client can use the lock cache. If mds want to invalidate a lock cache,
it needs to first revoke corresponding cap from client.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: suppress frozen inode when locks of dir operation is cached.
Yan, Zheng [Mon, 30 Sep 2019 06:20:17 +0000 (14:20 +0800)]
mds: suppress frozen inode when locks of dir operation is cached.

Frozen inode in directory with lock caches may cause ABBA deadlock. The
requeset that owns the frozen inode can't get locks because lock cache
is holding conflicting locks. The request that uses lock cache can't
auth pin the frozen inode.

The solution is not creating lock cache when directory contains freezing
or frozen inode. When mds starts freezing an inode, invalidate all lock
caches on its parent directory.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: invalidate lock caches when freezing dirfrag/subtree
Yan, Zheng [Mon, 30 Sep 2019 06:20:17 +0000 (14:20 +0800)]
mds: invalidate lock caches when freezing dirfrag/subtree

Add a list to CDir, which tracks lock caches which hold auth pins on
objects in the CDir. When mds want to freeze dirfrag or subtree, it can
find lock caches and invalidate them

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: invalidate lock caches if they hold conflicting locks
Yan, Zheng [Mon, 30 Sep 2019 06:20:17 +0000 (14:20 +0800)]
mds: invalidate lock caches if they hold conflicting locks

Add a list to SimpleLock, which tracks lock caches which hold locks
on SimpleLock itself. When mds want to change lock state, it can find
lock caches and invalidate them.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: initial code for lock cache
Yan, Zheng [Mon, 30 Sep 2019 06:20:17 +0000 (14:20 +0800)]
mds: initial code for lock cache

The lock cache preserves locks and authpins required for directory
operations. MDS can create a lock cache when it has acquired all locks
of a directory operation. The lock cache can be used to for later
operations of the same type on the same directory.

For example, when mds has acquired all locks of a unlink operation,
it creates a lock cache, which holds holds wrlocks on direcotry inode's
filelock and nestlock, rdlocks on ancestor inodes' snaplocks. For later
unlink operations on the same directory, MDS only needs to xlock the
dentry to unlink and xlock linklock of the inode to unlink.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: adjust locking for subtree migration
Yan, Zheng [Mon, 16 Sep 2019 12:58:23 +0000 (20:58 +0800)]
mds: adjust locking for subtree migration

Take snap rdlocks (instead of taking dentry locks) on subtree's ancestor
inodes. Path to subtree is stable after they are all locked.

For dirfragtree locks on subtree bounds, it's not convenient to rdlock
them in top-down order (paths to them are not stable). The solution is
kicking them to SYNC state and try taking rdlocks on all of them.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: add 'path_locked' flag to MDCache::find_ino_peers()
Yan, Zheng [Mon, 7 Oct 2019 07:50:50 +0000 (15:50 +0800)]
mds: add 'path_locked' flag to MDCache::find_ino_peers()

MDS now relies on snaplocks to ensure that paths for slave request are
stable. MDCache::handle_find_ino_reply() may encounter xlocked dentry
during path traverse.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: change MDCache::discover_path()'s wants_xlocked semantic
Yan, Zheng [Sun, 15 Sep 2019 08:09:03 +0000 (16:09 +0800)]
mds: change MDCache::discover_path()'s wants_xlocked semantic

If an inode's snaplock is locked by a MDRequest, the inode can not be
renamed by other MDRequest. For rename case, snaplocks of all inodes
in paths are locked. So the paths are stable while handling slave rename.
It's OK to discover all components (even they are xlocked) in the paths.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: introduce Server::rdlock_two_paths_xlock_destdn()
Yan, Zheng [Thu, 12 Sep 2019 07:34:12 +0000 (15:34 +0800)]
mds: introduce Server::rdlock_two_paths_xlock_destdn()

The helper function is for requests that operate on two paths. It
ensures that the two paths get locks in proper order. The rule is:

 1. Lock directory inodes or dentries according to which trees they
    are under. Lock objects under fs root before objects under mdsdir.
 2. Lock directory inodes or dentries according to their depth, in
    ascending order.
 3. Lock directory inodes or dentries according to inode numbers or
    dentries' parent inode numbers, in ascending order.
 4. Lock dentries in the same directory in order of their keys.
 5. Lock non-directory inodes according to inode numbers, in ascending
    order.

This patch also makes handle_client_link() and handle_client_rename()
to use this helper function.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: make Server::rdlock_path_xlock_dentry take locks
Yan, Zheng [Thu, 12 Sep 2019 07:20:57 +0000 (15:20 +0800)]
mds: make Server::rdlock_path_xlock_dentry take locks

Introduce MDS_TRAVERSE_XLOCK_DENTRY, which instructs
MDCache::path_traverse() to take appropriate locks (xlock dentry,
wrlock directory's filelock/nestlock) for file create/deletion.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: make Server::rdlock_path_pin_ref() take dentry rdlocks
Yan, Zheng [Thu, 12 Sep 2019 07:00:24 +0000 (15:00 +0800)]
mds: make Server::rdlock_path_pin_ref() take dentry rdlocks

Introduce MDS_TRAVERSE_RDLOCK_PATH flag, which instrcuts
MDCache::path_traverse() to lock dentries during path traverse.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: take snaplock and policylock during path traverse.
Yan, Zheng [Thu, 12 Sep 2019 03:36:57 +0000 (11:36 +0800)]
mds: take snaplock and policylock during path traverse.

To take locks in top-down order for a MDRequest, we need to first take
snap/policy rdlocks on ancestor inodes of the request's base inode.
It's not convenient to use Locker::acquire_locks() to do the job because
path to request's base inode can change before all of these locks are
rdlocked.

This patch introduces Locker::try_rdlock_snap_layout(), which tries
taking snap/policy rdlocks on request's base inode and its ancestors
all at the same time. MDCache::path_traverse() calls this function at
first, then uses Locker::acquire_locks() to take snaplock on components
of request's path.

This patch also reorders inode locks, put snaplock and policy at the
front. Because some requests (such as setattr) may xlock other locks
after taking snaplock/policylock.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agomds: let Locker::acquire_locks()'s caller choose locking order
Yan, Zheng [Wed, 14 Aug 2019 03:22:35 +0000 (11:22 +0800)]
mds: let Locker::acquire_locks()'s caller choose locking order

This patch makes Locker::acquire_locks() lock objects in the order
specified by its caller. Locker::acquire_locks() only rearranges locks
in the same object (relieve of remembering the order). This patch is
preparation for 'lock object in top-down order'.

Besides, this patch allows MDRequest to lock objects step by step. For
example: call Locker::acquire_locks() to lock a dentry. After the dentry
is locked, call Locker::acquire_locks() to lock inode that is linked by
the dentry.

Locking object step by step introduces a problem. MDRequest may needs to
auth pin extra objects after taking same locks. If any object can not be
auth pinned, MDRequest needs to drop all locks before going to wait. For
slave auth pin request, this patch make slave mds send a notification
back to master mds if the auth pin request is blocked. The master mds
drops locks when receiving the notification.

Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
5 years agoMerge PR #30972 into master
Patrick Donnelly [Mon, 25 Nov 2019 02:53:20 +0000 (18:53 -0800)]
Merge PR #30972 into master

* refs/pull/30972/head:
mds: move 'traverse to auth' logic into MDCache::path_traverse
mds: cleanup Capability initialization
mds: cleanup code that kills session requests
mds: cleanup Server::try_open_auth_dirfrag()
mds: restrict path that walks into snapdir
mds: use single map to track pinned & auth_pinned objects
mds: define operator<(...) for MutationImpl::LockOp
mds: cleanup Locker::acquire_locks()
mds: introduce Locker::wrlock_try()
mds: explictly specify if MDCache::path_traverse() needs to check null dentry
mds: cleanup dentry non-readable check in MDCache::path_traverse()
mds: change MDCache::path_traverse()'s 'onfail' argument to flags

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
5 years agoMerge PR #31786 into master
Sage Weil [Sun, 24 Nov 2019 18:45:26 +0000 (12:45 -0600)]
Merge PR #31786 into master

* refs/pull/31786/head:
mgr: fix errors on using a reference in a Lambda function

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #31761 from tchaikov/wip-cmake-include-libfmt
Kefu Chai [Sun, 24 Nov 2019 17:08:02 +0000 (01:08 +0800)]
Merge pull request #31761 from tchaikov/wip-cmake-include-libfmt

cmake: do not include ${CMAKE_SOURCE_DIR}/src/fmt/include

Reviewed-by: Adam C. Emerson <aemerson@redhat.com>
5 years agoMerge pull request #31711 from p-se/wip-pse-fix-osd-full-alert
Kefu Chai [Sun, 24 Nov 2019 17:06:34 +0000 (01:06 +0800)]
Merge pull request #31711 from p-se/wip-pse-fix-osd-full-alert

monitoring: wait before firing osd full alert

Reviewed-by: Jan Fajerski <jfajerski@suse.com>
5 years agoMerge pull request #31692 from rzarzynski/wip-fips-zeroize-memset_bzero
Kefu Chai [Sun, 24 Nov 2019 17:05:16 +0000 (01:05 +0800)]
Merge pull request #31692 from rzarzynski/wip-fips-zeroize-memset_bzero

FIPS: audit and switch some memset & bzero users

Reviewed-by: Marcus Watts <mwatts@redhat.com>
5 years agoMerge pull request #31705 from tchaikov/wip-mgr-orchestrator
Kefu Chai [Sun, 24 Nov 2019 17:03:52 +0000 (01:03 +0800)]
Merge pull request #31705 from tchaikov/wip-mgr-orchestrator

mgr/orchestrator: do not try to iterate through None

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
5 years agoMerge pull request #31691 from Anjingkegui/master.monv2change1
Kefu Chai [Sun, 24 Nov 2019 17:01:55 +0000 (01:01 +0800)]
Merge pull request #31691 from Anjingkegui/master.monv2change1

mon: remove the restriction of address type in init_with_hosts

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Xiaoxi Chen <xiaoxchen@ebay.com>
5 years agoMerge pull request #31513 from ifed01/wip-ifed-check-bluefs-allocs
Kefu Chai [Sun, 24 Nov 2019 17:00:54 +0000 (01:00 +0800)]
Merge pull request #31513 from ifed01/wip-ifed-check-bluefs-allocs

os/bluestore: check bluefs allocations on log replay

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Adam Kupczyk <akupczyk@redhat.com>
5 years agoMerge pull request #30204 from tchaikov/wip-test-aio-completion-release
Kefu Chai [Sun, 24 Nov 2019 16:59:25 +0000 (00:59 +0800)]
Merge pull request #30204 from tchaikov/wip-test-aio-completion-release

test/librados: free AioCompletion using AioCompletion::release()

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoMerge pull request #31703 from xiexingguo/wip-42577-plus
Kefu Chai [Sun, 24 Nov 2019 16:58:14 +0000 (00:58 +0800)]
Merge pull request #31703 from xiexingguo/wip-42577-plus

osd/PeeringState: do not exclude up from acting_recovery_backfill

Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge pull request #31693 from tchaikov/wip-42782
Kefu Chai [Sun, 24 Nov 2019 16:56:09 +0000 (00:56 +0800)]
Merge pull request #31693 from tchaikov/wip-42782

qa/workunits/rados/test_librados_build.sh: download from current branch

Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge pull request #31243 from lxbsz/log
Kefu Chai [Sun, 24 Nov 2019 16:55:24 +0000 (00:55 +0800)]
Merge pull request #31243 from lxbsz/log

log: just return if t is empty

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge pull request #31714 from lxbsz/preforker
Kefu Chai [Sun, 24 Nov 2019 16:54:43 +0000 (00:54 +0800)]
Merge pull request #31714 from lxbsz/preforker

preforker: remove useless code

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
5 years agoMerge PR #31778 into master
Sage Weil [Sun, 24 Nov 2019 02:30:28 +0000 (20:30 -0600)]
Merge PR #31778 into master

* refs/pull/31778/head:
os/bluestore: pin onodes as they are added to the cache
Revert "Revert "Merge pull request #30964 from markhpc/wip-bs-cache-trim-pinned""

Reviewed-by: Mark Nelson <mnelson@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #31807 into master
Sage Weil [Sun, 24 Nov 2019 02:29:52 +0000 (20:29 -0600)]
Merge PR #31807 into master

* refs/pull/31807/head:
mgr/PyModule: correctly remove config options

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
5 years agoMerge PR #31806 into master
Sage Weil [Sun, 24 Nov 2019 02:29:37 +0000 (20:29 -0600)]
Merge PR #31806 into master

* refs/pull/31806/head:
spec,debian: ceph-mgr-ssh depends on openssh{-client{s}}

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Dimitri Savineau <dsavinea@redhat.com>
5 years agoMerge PR #31818 into master
Sage Weil [Sun, 24 Nov 2019 02:27:00 +0000 (20:27 -0600)]
Merge PR #31818 into master

* refs/pull/31818/head:
common/options: remove unused ms_msgr2_{sign,encrypt}_messages

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
5 years agoMerge PR #31825 into master
Sage Weil [Sun, 24 Nov 2019 02:26:48 +0000 (20:26 -0600)]
Merge PR #31825 into master

* refs/pull/31825/head:
msg/async: fix typo in Error message

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
5 years agoMerge PR #31831 into master
Sage Weil [Sun, 24 Nov 2019 02:26:08 +0000 (20:26 -0600)]
Merge PR #31831 into master

* refs/pull/31831/head:
ceph-daemon: make infer_fsid behave when /var/lib/ceph dne

Reviewed-by: Michael Fritch <mfritch@suse.com>
5 years agoMerge PR #31832 into master
Sage Weil [Sun, 24 Nov 2019 02:25:52 +0000 (20:25 -0600)]
Merge PR #31832 into master

* refs/pull/31832/head:
ceph-daemon: fix extract_uid_gid

Reviewed-by: Michael Fritch <mfritch@suse.com>
5 years agoceph-daemon: fix extract_uid_gid
Sage Weil [Sat, 23 Nov 2019 15:07:09 +0000 (09:07 -0600)]
ceph-daemon: fix extract_uid_gid

This will get confused by the cephdaemon user!

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoceph-daemon: make infer_fsid behave when /var/lib/ceph dne
Sage Weil [Sat, 23 Nov 2019 15:02:28 +0000 (09:02 -0600)]
ceph-daemon: make infer_fsid behave when /var/lib/ceph dne

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #31636 into master
Sage Weil [Sat, 23 Nov 2019 14:48:47 +0000 (08:48 -0600)]
Merge PR #31636 into master

* refs/pull/31636/head:
mgr/pg_autoscaler: default to pg_num[_min] = 16

Reviewed-by: Mark Nelson <mnelson@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge PR #31796 into master
Sage Weil [Sat, 23 Nov 2019 14:48:32 +0000 (08:48 -0600)]
Merge PR #31796 into master

* refs/pull/31796/head:
PendingReleaseNotes: note about the removal of 'nvme' class
common/blkdev: drop is_nvme() method
os/bluestore/KernelDevice: get rid of 'nvme' type

Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge pull request #31816 from jan--f/c-v-no-unittest-mock
Alfredo Deza [Sat, 23 Nov 2019 13:53:26 +0000 (08:53 -0500)]
Merge pull request #31816 from jan--f/c-v-no-unittest-mock

ceph-volume: import mock.mock instead of unittest.mock (py2)

Reviewed-by: Alfredo Deza <adeza@redhat.com>
5 years agoMerge pull request #30863 from matthewoliver/improve_do_cmake
Kefu Chai [Sat, 23 Nov 2019 01:13:13 +0000 (09:13 +0800)]
Merge pull request #30863 from matthewoliver/improve_do_cmake

do_cmake.sh: Add CEPH_GIT_DIR

Reviewed-by: Nathan Cutler <ncutler@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agomsg/async: fix typo in Error message
Willem Jan Withagen [Fri, 22 Nov 2019 22:33:28 +0000 (23:33 +0100)]
msg/async: fix typo in Error message

And fix layout while there

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
5 years agoPendingReleaseNotes: note about the removal of 'nvme' class
Sage Weil [Fri, 22 Nov 2019 21:33:13 +0000 (15:33 -0600)]
PendingReleaseNotes: note about the removal of 'nvme' class

There isn't much to say here since this really shouldn't be happening in
the wild.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #31502 into master
Sage Weil [Fri, 22 Nov 2019 21:28:17 +0000 (15:28 -0600)]
Merge PR #31502 into master

* refs/pull/31502/head:
qa/tasks/ceph2: get ceph-daemon from same place as ceph
qa/tasks/ceph2: use safe_while
qa/tasks/ceph2: pull image using sha1
qa/tasks/ceph2: docker needs quay.io/ prefix for image name
qa/workunits/rados/test_python: make sure rbd pool exists
qa/suites/rados/ssh: new tests!
qa/tasks/ceph2: pull ceph-ci/ceph:$branch
qa/tasks/ceph2: register_daemons after pods start
qa/tasks/ceph2: fix conf
qa/tasks/ceph2: add restart
qa/tasks/ceph2: pass ceph-daemon path to DaemonState
qa/tasks/ceph2: tolerate no mdss or 1 mgr
qa/tasks/ceph: replace wait_for_osds_up with manager.wait_for_all_osds_up
qa/tasks/ceph: wait-until-healthy
qa/tasks/ceph2: set up managers
qa/tasks/ceph2: use seed ceph.conf
qa/tasks/ceph: healthy: use manager helpers (instead of teuthology/misc ones)
qa/tasks/ceph2: name mds daemons
qa/tasks/ceph2: fix osd ordering
qa/tasks/ceph2: start up mdss
qa/tasks/ceph2: set up daemon handles and use them to stop
qa/tasks/ceph2: make it multicluster-aware
qa/tasks/ceph2: can bring up mon, mgr, osds!
qa/tasks/ceph2: basic task to bring up cluster with ceph-daemon and ssh

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
5 years agoMerge pull request #31657 from liewegas/fix-merge-vs-backoff
Neha Ojha [Fri, 22 Nov 2019 19:47:49 +0000 (11:47 -0800)]
Merge pull request #31657 from liewegas/fix-merge-vs-backoff

osd: release backoffs during merge

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
5 years agoqa/tasks/ceph2: get ceph-daemon from same place as ceph
Sage Weil [Fri, 22 Nov 2019 19:44:45 +0000 (19:44 +0000)]
qa/tasks/ceph2: get ceph-daemon from same place as ceph

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agocommon/options: remove unused ms_msgr2_{sign,encrypt}_messages
Ilya Dryomov [Fri, 22 Nov 2019 17:39:58 +0000 (18:39 +0100)]
common/options: remove unused ms_msgr2_{sign,encrypt}_messages

These are unused since 1d29722f801c ("switch monc, daemons to use new
msgr2 auth frame exchange").  As they default to false, a confused user
might flip them to true and think that their client <-> OSD traffic is
encrypted.

The new set of options was added in c7ee66c3e54b
("auth,msg/async/ProtocolV2: negotiate connection modes").

Fixes: https://tracker.ceph.com/issues/42976
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
5 years agoMerge PR #31698 into master
Sage Weil [Fri, 22 Nov 2019 17:24:27 +0000 (11:24 -0600)]
Merge PR #31698 into master

* refs/pull/31698/head:
rpm,deb: add cephdaemon user and sudoers file
ceph-daemon: use mgr/ssh command to create the ssh key
mgr/ssh: add 'ssh generate-key' and 'ssh clear-key' commands
mgr/ssh: add mode option
mgr/ssh: add 'ssh get-pub-key' and 'ssh get-user' commands
mgr/ssh: convert to command decorations
mgr/orchestrator: move command annotation helpers to orchestrator.py

Reviewed-by: Sebastian Wagner <swagner@suse.com>
5 years agoMerge PR #31790 into master
Sage Weil [Fri, 22 Nov 2019 17:22:27 +0000 (11:22 -0600)]
Merge PR #31790 into master

* refs/pull/31790/head:
Revert "Merge pull request #16715 from adamemerson/wip-I-Object!"

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agotest/librados: free AioCompletion using unique_ptr
Kefu Chai [Fri, 6 Sep 2019 17:30:24 +0000 (01:30 +0800)]
test/librados: free AioCompletion using unique_ptr

always destroy AioCompletion pointers even if test fails

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agolibrados: release pimpl pointer in destructor
Kefu Chai [Fri, 6 Sep 2019 17:29:49 +0000 (01:29 +0800)]
librados: release pimpl pointer in destructor

before this change, the librados applications are responsible to call
`AioCompletion::release()` explicitly to release its internal pimpl
pointer. this is error prone and not intuitive.

after this change, the destructor of `AioCompletion` and
`PoolAsyncCompletion` will do this automatically. while
`AioCompletion::release()` and `PoolAsyncCompletion::release()` still
delete the instance as they did before. so this change is backward
compatible, as existing librados clients can still use `ptr->release()`
to free the completion instance, while new clients can just `delete
ptr`.

librados_test_stub is updated accordingly to match the new model

Signed-off-by: Kefu Chai <kchai@redhat.com>
5 years agoceph-volume: import mock.mock instead of unittest.mock (py2)
Jan Fajerski [Fri, 22 Nov 2019 15:57:11 +0000 (16:57 +0100)]
ceph-volume: import mock.mock instead of unittest.mock (py2)

Fixes: bb4de1a3fc238eaf9f717dc59c6bdf338ef6d657
Fixes: https://tracker.ceph.com/issues/42970
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
5 years agoMerge pull request #31814 from jan--f/c-v-check-selinux-py2
Jan Fajerski [Fri, 22 Nov 2019 16:26:45 +0000 (17:26 +0100)]
Merge pull request #31814 from jan--f/c-v-check-selinux-py2

ceph-volume: check if we run in an selinux environment, now also in py2

5 years agoMerge PR #31788 into master
Sage Weil [Fri, 22 Nov 2019 15:33:36 +0000 (09:33 -0600)]
Merge PR #31788 into master

* refs/pull/31788/head:
ceph-daemon: append newline before public key string

Reviewed-by: Thomas Bechtold <tbechtold@suse.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
5 years agoRevert "Merge pull request #16715 from adamemerson/wip-I-Object!"
Sage Weil [Fri, 22 Nov 2019 15:24:11 +0000 (09:24 -0600)]
Revert "Merge pull request #16715 from adamemerson/wip-I-Object!"

This reverts commit 669453138d89e0f797a1bd37f38a2d68e6aac366, reversing
changes made to 36f5fcbb97eb2b1bceb526331eb3464f460fc701.

Signed-off-by: Sage Weil <sage@redhat.com>
- conflicts due to code rearrangement in 14b0db908f652032c358e419ffa90f5676698d0e

5 years ago ceph-volume: python2 raises OSError on Popen with missing binary.
Jan Fajerski [Fri, 22 Nov 2019 14:51:00 +0000 (15:51 +0100)]
 ceph-volume: python2 raises OSError on Popen with missing binary.

For compatibility alias FileNotFoundError to OSError.

Fixes: 72b79f71fa84fe0d56b2fd1745f5bb130380cc38
Fixes: https://tracker.ceph.com/issues/42967
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
5 years agoMerge PR #31798 into master
Sage Weil [Fri, 22 Nov 2019 14:50:52 +0000 (08:50 -0600)]
Merge PR #31798 into master

* refs/pull/31798/head:
ceph-daemon: ceph-volume works without an fsid
ceph-daemon: several commands that can infer fsids still require them
ceph-daemon: fix fsid inference

Reviewed-by: Michael Fritch <mfritch@suse.com>
5 years agoceph-volume: py2 compatibility for selinux test
Jan Fajerski [Fri, 22 Nov 2019 14:49:41 +0000 (15:49 +0100)]
ceph-volume: py2 compatibility for selinux test

Fixes: af30c7f956380beb3bc4021d60b9229a82bda4e2
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
5 years agoMerge pull request #31809 from jan--f/c-v-check-selinux
Alfredo Deza [Fri, 22 Nov 2019 14:28:21 +0000 (09:28 -0500)]
Merge pull request #31809 from jan--f/c-v-check-selinux

ceph-volume: check if we run in an selinux environment

Reviewed-by: Alfredo Deza <adeza@redhat.com>
5 years agoceph-daemon: ceph-volume works without an fsid
Sage Weil [Thu, 21 Nov 2019 22:48:40 +0000 (16:48 -0600)]
ceph-daemon: ceph-volume works without an fsid

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoceph-daemon: several commands that can infer fsids still require them
Sage Weil [Thu, 21 Nov 2019 22:48:30 +0000 (16:48 -0600)]
ceph-daemon: several commands that can infer fsids still require them

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoceph-daemon: fix fsid inference
Sage Weil [Thu, 21 Nov 2019 22:47:59 +0000 (16:47 -0600)]
ceph-daemon: fix fsid inference

All return paths should return func.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr: fix errors on using a reference in a Lambda function
Willem Jan Withagen [Thu, 21 Nov 2019 12:57:42 +0000 (13:57 +0100)]
mgr: fix errors on using a reference in a Lambda function

This is the extra info on this matter:

https://bugs.llvm.org/show_bug.cgi?id=35984.

Fixes: https://tracker.ceph.com/issues/42905
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
5 years agomgr/PyModule: correctly remove config options
Tim Serong [Fri, 22 Nov 2019 09:25:19 +0000 (20:25 +1100)]
mgr/PyModule: correctly remove config options

Previously, incorrect parameters were being passed to "config rm",
causing it to do nothing.  This commit also ensures the correct
error message is shown for both the set and remove failure cases.
I've also moved the update of the in-memory config map to *after*
the value is persisted, to ensure the config map actually reflects
what's stored.

Fixes: https://tracker.ceph.com/issues/42958
Signed-off-by: Tim Serong <tserong@suse.com>
5 years agoMerge pull request #31771 from idryomov/wip-krbd-read-only-test
Ilya Dryomov [Fri, 22 Nov 2019 11:43:13 +0000 (12:43 +0100)]
Merge pull request #31771 from idryomov/wip-krbd-read-only-test

qa: update krbd_blkroset.t and add krbd_get_features.t

Reviewed-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
5 years agoceph-volume: don't assume SELinux
Jan Fajerski [Fri, 22 Nov 2019 09:46:05 +0000 (10:46 +0100)]
ceph-volume: don't assume SELinux

Expect selinux related binaries to not be present.

Fixes: 33c8a64a54d9ea8962091caf8564cea3f603c5f5
Fixes: https://tracker.ceph.com/issues/42957
Signed-off-by: Jan Fajerski <jfajerski@suse.com>
5 years agoMerge pull request #30621 from wjwithagen/wjw-fix-freebsd-linking
Kefu Chai [Fri, 22 Nov 2019 10:27:02 +0000 (18:27 +0800)]
Merge pull request #30621 from wjwithagen/wjw-fix-freebsd-linking

cmake: use GNU linker on FreeBSD

Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoceph-volume: fix test test_selinuxenabled_doesnt_exist
Jan Fajerski [Fri, 22 Nov 2019 10:09:22 +0000 (11:09 +0100)]
ceph-volume: fix test test_selinuxenabled_doesnt_exist

Popen does not open a shell by default, so A FileNotFoundError is
raised instead of returning a 127 return code.

Signed-off-by: Jan Fajerski <jfajerski@suse.com>
5 years agospec,debian: ceph-mgr-ssh depends on openssh{-client{s}}
Sebastian Wagner [Fri, 22 Nov 2019 09:13:29 +0000 (10:13 +0100)]
spec,debian: ceph-mgr-ssh depends on openssh{-client{s}}

Container images don't include ssh by default. Thus we
have to explictly depend on it.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
5 years agoMerge pull request #31777 from smithfarm/wip-mimic-v13.2.7-release-notes
Nathan Cutler [Fri, 22 Nov 2019 08:13:20 +0000 (09:13 +0100)]
Merge pull request #31777 from smithfarm/wip-mimic-v13.2.7-release-notes

doc/releases: add release notes for mimic v13.2.7

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Jan Fajerski <jfajerski@suse.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
5 years agoMerge pull request #30387 from rzarzynski/wip-crimson-errorator
Kefu Chai [Fri, 22 Nov 2019 05:30:27 +0000 (13:30 +0800)]
Merge pull request #30387 from rzarzynski/wip-crimson-errorator

crimson: bring ceph::errorator with its first appliances

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
5 years agoMerge PR #31793 into master
Patrick Donnelly [Fri, 22 Nov 2019 04:01:53 +0000 (20:01 -0800)]
Merge PR #31793 into master

* refs/pull/31793/head:
mds: release free heap pages after trim

Reviewed-by: Sage Weil <sage@redhat.com>
5 years agoMerge pull request #31799 from yuriw/wip-yuriw-crontab-master
Yuri Weinstein [Fri, 22 Nov 2019 01:44:28 +0000 (17:44 -0800)]
Merge pull request #31799 from yuriw/wip-yuriw-crontab-master

qa/tests: trying to fix syntax error that prevented mimic-x to be add…

5 years agoqa/tests: trying to fix syntax error that prevented mimic-x to be added to the schedule
Yuri Weinstein [Fri, 22 Nov 2019 00:43:54 +0000 (16:43 -0800)]
qa/tests: trying to fix syntax error that prevented mimic-x to be added to the schedule

Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
5 years agoMerge PR #31465 into master
Sage Weil [Thu, 21 Nov 2019 22:26:04 +0000 (16:26 -0600)]
Merge PR #31465 into master

* refs/pull/31465/head:
doc/install/containers: add summary of containers and branches

Reviewed-by: Dan Mick <dmick@redhat.com>
5 years agocommon/blkdev: drop is_nvme() method
Sage Weil [Thu, 21 Nov 2019 22:20:58 +0000 (16:20 -0600)]
common/blkdev: drop is_nvme() method

No more callers (and I don't think it works anyway).

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoos/bluestore/KernelDevice: get rid of 'nvme' type
Sage Weil [Thu, 21 Nov 2019 22:19:17 +0000 (16:19 -0600)]
os/bluestore/KernelDevice: get rid of 'nvme' type

We are either 'hdd' or 'ssd' based on the rotational flag.  Previously,
we would try to distinguish between an nvme vs SATA/SAS ssd and set the
class to 'nvme'.  This was misguided--the interface is not important and
has no direct bearing on the device performance.  Moreover, the HDD
manufacturers are planning to produce rotation HDDs that use the nvme
interface instead of SATA/SAS.

So, drop this.

This may be somewhat disruptive to clusters where we were detecting
nvme but now are not.  However, the good news is that this doesn't seem
to trigger for real deployments because LVM breaks the is_nvme()
method.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #31702 into master
Sage Weil [Thu, 21 Nov 2019 21:41:56 +0000 (15:41 -0600)]
Merge PR #31702 into master

* refs/pull/31702/head:
ceph-daemon: infer fsid for shell, enter, ceph-volume, unit, logs

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
5 years agoqa/tasks/ceph2: use safe_while
Sage Weil [Thu, 21 Nov 2019 16:48:27 +0000 (10:48 -0600)]
qa/tasks/ceph2: use safe_while

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agorpm,deb: add cephdaemon user and sudoers file
Sage Weil [Mon, 18 Nov 2019 01:44:08 +0000 (19:44 -0600)]
rpm,deb: add cephdaemon user and sudoers file

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agodoc/releases: add release notes for mimic v13.2.7
Nathan Cutler [Thu, 21 Nov 2019 03:02:51 +0000 (04:02 +0100)]
doc/releases: add release notes for mimic v13.2.7

Signed-off-by: Nathan Cutler <ncutler@suse.com>
5 years agoMerge pull request #30960 from yuvalif/wip-yuval-add-kafka-notif-endpoint
Casey Bodley [Thu, 21 Nov 2019 19:42:23 +0000 (14:42 -0500)]
Merge pull request #30960 from yuvalif/wip-yuval-add-kafka-notif-endpoint

rgw/pubsub: add kafka notification endpoint

Reviewed-by: Matt Benjamin <mbenjamin@redhat.com>
5 years agoceph-daemon: use mgr/ssh command to create the ssh key
Sage Weil [Mon, 18 Nov 2019 02:44:52 +0000 (20:44 -0600)]
ceph-daemon: use mgr/ssh command to create the ssh key

The mgr/ssh module has a command now to do this; use that instead of
generating the key ourselves and manually injecting it.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/ssh: add 'ssh generate-key' and 'ssh clear-key' commands
Sage Weil [Thu, 21 Nov 2019 18:42:17 +0000 (12:42 -0600)]
mgr/ssh: add 'ssh generate-key' and 'ssh clear-key' commands

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomds: release free heap pages after trim
Patrick Donnelly [Thu, 21 Nov 2019 18:09:39 +0000 (10:09 -0800)]
mds: release free heap pages after trim

MDS free heap space can grow to large for some workloads (like smallfile
and recursive deletes). This can cause the MDS mapped memory to grow
well beyond memory targets.

When we finally use the PriorityCache in the MDS, this will not be
necessary anymore as the PriorityCache already does this.

Fixes: https://tracker.ceph.com/issues/42938
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
5 years agomgr/ssh: add mode option
Sage Weil [Mon, 18 Nov 2019 01:45:36 +0000 (19:45 -0600)]
mgr/ssh: add mode option

Set the mgr/ssh/mode option to ceph-daemon-package to switch to a mode
where we assume ceph-daemon is installed on the remote host and we can
ssh as user cephdaemon.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/ssh: add 'ssh get-pub-key' and 'ssh get-user' commands
Sage Weil [Mon, 18 Nov 2019 01:25:56 +0000 (19:25 -0600)]
mgr/ssh: add 'ssh get-pub-key' and 'ssh get-user' commands

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/ssh: convert to command decorations
Sage Weil [Mon, 18 Nov 2019 01:22:17 +0000 (19:22 -0600)]
mgr/ssh: convert to command decorations

Also fix up set-ssh-config error checking a bit.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agomgr/orchestrator: move command annotation helpers to orchestrator.py
Sage Weil [Thu, 21 Nov 2019 18:35:42 +0000 (12:35 -0600)]
mgr/orchestrator: move command annotation helpers to orchestrator.py

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoMerge PR #31747 into master
Sage Weil [Thu, 21 Nov 2019 17:49:35 +0000 (11:49 -0600)]
Merge PR #31747 into master

* refs/pull/31747/head:
qa/suites/rados/singleton-nomsgr/all/balancer: whitelist PG_AVAILABILITY

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
5 years agoMerge pull request #31734 from smithfarm/wip-cbs-fork-option
Nathan Cutler [Thu, 21 Nov 2019 17:43:22 +0000 (18:43 +0100)]
Merge pull request #31734 from smithfarm/wip-cbs-fork-option

ceph-backport.sh: allow user to specify --fork explicitly

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
5 years agoqa/tasks/ceph2: pull image using sha1
Sage Weil [Fri, 15 Nov 2019 14:21:02 +0000 (14:21 +0000)]
qa/tasks/ceph2: pull image using sha1

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoqa/tasks/ceph2: docker needs quay.io/ prefix for image name
Sage Weil [Thu, 14 Nov 2019 03:49:41 +0000 (03:49 +0000)]
qa/tasks/ceph2: docker needs quay.io/ prefix for image name

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoqa/workunits/rados/test_python: make sure rbd pool exists
Sage Weil [Wed, 13 Nov 2019 23:13:59 +0000 (23:13 +0000)]
qa/workunits/rados/test_python: make sure rbd pool exists

The ceph2 task doesn't create it for you.

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoqa/suites/rados/ssh: new tests!
Sage Weil [Wed, 13 Nov 2019 23:10:38 +0000 (23:10 +0000)]
qa/suites/rados/ssh: new tests!

Signed-off-by: Sage Weil <sage@redhat.com>
5 years agoqa/tasks/ceph2: pull ceph-ci/ceph:$branch
Sage Weil [Wed, 13 Nov 2019 17:14:51 +0000 (17:14 +0000)]
qa/tasks/ceph2: pull ceph-ci/ceph:$branch

Signed-off-by: Sage Weil <sage@redhat.com>