Kefu Chai [Tue, 19 Nov 2019 02:57:38 +0000 (10:57 +0800)]
mon: annotate more tell commands
currently, the only consumer of the annotated tell commands is
`Monitor::handle_tell_command()`, which check the cap of the client
against the required permission of the command to be executed.
if the command is not annotated, it's assumed that the command requires
"mon rwx".
because the asock commands are registered at runtime using
`AdminSocket::register_command()`, and there are some asock commands are
shared by all ceph applications using asock facility, without a proper
machinary, we cannot annotate all of them and populate this annotated
commands to all these ceph applications. so, at this moment, only
a subset of asock commands are annotated.
Kefu Chai [Tue, 19 Nov 2019 02:44:16 +0000 (10:44 +0800)]
mon: check cap before executing tell command
tell command is sent from a client from network, we need to authorize
the cap of client before executing the command sent by it.
in this change, the check for `session->caps.is_allow_all()` is removed,
because
- simpler this way
- `session->caps.is_capable()` also check it, and this code path is
not a critical path, so no need for trading the simplicity for
performance here.
Kefu Chai [Tue, 19 Nov 2019 01:48:57 +0000 (09:48 +0800)]
mon: s/reply_command/reply_tell_command/
* s/reply_command/reply_tell_command/, otherwise
`Monitor::reply_command()` panics, because it
expects a `MMonCommand`.
* do not handle a tell command twice
Kefu Chai [Mon, 18 Nov 2019 16:40:16 +0000 (00:40 +0800)]
mon: make "mon compact" an tell/asok commands again
in the big tell/asok cleanup, "compact" and "mon compact" were turned
into cli commands, but they should be asok commands. as we should allow
user to compact monstore on a certain mon.
in this change, "compact" and "mon compact" are now tell/asok commands
again.
Kefu Chai [Thu, 19 Dec 2019 03:36:59 +0000 (11:36 +0800)]
test/pybind: s/nosetests/python3/
different distros package python3-nose in different ways by adding
different postfix to "/usr/bin/nosetests" to differentiate it from
its python2 counterpart.
* on bionic, python3-nose offers "nosetests3"
* on el8, python3-nose offers "nosetests-3" and "nosetests-3.6"
Kefu Chai [Wed, 18 Dec 2019 09:08:21 +0000 (17:08 +0800)]
cmake: drop WITH_PYTHON2 option
* drop WITH_PYTHON2 option
* print warning message if WITH_PYTHON3 is disabled
* drop MGR_PYTHON_VERSION option, as we don't support use different
python version for python binding and ceph-mgr embedded python
interpreter anymore. as before switching to python3-only build,
we can build python3 and python2 python bindings, and ceph-mgr
can use either of them. but after switching to python3-only
build, ceph-mgr has to use whatever python version used to
build python binding.
* move WITH_PYTHON3 option to $top_srcdir/CMakeLists.txt, as ceph-mgr
and python binding will share this option.
* hardware ${PYTHON_VERSION} to 3
* hardware ${Python${PYTHON_VERSION}_VERSION_MAJOR} to 3
* only build boost library with python3
* s/Python_EXECUTABLE/Python3_EXECUTABLE/
* update the build scripts and packagings accordingly
* rename all cython${PYTHON_VERSION}_* targets to cython_*
* update distutils_install_module() so it does not take python_version
parameter anymore.
Kefu Chai [Thu, 19 Dec 2019 02:56:16 +0000 (10:56 +0800)]
cmake: CMAKE_ROLE defaults to "PROJECT"
so we can use exported targets like "Python3::Python", which is defined
only if CMAKE_ROLE is "PROJECT". but this global property was introduced
by CMake 3.14, but the minimum required version of CMake is 3.10.2 in
Ceph project at this moment. let's set it if it's not defined.
Sebastian Wagner [Wed, 18 Dec 2019 13:38:48 +0000 (14:38 +0100)]
spec, debian: cephadm requires lvm2
cephadm mounts `/run/lvm` into OSD containers, which only exists,
if `lvm2` is installed on the container host. Otherwise we cannot
start ceph-volume or osd containers.
Fixes: https://tracker.ceph.com/issues/43368 Signed-off-by: Sebastian Wagner <sebastian.wagner@suse.com>
Sage Weil [Tue, 17 Dec 2019 21:23:27 +0000 (15:23 -0600)]
Merge PR #32252 into master
* refs/pull/32252/head:
qa/cephfs/begin: libaio-devel on el8
qa/tasks: nosetests -> python -m nose
qa/tasks/rbd_fio: fio 2.21 -> 3.16
src/test/cli-integration/rbd/snap-diff.t: python -> python
qa/workunits: use nose 3
qa/tasks/cbt: install python3 deps
qa/tasks/ceph_manager.py: do not use python to write a file
test/pybind/test_rados: execute takes a bytes (not str) payload
qa/packages/packages: python[3]-ceph is no more
qa: use python3 for venvs etc
packaging: remove python3-ipaddres, as it is part of the stdlib in py3
qa/packages: python-ceph -> python3-ceph
qa/distros: centos7 -> centos8, rhel7 -> rhel8
spec: remove _python_buildid in favor of python3_pkgversion macro
spec: remove python2 packages and conditions
debian: remove python >= 2.7 requirement
debian: add mgr python versions
debian: explicitly set PYTHON2=OFF to prevent picking up python2 interpreter
debian: update control file to use python3 dependency names
debian: remove all python2 overrides and declarations
debian: remove all python2 install files
Casey Bodley [Tue, 17 Dec 2019 18:30:48 +0000 (13:30 -0500)]
radosgw-admin: sync status displays id of shard furthest behind
'radosgw-admin sync status' gives you a timestamp for the "oldest
incremental change not applied", but doesn't tell you which shard that
came from. add [shard-id] to the output
Sage Weil [Tue, 17 Dec 2019 19:57:12 +0000 (13:57 -0600)]
Merge PR #32278 into master
* refs/pull/32278/head:
qa/suites/rgw: disable valgrind for tests that require py2/ubuntu
qa/suites/rgw: disable remaining ragweed test
qa/suites/rgw: pin swift tests to py2/ubuntu
qa/suites/rgw: ragweed on ubuntu
qa/suites: run s3tests on ubuntu
Kefu Chai [Tue, 17 Dec 2019 14:27:28 +0000 (22:27 +0800)]
admin/doc-requirements.txt: bump Sphinx and breathe
* use the latest Sphinx
* use the latest breathe. also, since there is no need to be compatible
with python2. we can move to 4.14.0 which is python3 only.
Jason Dillaman [Mon, 16 Dec 2019 18:10:36 +0000 (13:10 -0500)]
qa/workunit/rbd: fixed QoS throughput unit parsing
The 'rbd bench' command was recently modified to print IEC units
instead of bytes/sec. This broke the handling for QoS throughput
tests since it was incorrectly evaluating the available RBD
throughput. Additionally, the QoS tests should use a "<="
comparison operator since the QoS is the upper-bound limit.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
Sage Weil [Mon, 16 Dec 2019 21:55:51 +0000 (15:55 -0600)]
cephadm: do not force container removal on unit stop
The -f arg for 'podman rm' will remove the container without actually
stopping it, leaving the running containers and processes (conmon and
daemon) running and generally making a mess of things.
Doing 'podman rm' without the -f on a running container will complain
that the container is still running.
So, first stop, then remove.
Fixes: f1de7060762d31e567a277c02b0d8d533fbb4661 Signed-off-by: Sage Weil <sage@redhat.com>
Kefu Chai [Tue, 17 Dec 2019 11:48:45 +0000 (19:48 +0800)]
stop.sh: do not try to contact mon unless cluster is up
otherwise "ceph mon metadata" will hang, when we try to stop an
already-stopped cluster. and `vstart_runner.py` always calls `stop.sh`
before setting up a cluster.