Commit Graph

118921 Commits

Author SHA1 Message Date
Kefu Chai
b4c3801e9d pybind/mgr/mgr_module: preserve the signature of wrapped func
before this change, the annotations of the func wrapped by
CLICheckNonemptyFileInput and returns_command_result are lost after being
wrapped with this decorator. after this change, the parameter annotations
are preserved. these annotations are used for generating the argdesc in a
later commit.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-15 09:50:53 +08:00
Kefu Chai
243c78734d pybind/mgr/mgr_module: extract load_func_metadata()
so it can be reused by Command class.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-15 09:50:53 +08:00
Kefu Chai
5f3dbe5acd mgr/dashboard: annotate command handler
and use enum as the argument

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-15 09:50:53 +08:00
Kefu Chai
87af6d1f81 mgr/cephadm: s/yield_fixture/fixture/
silences pytest warning. it complained:`

1: cephadm/tests/fixtures.py:68
1:   /var/ssd/ceph/src/pybind/mgr/cephadm/tests/fixtures.py:68: PytestDeprecationWarning: @pytest.yield_fixture is deprecated.
1:   Use @pytest.fixture instead; they are the same.
1:     @pytest.yield_fixture()

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-15 09:37:39 +08:00
Kefu Chai
93b87a70d4 pybind/mgr/cephadm: use desc of command for docstring
in the new command mechinary, the docstring of command handler
is used as the description of the command.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-15 09:18:07 +08:00
Kefu Chai
93a60696ad pybind/mgr/mgr_module: drop arg parameter from CLICommand constructor
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-15 09:18:07 +08:00
Kefu Chai
458e4e70c8 pybind/mgr/snap_schedule: use param annotation for argsdesc
use parameter annotation for CLICommand args desc, less repeating this way

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-15 09:18:07 +08:00
Kefu Chai
3c431a54d9 mgr/dashboard: use param annotation for args desc
use parameter annotation for CLICommand arg desc

less repeating this way

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-15 09:18:07 +08:00
Adam King
657027088e mgr/cephadm: fix ha-rgw removal
removing the ha-rgw service from a host was failing due to some
issues with daemon type <-> service type conversions

Signed-off-by: Adam King <adking@redhat.com>
2021-01-14 20:04:27 -05:00
Patrick Donnelly
892c51dd3c
Merge PR #38896 into master
* refs/pull/38896/head:
	cephfs: Remove explicit forward declare CephContext

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-01-14 16:37:16 -08:00
Xie Xingguo
6fadfc768a
Merge pull request #38912 from xenago/patch-1
common/options: Fix typos for osd_recovery_max_active

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
2021-01-15 07:53:59 +08:00
Yuri Weinstein
9ad4a1f1e3
Merge pull request #38891 from yuriw/wip-yuriw-octopus-x-master
qa/tests: added stress-split-erasure-code-no-cephadm tests

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
2021-01-14 14:11:33 -08:00
Jason Dillaman
e2e76b57e3
Merge pull request #38721 from changchengx/pwl
librbd/cache/pwl: fix parameter type to update argument

Reviewed-by: Xiaoyan Li <xiaoyan.li@intel.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2021-01-14 17:02:11 -05:00
xenago
6c3b2923ae
common/options: Fix typos for osd_recovery_max_active
This commit fixes a minor typo in the descriptions of osd_recovery_max_active_hdd and osd_recovery_max_active_ssd.

Signed-off-by: Noah Kruiper <nkruiper@gmail.com>
2021-01-14 16:27:02 -05:00
Patrick Donnelly
de1efbd62b
cephadm: fix rgw osd cap tag
The syntax is "allow rwx tag rgw *=*'.

Sorry, I thought this would have gotten caught in testing :(

Fixes: 373cc847cf0f8b4ec7aefbfe64c01c3f18a4e021
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
2021-01-14 09:52:22 -08:00
Kefu Chai
334a7832a4
Merge pull request #38907 from rzarzynski/wip-crimson-errorator-handle_exception_type
crimson/common: errorated future exposes handle_exception_type().

Reviewed-by: Kefu Chai <kchai@redhat.com>
2021-01-15 01:37:45 +08:00
Patrick Donnelly
b4935c06d6
Merge PR #38708 into master
* refs/pull/38708/head:
	doc: update multiple mds scrub docs

Reviewed-by: Jeff Layton <jlayton@redhat.com>
2021-01-14 09:22:40 -08:00
Josh Durgin
770369c04e qa: remove invalid characters from octopus-x/parallel
Signed-off-by: Josh Durgin <jdurgin@redhat.com>
2021-01-14 09:05:37 -08:00
Jason Dillaman
42f00487b9 qa/workunits/rbd: simplify QCOW migration distro check
If the qemu-img command fails when attempting to use the QCOW (v1) format,
assume that the distro does not have support for the format enabled.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-01-14 11:52:05 -05:00
Jason Dillaman
6d4d4f2d5b
Merge pull request #38870 from orozery/rbd-encryption-pybind
librbd: python bindings for encryption api

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
2021-01-14 11:37:57 -05:00
Yuri Weinstein
ffa3af3eb0 qa/tests: fixed yaml format
Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
2021-01-14 08:31:40 -08:00
Patrick Donnelly
78a7df1500
Merge PR #38846 into master
* refs/pull/38846/head:
	*: remove legacy ceph_volume_client.py library

Reviewed-by: Varsha Rao <varao@redhat.com>
Reviewed-by: Rishabh Dave <ridave@redhat.com>
2021-01-14 08:10:19 -08:00
Patrick Donnelly
96934109fb
Merge PR #34858 into master
* refs/pull/34858/head:
	mds: do not allow the service to run on Windows
	win32*.sh: fix SKIP_TESTS flag
	include/win32/win32_errno:h Add missing include
	client: Port CephFS client to Windows

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Jeff Layton <jlayton@redhat.com>
2021-01-14 08:09:01 -08:00
Patrick Donnelly
d7731b7403
Merge PR #38574 into master
* refs/pull/38574/head:
	mds: update defaults for recall configs

Reviewed-by: Jeff Layton <jlayton@redhat.com>
2021-01-14 08:08:17 -08:00
Patrick Donnelly
bc57344ded
Merge PR #38889 into master
* refs/pull/38889/head:
	qa: add delays only for osd/mds

Reviewed-by: Jeff Layton <jlayton@redhat.com>
2021-01-14 08:07:40 -08:00
Patrick Donnelly
855c134e6b
Merge PR #38858 into master
* refs/pull/38858/head:
	client/libcephfs: Don't let one unmount screw up another mount

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
2021-01-14 07:39:38 -08:00
Radoslaw Zarzynski
9546d0687e crimson/common: errorated future exposes handle_exception_type().
Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2021-01-14 16:27:00 +01:00
Or Ozeri
992361b8d0 librbd: python bindings for encryption api
This commit adds the python bindings for the new librbd encryption api

Signed-off-by: Or Ozeri <oro@il.ibm.com>
2021-01-14 17:07:34 +02:00
Jason Dillaman
f3c44b083a librbd/migration: compute deltas between QCOW2 snapshots
Utilize the COPIED bit within the cluster offset to quickly determine
if the corresponding cluster block has been copied.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-01-14 09:35:35 -05:00
Jason Dillaman
164fce1c6e librbd/migration: move snapshot delta helpers to utils
The RawFormat class has logic for computing snapshot deltas that
can be re-used by the new QCOWFormat class.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-01-14 09:35:35 -05:00
Jason Dillaman
1f4b5aeb0e librbd/migration: add support for reading from QCOW2 snapshots
Tweak the IO read path to now utilize the L1 table associated with
the specified snapshot id. This will cause the IO to properly read
from the specific snapshot.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-01-14 09:35:35 -05:00
Jason Dillaman
1594b53d75 librbd/migration: decode QCOW2 snapshot metadata during open
This will allow the migration state machine to build matching RBD
snapshots to mimic the QCOW2 snapshots. The next commit will add the
ability to read from a snapshot.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-01-14 09:35:35 -05:00
Jason Dillaman
bd8db295ea librbd/migration: basic QCOW2 format handler
The initial implementation does not support backing files, compression,
snapshots, (deprecated) encryption, external data files, nor L2 subcluster
allocation. The former three features will be added in a future commit.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-01-14 09:35:35 -05:00
Jason Dillaman
83aa1a9e73 librbd/migration: basic QCOW v1 format handler
The initial implementation does not support backing files, compression, nor
(deprecated) encryption. The former two features will be added in a future commit.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
2021-01-14 09:35:34 -05:00
Kefu Chai
a022d17ddc pybind/mgr/mgr_module: use 'not in' for checking membership
silences the warning from flake8 like

test for membership should be 'not in' [E713]

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-14 22:08:35 +08:00
Kefu Chai
446e03fd00 pybind/ceph_argparse: add argdesc() method to type classes
so they can be used to build argdesc from method annotations, these
argdesc strings will be consumed by ceph CLI to do client-side
validation of command arguments.

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-14 22:08:35 +08:00
Kefu Chai
09b7e837be mgr/devicehealth: add arg annotations
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-14 22:08:35 +08:00
Kefu Chai
e7ee3e9c9e mgr/devicehealth: PEP8 compliance cleanups
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-14 22:08:35 +08:00
Kefu Chai
4053413569 pybind/mgr: translate argspec to argdesc
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-14 22:08:35 +08:00
Kefu Chai
f550907543 pybing/mgr/mgr_module: use annotations when collecting args
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-14 22:08:35 +08:00
Igor Fedotov
a23488df4f osd/PG: fix no exit() call for PeeringState::Deleting state
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
2021-01-14 16:30:54 +03:00
Sebastian Wagner
70722a2efb cephadm: Don't make sysctl spam the log file
`sysctl -a` really spams the log file in Teuthology

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2021-01-14 13:01:49 +01:00
Sebastian Wagner
db7c6a5612 mgr/cephadm: lock multithreaded access to OSDRemovalQueue
Since the set can be changed also from the CLI thread

Fixes: https://tracker.ceph.com/issues/47700

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2021-01-14 13:00:46 +01:00
Sebastian Wagner
1f39532e03 mgr/cephadm: OSDRemovalQueue: remove some trivial wrappers
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2021-01-14 13:00:46 +01:00
Sebastian Wagner
df16b86c7b mgr/cephadm: move RemoveUtil into OSDRemovalQueue
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2021-01-14 13:00:46 +01:00
Sebastian Wagner
af52ba47a1 mgr/cephadm: move process_removal_queue into OSDRemovalQueue
`process_removal_queue` belongs to OSDRemovalQueue
instead of RemoveUtil

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2021-01-14 13:00:46 +01:00
Sebastian Wagner
086afa9a69 mgr/cephadm: make OSDRemovalQueue not inherent from set
Instead, let's make it a member.

Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2021-01-14 12:58:45 +01:00
Sebastian Wagner
e0f9983b50 mgr/cephadm: rename OSDQueue -> OSDRemovalQueue
Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
2021-01-14 12:58:45 +01:00
Kefu Chai
01190fff1d pybind/mgr: do not check for kwargs if already collecting kwargs
Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-14 19:46:04 +08:00
Kefu Chai
9ff0b6cf95 pybing/mgr/mgr_module: make CLICommand._parse_args() a staticmethod
for better readability

Signed-off-by: Kefu Chai <kchai@redhat.com>
2021-01-14 19:46:04 +08:00