]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agocmake: do not pass -fpermissive when compiling C code 40179/head
Kefu Chai [Wed, 17 Mar 2021 12:03:45 +0000 (20:03 +0800)]
cmake: do not pass -fpermissive when compiling C code

silences warnings like

[2/768] /usr/bin/x86_64-w64-mingw32-gcc-posix -DBOOST_ASIO_DISABLE_THREAD_KEYWORD_EXTENSION -DHAVE_CONFIG_H -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -D_POSIX=1 -D_POSIX_=1 -D_POSIX_C_SOURCE=1
-D_POSIX_THREADS=1 -D_REENTRANT -D_THREAD_SAFE -D_WIN32_WINNT=0x0A00 -D__CEPH__ -D__STDC_FORMAT_MACROS -Isrc/include -I../src -I../src/include/win32 -isystem ../build.deps/mingw/boost/include -isystem
include -isystem ../src/xxHash -isystem ../src/rapidjson/include -isystem ../src/fmt/include -O3 -DNDEBUG   -include winsock_wrapper.h -include win32_errno.h -U_FORTIFY_SOURCE -Wall
-fno-strict-aliasing -fsigned-char -Wtype-limits -Wignored-qualifiers -Wpointer-arith -Werror=format-security -Winit-self -Wno-unknown-pragmas -fpermissive -fdiagnostics-color=auto -std=gnu99 -MD -MT
src/CMakeFiles/common-objs.dir/xxHash/xxhash.c.obj -MF src/CMakeFiles/common-objs.dir/xxHash/xxhash.c.obj.d -o src/CMakeFiles/common-objs.dir/xxHash/xxhash.c.obj   -c ../src/xxHash/xxhash.c
cc1: warning: command line option '-fpermissive' is valid for C++/ObjC++ but not for C

see also
https://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/C_002b_002b-Dialect-Options.html

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40153 from rzarzynski/wip-osd-obclock-cleanup
Kefu Chai [Tue, 16 Mar 2021 14:04:32 +0000 (22:04 +0800)]
Merge pull request #40153 from rzarzynski/wip-osd-obclock-cleanup

osd: clean obc locking and repop creation as a sidequest of crimson's InternalClientRequest

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #39996 from tchaikov/wip-crimson-cleanups
Kefu Chai [Tue, 16 Mar 2021 14:01:58 +0000 (22:01 +0800)]
Merge pull request #39996 from tchaikov/wip-crimson-cleanups

crimson: cleanups

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agoosd: move PrimaryLogPG::get_rw_locks() from header to .cc. 40153/head
Radoslaw Zarzynski [Tue, 16 Mar 2021 12:45:06 +0000 (12:45 +0000)]
osd: move PrimaryLogPG::get_rw_locks() from header to .cc.

For the sake of symmetry with `release_object_locks()`
and easier grepping for e.g. `ctx->lock_manager`.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agoosd: PrimaryLogPG::new_repop() doesn't depend on obc anymore.
Radoslaw Zarzynski [Mon, 15 Mar 2021 19:14:44 +0000 (19:14 +0000)]
osd: PrimaryLogPG::new_repop() doesn't depend on obc anymore.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agoMerge PR #40130 into master
Sage Weil [Tue, 16 Mar 2021 12:43:06 +0000 (08:43 -0400)]
Merge PR #40130 into master

* refs/pull/40130/head:
mgr/cephadm: less noise about refreshing hosts

Reviewed-by: Juan Miguel Olmo <jolmomar@redhat.com>
4 years agoMerge PR #40140 into master
Sage Weil [Tue, 16 Mar 2021 12:42:46 +0000 (08:42 -0400)]
Merge PR #40140 into master

* refs/pull/40140/head:
mgr/cephadm: fix 'auth caps' fallback

Reviewed-by: Juan Miguel Olmo <jolmomar@redhat.com>
4 years agocrimson/os: do not include unused headers 39996/head
Kefu Chai [Wed, 10 Mar 2021 09:13:22 +0000 (17:13 +0800)]
crimson/os: do not include unused headers

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agotest/crimson: use GTEST_FAIL() for printing failure message
Kefu Chai [Wed, 10 Mar 2021 09:07:25 +0000 (17:07 +0800)]
test/crimson: use GTEST_FAIL() for printing failure message

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocrimson/os: drop duplicated __attribute__
Kefu Chai [Wed, 10 Mar 2021 09:07:02 +0000 (17:07 +0800)]
crimson/os: drop duplicated __attribute__

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge PR #40122 into master
Patrick Donnelly [Mon, 15 Mar 2021 22:46:24 +0000 (15:46 -0700)]
Merge PR #40122 into master

* refs/pull/40122/head:
qa/tests: reduced octopus-x jobs on master and pacific (--subset 1/10)

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agomgr/cephadm: fix 'auth caps' fallback 40140/head
Sage Weil [Mon, 15 Mar 2021 22:34:57 +0000 (17:34 -0500)]
mgr/cephadm: fix 'auth caps' fallback

The first get-or-create attempt also needs to tolerate failure.

Fixes: 8ceea1961f818dc2d07edf9c256ebe5150b6b133
Signed-off-by: Sage Weil <sage@newdream.net>
4 years agoMerge PR #40078 into master
Sage Weil [Mon, 15 Mar 2021 20:11:24 +0000 (16:11 -0400)]
Merge PR #40078 into master

* refs/pull/40078/head:
mgr: wait for ~3 beacons on startup if mons are pre-pacific
mon/MgrMonitor: populate available_modules from promote_standby()

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge PR #40071 into master
Sage Weil [Mon, 15 Mar 2021 20:10:34 +0000 (16:10 -0400)]
Merge PR #40071 into master

* refs/pull/40071/head:
mgr/cephadm: tolerate failure to update daemon caps
mgr/cephadm: fix get_keyring_with_caps

Reviewed-by: Adam King <adking@redhat.com>
4 years agoMerge pull request #40043 from cbodley/wip-49741
Casey Bodley [Mon, 15 Mar 2021 19:12:00 +0000 (15:12 -0400)]
Merge pull request #40043 from cbodley/wip-49741

rgw: rgw::sal::RGWBucket initializes creation_time

Reviewed-by: Yehuda Sadeh <yehuda@redhat.com>
Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
4 years agoMerge pull request #39820 from cbodley/wip-qa-rgw-ignore-pg-avail
Casey Bodley [Mon, 15 Mar 2021 19:09:29 +0000 (15:09 -0400)]
Merge pull request #39820 from cbodley/wip-qa-rgw-ignore-pg-avail

qa/rgw: put PG_AVAILABILITY ignorelist override in its own file

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge PR #39979 into master
Sage Weil [Mon, 15 Mar 2021 18:49:24 +0000 (14:49 -0400)]
Merge PR #39979 into master

* refs/pull/39979/head:
python-common: fix PlacementSpec target size method
python-common: count-per-host must be combined with label or hosts or host_pattern
mgr/cephadm: handle bare 'count-per-host:NNN', fix comments
mgr/cephadm/schedule: remove Scheduler abstraction (for now at least)
mgr/cephadm/schedule: calculate additions/removals in place()
mgr/cephadm/schedule: allow colocation of certain daemon types
mgr/cephadm/schedule: shuffle candidates, not final placements
mgr/cephadm/schedule: pass per-type allow_colo to the scheduler
mgr/cephadm/services/cephadmservice: fix typo
mgr/cephadm/schedule: pass daemons, not get_daemons_func
mgr/cephadm: use local var
mgr/cephadm/schedule: move host filtering into get_candidates()
python-common/ceph/deployment/service_spec: disallow max-per-host + explicit placement
mgr/cephadm/schedule: respect count-per-host
mgr/cephadm: adjust deployment logic to allow multiple daemons per host
python-common: add count-per-host to PlacementSpec
mgr/cephadm: do not worry about even # of monitors

Reviewed-by: Juan Miguel Olmo <jolmomar@redhat.com>
Reviewed-by: Sebastian Wagner <swagner@suse.com>
4 years agoqa/tests: reduced octopus-x jobs on master and pacific (--subset 1/10) 40122/head
Yuri Weinstein [Mon, 15 Mar 2021 16:52:42 +0000 (09:52 -0700)]
qa/tests: reduced octopus-x jobs on master and pacific (--subset 1/10)

Signed-off-by: Yuri Weinstein <yweinste@redhat.com>
4 years agomgr/cephadm: less noise about refreshing hosts 40130/head
Sage Weil [Mon, 15 Mar 2021 18:47:39 +0000 (13:47 -0500)]
mgr/cephadm: less noise about refreshing hosts

These happen every ~10 minutes and will obscure any real messages of
interest.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agoMerge pull request #40049 from gregsfortytwo/wip-stretch-fixes-2
Gregory Farnum [Mon, 15 Mar 2021 18:33:35 +0000 (11:33 -0700)]
Merge pull request #40049 from gregsfortytwo/wip-stretch-fixes-2

osd: Fix a bunch of stretch peering issues

Reviewed-by: Sam Just <sjust@redhat.com>
4 years agoMerge pull request #39858 from sseshasa/wip-dmclock-hdd-misc-imprvmts
Neha Ojha [Mon, 15 Mar 2021 17:27:56 +0000 (10:27 -0700)]
Merge pull request #39858 from sseshasa/wip-dmclock-hdd-misc-imprvmts

osd: Incorporate cost per io & cost per byte for cost scaling calculations in mclock scheduler.

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agomgr/cephadm: tolerate failure to update daemon caps 40071/head
Sage Weil [Mon, 15 Mar 2021 16:55:36 +0000 (11:55 -0500)]
mgr/cephadm: tolerate failure to update daemon caps

If we're upgrading from 15.2.0, we may fail to update caps.  Instead of
failing the upgrade hard, warn to the log and continue.  This is less
than ideal, but the caps will get corrected the next time the daemon is
redeployed on the next upgrade, and most likely the previous caps will
continue to work (given they were presumably working before the upgrade).

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agoMerge pull request #40098 from tchaikov/wip-qa-powertools
Kefu Chai [Mon, 15 Mar 2021 15:05:47 +0000 (23:05 +0800)]
Merge pull request #40098 from tchaikov/wip-qa-powertools

qa/workunits/rados/test_envlibrados_rocksdb: s/PowerTools/powertools/

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #40111 from tchaikov/wip-ceph-argparse-no-option-name
Kefu Chai [Mon, 15 Mar 2021 14:46:32 +0000 (22:46 +0800)]
Merge pull request #40111 from tchaikov/wip-ceph-argparse-no-option-name

pybind/ceph_argparse: do not print flag name before CephChoices in he…

Reviewed-by: Sebastian Wagner <swagner@suse.com>
Reviewed-by: Adam King <adking@redhat.com>
4 years agoMerge pull request #39916 from zdover23/wip-doc-cephadm-adoption-preparation-2021...
Sebastian Wagner [Mon, 15 Mar 2021 14:25:39 +0000 (15:25 +0100)]
Merge pull request #39916 from zdover23/wip-doc-cephadm-adoption-preparation-2021-Mar-08

doc/cephadm: rewrite "preparation" in adoption.rst

Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agoMerge pull request #40115 from tchaikov/wip-mgr-prometheus
Kefu Chai [Mon, 15 Mar 2021 14:17:24 +0000 (22:17 +0800)]
Merge pull request #40115 from tchaikov/wip-mgr-prometheus

pybind/mgr/prometheus: add typing annotations

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
4 years agoMerge pull request #40002 from orozery/rbd-encryption-api
Jason Dillaman [Mon, 15 Mar 2021 12:28:33 +0000 (08:28 -0400)]
Merge pull request #40002 from orozery/rbd-encryption-api

librbd: crypto format api semantics change

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agopybind/mgr/prometheus: add typing annotations 40115/head
Kefu Chai [Mon, 15 Mar 2021 11:35:16 +0000 (19:35 +0800)]
pybind/mgr/prometheus: add typing annotations

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/ceph_argparse: do not print flag name before CephChoices in help descs 40111/head
Kefu Chai [Mon, 15 Mar 2021 10:27:44 +0000 (18:27 +0800)]
pybind/ceph_argparse: do not print flag name before CephChoices in help descs

This reverts commit 332abcd25059c3ed07ca5df54110a83e07f28f86.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40101 from dzafman/wip-49779
Kefu Chai [Mon, 15 Mar 2021 09:38:41 +0000 (17:38 +0800)]
Merge pull request #40101 from dzafman/wip-49779

standalone: osd-recovery-scrub.sh: Recovery never started

Reviewed-by: Ronen Friedman <rfriedma@redhat.com>
4 years agoMerge pull request #40056 from tchaikov/wip-no-more-MOSDPGNotify
Kefu Chai [Mon, 15 Mar 2021 09:21:39 +0000 (17:21 +0800)]
Merge pull request #40056 from tchaikov/wip-no-more-MOSDPGNotify

osd: do not send/handle MOSDPGNotify anymore

Reviewed-by: Ronen Friedman <rfriedma@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #36298 from p-se/mgr-prom-collect-time-metric
Kefu Chai [Mon, 15 Mar 2021 09:11:55 +0000 (17:11 +0800)]
Merge pull request #36298 from p-se/mgr-prom-collect-time-metric

mgr/prometheus: introduce metric for collection time

Reviewed-by: Mykola Golub <mgolub@suse.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40100 from liewegas/bug-49788
Kefu Chai [Mon, 15 Mar 2021 09:09:18 +0000 (17:09 +0800)]
Merge pull request #40100 from liewegas/bug-49788

osd: propagate base pool application_metadata to tiers

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40041 from adk3798/helpcoms
Kefu Chai [Mon, 15 Mar 2021 09:07:07 +0000 (17:07 +0800)]
Merge pull request #40041 from adk3798/helpcoms

pybind/ceph_argparse: print flag name before CephChoices in help descs

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40062 from tchaikov/wip-no-lockdep-in-rel-builds
Kefu Chai [Mon, 15 Mar 2021 09:03:00 +0000 (17:03 +0800)]
Merge pull request #40062 from tchaikov/wip-no-lockdep-in-rel-builds

cmake: do not build debug_mutex or lockdep for Release build

Reviewed-by: Xuehan Xu <xxhdx1985126@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
4 years agolibrbd: crypto format api semantics change 40002/head
Or Ozeri [Tue, 9 Mar 2021 20:14:49 +0000 (22:14 +0200)]
librbd: crypto format api semantics change

This commit alters the semantics of the encryption format api
to also load the encryption after format completes.
Additionally, several other small changes in librbd crypto are included,
in preparation of supporting clone formatting.

Signed-off-by: Or Ozeri <oro@il.ibm.com>
4 years agotest: osd-recovery-scrub.sh: Test fails if no scrubs happened for a recovering pg 40101/head
David Zafman [Sat, 13 Mar 2021 05:56:28 +0000 (05:56 +0000)]
test: osd-recovery-scrub.sh: Test fails if no scrubs happened for a recovering pg

Change TEST_recovery_scrub_2 to create more objects and use
osd_recovery_sleep to prevent recovery from finihing before
we start to scrub.  Verify that at least 1 scrub was started
while the pg was reovering.

Fixes: https://tracker.ceph.com/issues/49779
Signed-off-by: David Zafman <dzafman@redhat.com>
4 years agocrimson/osd: do not include unused headers 40056/head
Kefu Chai [Fri, 12 Mar 2021 07:21:04 +0000 (15:21 +0800)]
crimson/osd: do not include unused headers

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoosd/PG: do not include unused headers
Kefu Chai [Fri, 12 Mar 2021 07:13:24 +0000 (15:13 +0800)]
osd/PG: do not include unused headers

neither MOSDPGNotify nor MOSDPGInfo is used in PG.cc, so drop the
corresponding headers.

the same appiles to some other types and headers declared and included
in PG.h

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoosd: do not handle pre-octopus messages
Kefu Chai [Fri, 12 Mar 2021 06:51:30 +0000 (14:51 +0800)]
osd: do not handle pre-octopus messages

MOSDPGQuery and MOSDPGInfo messages are sent by
pre-octopus OSD, so in quincy and up clusters, we do not need
to handle them anymore, as we can only upgrade from octopus and
up to quincy.

we can drop MOSDPGNotify after Q + 2, though, after we stop sending
MOSDPGNotify in Q release.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoosd: send MOSDPGNotify2 instead of MOSDPGNotify
Kefu Chai [Fri, 12 Mar 2021 07:09:12 +0000 (15:09 +0800)]
osd: send MOSDPGNotify2 instead of MOSDPGNotify

as we prefer sending MOSDPGNotify2 over MOSDPGNotify in PeeringState
in post octopus, to be more consistent and have one less thing to
worry, let's just use MOSDPGNotify2 in OSD.cc as well.

Fixes: https://tracker.ceph.com/issues/49758
Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoosd: drop OSD::create_context()
Kefu Chai [Fri, 12 Mar 2021 06:40:47 +0000 (14:40 +0800)]
osd: drop OSD::create_context()

OSD::create_context() was used for creating PeeringCtx from OSD's
require_osd_release. but since the check against require_osd_release
is not required anymore, let's drop this helper.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoosd/PeeringState: do not check for require_osd_release
Kefu Chai [Fri, 12 Mar 2021 06:23:50 +0000 (14:23 +0800)]
osd/PeeringState: do not check for require_osd_release

before this change, we always check for require_osd_release when
creating MOSDPGNotify2 or MOSDPGNotify, if require_osd_release is
greater or equal to octopus, MOSDPGNotify2 is created.

since we are in a post-quincy era, and we only need to upgrade from
octopus and up to quincy, there is no need to be compatible with
osd whose version is lower than octopus.

in this change, the check in `BufferedRecoveryMessages::send_notify()`
is dropped.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoRevert "qa/standalone/scrub/osd-recovery-scrub: fix unnoticed recovery state"
David Zafman [Sat, 13 Mar 2021 05:32:41 +0000 (05:32 +0000)]
Revert "qa/standalone/scrub/osd-recovery-scrub: fix unnoticed recovery state"

This reverts commit 1323bdb839e77fb27cba36ef2725bb7f163b1db4.

The tests needs to scrub while recovery is in progress, so catching
recovery from the logs after the fact isn't the proper setup.
We can use osd_recovery_sleep config.

Signed-off-by: David Zafman <dzafman@redhat.com>
4 years agoosd: propagate base pool application_metadata to tiers 40100/head
Sage Weil [Sat, 13 Mar 2021 16:34:43 +0000 (11:34 -0500)]
osd: propagate base pool application_metadata to tiers

If there is application metadata on the base pool, it should be mirrored
to any other tiers in the set.  This aligns with the fact that the
'ceph osd pool application ...' commands refuse to operate on a non-base
pool.

This fixes problems with accessing tiers (e.g., cache tiers) when the
cephx cap is written in terms of application metadata.

Fixes: https://tracker.ceph.com/issues/49788
Signed-off-by: Sage Weil <sage@newdream.net>
4 years agoMerge PR #40042 into master
Sage Weil [Sat, 13 Mar 2021 15:40:55 +0000 (10:40 -0500)]
Merge PR #40042 into master

* refs/pull/40042/head:
qa/suites/rados/cephadm: add back centos+rhel with kubic podman

Reviewed-by: Sebastian Wagner <swagner@suse.com>
4 years agoqa/workunits/rados/test_envlibrados_rocksdb: s/PowerTools/powertools/ 40098/head
Kefu Chai [Sat, 13 Mar 2021 09:00:56 +0000 (17:00 +0800)]
qa/workunits/rados/test_envlibrados_rocksdb: s/PowerTools/powertools/

see also 7a68845579c701f43c9526c810e586680cf76fe0

Fixes: https://tracker.ceph.com/issues/49787
Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocmake: do not build lockdep for Release build 40062/head
Kefu Chai [Fri, 12 Mar 2021 11:39:28 +0000 (19:39 +0800)]
cmake: do not build lockdep for Release build

lockdep create large data structures on .bss and on heap for tracking
the locks and their dependencies. but we don't need to pay for this
if lockdep is not enabled.

lockdep helps us to track the lock dependencies related issue on Debug
build. and Release build, this feature hurts the performance and more
importantly, lockdeps is a feature only kicks in when using the
mutex_debug and friends. they are not used in Release build at all.

so, after this change, lockdep is not built in Release build. and
the static variables defined in lockdep.cc are not allocated anymore
in Release build.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocommon/lockdep: disable lockdep if !CEPH_DEBUG_MUTEX
Kefu Chai [Fri, 12 Mar 2021 13:12:08 +0000 (21:12 +0800)]
common/lockdep: disable lockdep if !CEPH_DEBUG_MUTEX

make lockdep a feature which can only be enabled at compile time.

we don't need to have lockdep when CEPH_DEBUG_MUTEX is OFF, so
just comment it out in Release builds.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40036 from tchaikov/wip-doc-mgr
Josh Durgin [Fri, 12 Mar 2021 23:48:10 +0000 (15:48 -0800)]
Merge pull request #40036 from tchaikov/wip-doc-mgr

doc/mgr: fix formatting

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #40044 from ceph/wip-1427-notes
Josh Durgin [Fri, 12 Mar 2021 23:35:19 +0000 (15:35 -0800)]
Merge pull request #40044 from ceph/wip-1427-notes

doc: 14.2.17 Release Notes

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Yuri Weinstein <yweins@redhat.com>
4 years agoosd: PeeringState: implement an acting_set_writeable() function 40049/head
Greg Farnum [Fri, 12 Mar 2021 22:41:03 +0000 (22:41 +0000)]
osd: PeeringState: implement an acting_set_writeable() function

Use it instead of direct checks against min_size and stretch_set_can_peer()
when deciding whether to go STATE_ACTIVE/STATE_PEERED or do updates
to things like last_epoch_started.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
4 years agoosd: PeeringState: fix a boolean conditional direction
Greg Farnum [Fri, 12 Mar 2021 21:05:29 +0000 (21:05 +0000)]
osd: PeeringState: fix a boolean conditional direction

We want to add an OSD from the mandatory member if we DON'T already have one!

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
4 years agoosd: PeeringState: fix stretch peering so PGs can go peered but not active
Greg Farnum [Fri, 12 Mar 2021 20:13:38 +0000 (20:13 +0000)]
osd: PeeringState: fix stretch peering so PGs can go peered but not active

I misunderstood and there was a pretty serious error here: to prevent
accidents, choose_acting() was preventing PGs from *finishing* peering
if they didn't satisfy the stretch cluster rules. What we actually want
to do is to finish peering, but not go active.

Happily, this is easy to fix -- we just add a call to stretch_set_can_peer()
alongside existing min_size checks when we choose whether to go PG_STATE_ACTIVE
or PG_STATE_PEERED!

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
4 years agoosd: PeeringState: don't add acting-set OSDs to candidate set in stretch mode
Greg Farnum [Thu, 11 Mar 2021 22:19:10 +0000 (22:19 +0000)]
osd: PeeringState: don't add acting-set OSDs to candidate set in stretch mode

We were adding them once from the acting set, and then once from the all_infos
set, and that hit an assert later on. (I think it was otherwise harmless, but
I don't want to weaken the assert!)

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
4 years agoosd: PeeringState: fix calc_replicated_acting_stretch() syntax/logic
Greg Farnum [Thu, 11 Mar 2021 10:26:47 +0000 (10:26 +0000)]
osd: PeeringState: fix calc_replicated_acting_stretch() syntax/logic

There was a major error here! get_ancestor() was type-deduced to return
a bucket_candidates_t -- a *copy* of what was in the map, not the reference
to it we wanted to actually amend!

Fix this by returning a pointer instead. There's a way to coerce things
to return a reference instead but the syntax seems clumsier to me
and I'm not familiar with it anyway -- this works just fine.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
4 years agoosd: PeeringState: respect stretch peering constraints for async recovery
Greg Farnum [Thu, 11 Mar 2021 07:40:52 +0000 (07:40 +0000)]
osd: PeeringState: respect stretch peering constraints for async recovery

Happily this is pretty simple: we just need to check that the resulting
wanted set can peer, which we have a function for. Run it before actually
swapping the want and candidate_want sets.

If we're not in stretch mode, this is a cheap function call that
will always return true, so it's equivalent to what we already have for them.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
4 years agoosd: PeeringState: add a comment about using size as a proxy for activateable
Greg Farnum [Thu, 11 Mar 2021 07:19:26 +0000 (07:19 +0000)]
osd: PeeringState: add a comment about using size as a proxy for activateable

When reviewing, I mistakenly thought we needed to skip a size check in
choose_acting() in case of mismatches between size and bucket counts, but that
is not accurate!

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
4 years agomgr: wait for ~3 beacons on startup if mons are pre-pacific 40078/head
Sage Weil [Fri, 12 Mar 2021 20:21:49 +0000 (15:21 -0500)]
mgr: wait for ~3 beacons on startup if mons are pre-pacific

If we are going active and the mons are pre-pacific, they may have the
bug https://tracker.ceph.com/issues/49778 which prevents our modules
metadata (including options) from being updated (until the next beacon).
Wait a bit (6s by default, 3x the 2s mgr_tick_period) to let this
happen.

This allows us to upgrade from broken pre-pacific mons using cephadm,
which may (if orig cluster is <15.2.5) immediately do a cephadm
migration that relies on the mgr/cephadm/migration_current config
option being present in the mon's mgrmap.

Workaround for https://tracker.ceph.com/issues/49778

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agoMerge PR #40045 into master
Sage Weil [Fri, 12 Mar 2021 20:09:15 +0000 (15:09 -0500)]
Merge PR #40045 into master

* refs/pull/40045/head:
cephadm: use image id, not name, when inspecting for RepoDigests

Reviewed-by: Sebastian Wagner <swagner@suse.com>
4 years agomon/MgrMonitor: populate available_modules from promote_standby()
Sage Weil [Fri, 12 Mar 2021 20:00:49 +0000 (15:00 -0500)]
mon/MgrMonitor: populate available_modules from promote_standby()

This was done in the beacon path, where there is no active mgr and we
get a new entrant, but not for this case where an existing standby is
promoted to active.

This fixes a problem during upgrade where a new (standby) mgr's modules
have a new module option but it is not reflected immediately (not until
the next beacon).

Fixes: https://tracker.ceph.com/issues/49778
Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/cephadm: fix get_keyring_with_caps
Sage Weil [Fri, 12 Mar 2021 16:15:35 +0000 (10:15 -0600)]
mgr/cephadm: fix get_keyring_with_caps

1- Pass caps to 'auth get-or-create'
2- Only try 'auth caps' if the get-or-create failed

Note that the 'auth caps' step can fail if upgrading from 15.2.0 since
'profile mgr' didn't include 'auth caps' until 15.2.1.  We're not
addressing that for now...

Fixes: 7c0d532f3a4839f4199a13773fb5fa8b6fb3f183
Signed-off-by: Sage Weil <sage@newdream.net>
4 years agoMerge pull request #40052 from tchaikov/wip-rpm-no-rbd-rwl-on-el8
Kefu Chai [Fri, 12 Mar 2021 17:56:19 +0000 (01:56 +0800)]
Merge pull request #40052 from tchaikov/wip-rpm-no-rbd-rwl-on-el8

ceph.spec: build with system libpmem on fedora and el8

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
4 years agoMerge pull request #40050 from dillaman/wip-49690
Mykola Golub [Fri, 12 Mar 2021 17:50:04 +0000 (19:50 +0200)]
Merge pull request #40050 from dillaman/wip-49690

librbd/io: send alloc_hint when compression hint is set

Reviewed-by: Mykola Golub <mgolub@suse.com>
4 years agoMerge pull request #38853 from dzafman/wip-48843
David Zafman [Fri, 12 Mar 2021 17:20:51 +0000 (09:20 -0800)]
Merge pull request #38853 from dzafman/wip-48843

osd: Try other PGs when reservation failures occur

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agocommon/ceph_context: disable lockdep if !CEPH_DEBUG_MUTEX
Kefu Chai [Fri, 12 Mar 2021 11:50:45 +0000 (19:50 +0800)]
common/ceph_context: disable lockdep if !CEPH_DEBUG_MUTEX

make lockdep a feature which can only be enabled at compile time.

we don't need to have lockdep when CEPH_DEBUG_MUTEX is OFF, so
just comment it out in Release builds.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocmake: do not build mutex_debug.cc if !WITH_CEPH_DEBUG_MUTEX
Kefu Chai [Fri, 12 Mar 2021 11:32:16 +0000 (19:32 +0800)]
cmake: do not build mutex_debug.cc if !WITH_CEPH_DEBUG_MUTEX

there is no need to build shared_mutex_debug.cc and
mutex_debug.cc, if they are not used at all. in Release build
we just use the mutex primitives offered by C++ standard library and
the POSIX API offered by libc.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocmake/crimson: define crimson_alien_common_srcs
Kefu Chai [Fri, 12 Mar 2021 17:11:27 +0000 (01:11 +0800)]
cmake/crimson: define crimson_alien_common_srcs

so we can add to this list if some option is enabled

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agopybind/ceph_argparse: print flag name before CephChoices in help descs 40041/head
Adam King [Wed, 10 Mar 2021 22:01:04 +0000 (17:01 -0500)]
pybind/ceph_argparse: print flag name before CephChoices in help descs

Fixes: https://tracker.ceph.com/issues/49757
Signed-off-by: Adam King <adking@redhat.com>
4 years agoMerge PR #40046 into master
Sage Weil [Fri, 12 Mar 2021 16:18:48 +0000 (11:18 -0500)]
Merge PR #40046 into master

* refs/pull/40046/head:
qa/suites/rados/cephadm/upgrade: deploy a legacy r.z-style rgw

Reviewed-by: Sebastian Wagner <swagner@suse.com>
4 years agoMerge pull request #40010 from dillaman/wip-49716
Mykola Golub [Fri, 12 Mar 2021 15:17:32 +0000 (17:17 +0200)]
Merge pull request #40010 from dillaman/wip-49716

librbd: allow interrupted trash move request to be restarted

Reviewed-by: Mykola Golub <mgolub@suse.com>
4 years agoceph.spec: build with system libpmem on fedora and el8 40052/head
Kefu Chai [Fri, 12 Mar 2021 04:02:22 +0000 (12:02 +0800)]
ceph.spec: build with system libpmem on fedora and el8

* build with WITH_SYSTEM_PMDK=ON on fedora, as f32 and f33 ship
  libpmem1.8 and libpmem1.9 respectively. and we need libpmem v1.7
* build with WITH_SYSTEM_PMDK=ON on el8, as el8 and CentOS8 AppStream
  ships libpmem v1.6,

quote from nvml.spec:

> By design, PMDK does not support any 32-bit architecture.
> Due to dependency on some inline assembly, PMDK can be compiled only
> on these architectures:
> - x86_64
> - ppc64le (experimental)
> - aarch64 (unmaintained, supporting hardware doesn't exist?)

so far, only x86_64 and ppc64le packages are built.

see also,
https://src.fedoraproject.org/rpms/nvml/blob/rawhide/f/nvml.spec

this change addresses a regression introduced by
a49d1dbb32e2436ff2836a85b2fa84418f0a5fff

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40068 from tchaikov/wip-readme-ninja
Kefu Chai [Fri, 12 Mar 2021 14:22:37 +0000 (22:22 +0800)]
Merge pull request #40068 from tchaikov/wip-readme-ninja

README.md: correct notes on `-j` option

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
4 years agoREADME.md: correct notes on `-j` option 40068/head
Kefu Chai [Fri, 12 Mar 2021 13:27:29 +0000 (21:27 +0800)]
README.md: correct notes on `-j` option

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40057 from tchaikov/wip-49726
Kefu Chai [Fri, 12 Mar 2021 13:36:59 +0000 (21:36 +0800)]
Merge pull request #40057 from tchaikov/wip-49726

Revert "osd: avoid two copy with same src cancel each other"

Reviewed-by: Samuel Just <sjust@redhat.com>
4 years agocmake: make "WITH_CEPH_DEBUG_MUTEX" depend on CMAKE_BUILD_TYPE
Kefu Chai [Fri, 12 Mar 2021 11:29:54 +0000 (19:29 +0800)]
cmake: make "WITH_CEPH_DEBUG_MUTEX" depend on CMAKE_BUILD_TYPE

this option is available only if CMAKE_BUILD_TYPE is Debug.

this change helps us to unify the checks for WITH_CEPH_DEBUG_MUTEX,
without this change, we always have to check both WITH_CEPH_DEBUG_MUTEX
*and* CMAKE_BUILD_TYPE.

after this change, we only respect WITH_CEPH_DEBUG_MUTEX.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40004 from vshankar/wip-cephfs-mirror-symlink-overrun
Venky Shankar [Fri, 12 Mar 2021 12:50:24 +0000 (18:20 +0530)]
Merge pull request #40004 from vshankar/wip-cephfs-mirror-symlink-overrun

cephfs-mirror: fix possible incorrect symbolic link synchronization

4 years agoMerge pull request #38476 from aclamk/wip-bs-alloc-check
Kefu Chai [Fri, 12 Mar 2021 12:31:56 +0000 (20:31 +0800)]
Merge pull request #38476 from aclamk/wip-bs-alloc-check

os/bluestore: add asserts for allocator regions

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Igor Fedotov <ifedotov@suse.com>
4 years agoMerge pull request #39670 from myoungwon/wip-fix-missing-snap-manifest
Kefu Chai [Fri, 12 Mar 2021 12:26:01 +0000 (20:26 +0800)]
Merge pull request #39670 from myoungwon/wip-fix-missing-snap-manifest

osd: fix missing adjacent snaps when handling manifest object

Reviewed-by: Samuel Just <sjust@redhat.com>
4 years agoMerge pull request #39941 from tchaikov/wip-mgr-localpool-ann
Kefu Chai [Fri, 12 Mar 2021 12:09:21 +0000 (20:09 +0800)]
Merge pull request #39941 from tchaikov/wip-mgr-localpool-ann

mgr/localpool: add type annotations

Reviewed-by: Sebastian Wagner <swagner@suse.com>
4 years agoMerge pull request #39994 from Rishabh4275/master
Kefu Chai [Fri, 12 Mar 2021 12:03:04 +0000 (20:03 +0800)]
Merge pull request #39994 from Rishabh4275/master

os/bluestore: Fix zoned code location in _do_truncate

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
4 years agoMerge pull request #39992 from tchaikov/wip-byteorder-endian
Kefu Chai [Fri, 12 Mar 2021 12:02:30 +0000 (20:02 +0800)]
Merge pull request #39992 from tchaikov/wip-byteorder-endian

include/byteorder: drop init_le*() helpers

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Ronen Friedman <rfriedma@redhat.com>
4 years agoMerge pull request #39998 from tchaikov/wip-rwlock
Kefu Chai [Fri, 12 Mar 2021 12:00:57 +0000 (20:00 +0800)]
Merge pull request #39998 from tchaikov/wip-rwlock

src/: do not include RWLock.h unless RWLock is used

Reviewed-by: Casey Bodley <cbodley@redhat.com>
Reviewed-by: Jason Dillaman <dillaman@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #39410 from sebastian-philipp/drive-group-validate-data-devices...
Sebastian Wagner [Fri, 12 Mar 2021 11:40:40 +0000 (12:40 +0100)]
Merge pull request #39410 from sebastian-philipp/drive-group-validate-data-devices-none

python-common: Verify data_devices is not None

Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
4 years agoMerge pull request #39857 from adk3798/dup-labels
Sebastian Wagner [Fri, 12 Mar 2021 11:04:54 +0000 (12:04 +0100)]
Merge pull request #39857 from adk3798/dup-labels

mgr/cephadm: remove duplicate labels when adding a host

Reviewed-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>
Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Sebastian Wagner <sebastian.wagner@suse.com>
4 years agotest: add symbolic link synchronization test for cephfs-mirror 40004/head
Venky Shankar [Wed, 10 Mar 2021 13:40:40 +0000 (08:40 -0500)]
test: add symbolic link synchronization test for cephfs-mirror

Fixes: http://tracker.ceph.com/issues/49711
Signed-off-by: Venky Shankar <vshankar@redhat.com>
4 years agocephfs-mirror: null terminate buffer before synchronizing symbolc link
Venky Shankar [Wed, 10 Mar 2021 13:37:47 +0000 (08:37 -0500)]
cephfs-mirror: null terminate buffer before synchronizing symbolc link

Signed-off-by: Venky Shankar <vshankar@redhat.com>
4 years agoosd: Revert "osd: avoid two copy with same src cancel each other" 40057/head
Kefu Chai [Fri, 12 Mar 2021 07:27:28 +0000 (15:27 +0800)]
osd: Revert "osd: avoid two copy with same src cancel each other"

This reverts commit 617f7114e261595e2e85970e171dcad41f283599.

Fixes: https://tracker.ceph.com/issues/49726
Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40053 from rishabh-d-dave/readme-update
Kefu Chai [Fri, 12 Mar 2021 04:36:06 +0000 (12:36 +0800)]
Merge pull request #40053 from rishabh-d-dave/readme-update

README.md: replace "make" with "ninja"

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoREADME.md: replace "make" by "ninja" 40053/head
Rishabh Dave [Fri, 12 Mar 2021 04:21:39 +0000 (09:51 +0530)]
README.md: replace "make" by "ninja"

Update README.md since ninja is the default generator now.

Signed-off-by: Rishabh Dave <ridave@redhat.com>
4 years agolibrbd/io: send alloc_hint when compression hint is set 40050/head
Jason Dillaman [Fri, 12 Mar 2021 00:44:15 +0000 (19:44 -0500)]
librbd/io: send alloc_hint when compression hint is set

Previously the hint would not be set if the object map indicated the
object may exist.

Fixes: https://tracker.ceph.com/issues/49690
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
4 years agoosd: check for is_stretch_pool() in stretch_set_can_peer()
Greg Farnum [Thu, 11 Mar 2021 07:58:19 +0000 (07:58 +0000)]
osd: check for is_stretch_pool() in stretch_set_can_peer()

This makes it easy and cheap to call from non-stretch contexts.

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
4 years agoscripts: some additions to help with local testing
Greg Farnum [Thu, 4 Mar 2021 02:41:03 +0000 (02:41 +0000)]
scripts: some additions to help with local testing

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
4 years agoMerge PR #40034 into master
Sage Weil [Thu, 11 Mar 2021 23:52:03 +0000 (18:52 -0500)]
Merge PR #40034 into master

* refs/pull/40034/head:
qa/suites/rados/cephadm/upgrade: start at 15.2.9 to test iscsi upgrade
qa/tasks/cephadm.py: don't set mgr count to +1

Reviewed-by: Sebastian Wagner <swagner@suse.com>
4 years agodoc: 14.2.17 Release Notes 40044/head
David Galloway [Thu, 11 Mar 2021 20:24:25 +0000 (15:24 -0500)]
doc: 14.2.17 Release Notes

Signed-off-by: David Galloway <dgallowa@redhat.com>
4 years agocephadm: use image id, not name, when inspecting for RepoDigests 40045/head
Sage Weil [Thu, 11 Mar 2021 21:56:52 +0000 (16:56 -0500)]
cephadm: use image id, not name, when inspecting for RepoDigests

The name is ambiguous, but the image_id is not!  This fixes problems
during upgrade where upgrade thinks the container is upgraded (due to
an incorrect digest) when in fact it is not.

Fixes: 0826c45e0cb5d60fcf8cd71cd14edd34a6997cd4
Signed-off-by: Sage Weil <sage@newdream.net>
4 years agoqa/suites/rados/cephadm/upgrade: start at 15.2.9 to test iscsi upgrade 40034/head
Sage Weil [Thu, 11 Mar 2021 03:58:33 +0000 (22:58 -0500)]
qa/suites/rados/cephadm/upgrade: start at 15.2.9 to test iscsi upgrade

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agorgw: rgw::sal::RGWBucket initializes creation_time 40043/head
Casey Bodley [Thu, 11 Mar 2021 20:12:08 +0000 (15:12 -0500)]
rgw: rgw::sal::RGWBucket initializes creation_time

rgw::sal::RGWUser::list_buckets() uses the RGWBucketEnt constructor.
RGWBucketEnt::creation_time is initialized, but get_creation_time()
returns the uninitialized info.creation_time

Fixes: https://tracker.ceph.com/issues/49741
Signed-off-by: Casey Bodley <cbodley@redhat.com>
4 years agoqa/suites/rados/cephadm: add back centos+rhel with kubic podman 40042/head
Sage Weil [Thu, 11 Mar 2021 19:46:23 +0000 (13:46 -0600)]
qa/suites/rados/cephadm: add back centos+rhel with kubic podman

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agodoc/cephadm: rewrite "preparation" in adoption.rst 39916/head
Zac Dover [Mon, 8 Mar 2021 16:23:51 +0000 (02:23 +1000)]
doc/cephadm: rewrite "preparation" in adoption.rst

This rewrites the "Adoption" section of
preparation.rst in the Cephadm manual.

Signed-off-by: Zac Dover <zac.dover@gmail.com>