]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agocore: fix compiler warning due to difference in order of struct memebers 40872/head
Willem Jan Withagen [Thu, 15 Apr 2021 11:01:21 +0000 (13:01 +0200)]
core: fix compiler warning due to difference in order of struct memebers

Clang on FreeBSD reports:
```
Building CXX object src/global/CMakeFiles/libglobal_objs.dir/pidfile.cc.o
../src/global/pidfile.cc:170:5: warning: ISO C++ requires field designators to be specified in declaration order; field 'l_whence' will be initialized after field 'l_start' [-Wreorder-init-list]
    .l_start = 0,
    ^~~~~~~~~~~~
../src/global/pidfile.cc:169:17: note: previous initialization for field 'l_whence' is here
    .l_whence = SEEK_SET,
                ^~~~~~~~
```
And Linux and BSD have different orders in their `struct flock`

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
4 years agoMerge pull request #40862 from ivancich/wip-rgw-reshard-contention-logging
J. Eric Ivancich [Wed, 14 Apr 2021 20:13:17 +0000 (16:13 -0400)]
Merge pull request #40862 from ivancich/wip-rgw-reshard-contention-logging

rgw: during reshard lock contention, adjust logging

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #40821 from cbodley/wip-50218
Casey Bodley [Wed, 14 Apr 2021 18:45:00 +0000 (14:45 -0400)]
Merge pull request #40821 from cbodley/wip-50218

qa/rgw: use symlinks to specify distro

Reviewed-by: Ali Maredia <amaredia@redhat.com>
4 years agorgw: during reshard lock contention, adjust logging 40862/head
J. Eric Ivancich [Wed, 14 Apr 2021 17:55:22 +0000 (13:55 -0400)]
rgw: during reshard lock contention, adjust logging

When RGW fails to get a lock on a reshard log, we log it in such a way
that it looks like an error. Instead we'll make sure that the log
message is informational.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
4 years agoMerge branch 'CVE-2021-20288' into master
Ilya Dryomov [Wed, 14 Apr 2021 17:58:49 +0000 (19:58 +0200)]
Merge branch 'CVE-2021-20288' into master

* CVE-2021-20288:
  qa/standalone: default to disable insecure global id reclaim
  qa/suites/upgrade/octopus-x: disable insecure global_id reclaim health warnings
  qa/tasks/ceph[adm].conf[.template]: disable insecure global_id reclaim health alerts
  cephadm: set auth_allow_insecure_global_id_reclaim for mon on bootstrap
  mon/HealthMonitor: raise AUTH_INSECURE_GLOBAL_ID_RENEWAL[_ALLOWED]
  auth/cephx: ignore CEPH_ENTITY_TYPE_AUTH in requested keys
  auth/cephx: rotate auth tickets less often
  mon: fail fast when unauthorized global_id (re)use is disallowed
  auth/cephx: option to disallow unauthorized global_id (re)use
  auth/cephx: make cephx_decode_ticket() take a const ticket_blob
  auth/AuthServiceHandler: keep track of global_id and whether it is new
  auth/AuthServiceHandler: build_cephx_response_header() is cephx-specific
  auth/AuthServiceHandler: drop unused start_session() args
  mon/MonClient: drop global_id arg from _add_conn() and _add_conns()
  mon/MonClient: reset auth state in shutdown()
  mon/MonClient: preserve auth state on reconnects
  mon/MonClient: claim active_con's auth explicitly
  mon/MonClient: resurrect "waiting for monmap|config" timeouts

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Sage Weil <sage@redhat.com>
4 years agoMerge pull request #40614 from smithfarm/wip-39556
Kefu Chai [Wed, 14 Apr 2021 14:41:35 +0000 (22:41 +0800)]
Merge pull request #40614 from smithfarm/wip-39556

make-dist: refuse to run if script path contains a colon

Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40839 from gregsfortytwo/wip-mon-quorum-leader
Gregory Farnum [Wed, 14 Apr 2021 14:41:05 +0000 (07:41 -0700)]
Merge pull request #40839 from gregsfortytwo/wip-mon-quorum-leader

mon: MMonProbe: direct MMonJoin messages to the leader, instead of the first mon

Reviewed-by: Sam Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40807 from tchaikov/wip-common-include
Kefu Chai [Wed, 14 Apr 2021 14:39:45 +0000 (22:39 +0800)]
Merge pull request #40807 from tchaikov/wip-common-include

common/Formatter: include used header

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #40830 from gregsfortytwo/wip-sqlite3-build
Kefu Chai [Wed, 14 Apr 2021 14:38:55 +0000 (22:38 +0800)]
Merge pull request #40830 from gregsfortytwo/wip-sqlite3-build

mgr: do not require sqlite3.h if WITH_LIBCEPHSQLITE=OFF

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40840 from tchaikov/wip-silence-gcc-warnings
Kefu Chai [Wed, 14 Apr 2021 14:35:09 +0000 (22:35 +0800)]
Merge pull request #40840 from tchaikov/wip-silence-gcc-warnings

tools: silence gcc warnings

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge PR #40735 into master
Sage Weil [Wed, 14 Apr 2021 13:53:31 +0000 (09:53 -0400)]
Merge PR #40735 into master

* refs/pull/40735/head:
mgr/orchestractor: rgw realm and zone flags must both be provided

Reviewed-by: Juan Miguel Olmo <jolmomar@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Adam King <adking@redhat.com>
4 years agoMerge PR #40734 into master
Sage Weil [Wed, 14 Apr 2021 13:39:38 +0000 (09:39 -0400)]
Merge PR #40734 into master

* refs/pull/40734/head:
mgr/cephadm: make prometheus scrape ingress haproxy
doc/cephadm: remove big warning about stability
doc/cepham/compatibility: rgw-ha -> ingress; note possibility of breaking changes
mgr/cephadm: ingress: add optional virtual_interface_networks
doc/cephadm/rgw: clean up example spec
mgr/cephadm/services/ingress: less verbose about prepare_create
doc/cephadm/rgw: add note about which ethernet interface is used
cephadm: make keepalived unit fiddle sysctl settings
mgr/orchestrator: report external endpoints from 'orch ls'
mgr/orchestrator: drop - when no ports
doc/cephadm/rgw: update docs for ingress service
mgr/cephadm: use per_host_daemon feature in scheduler
mgr/cephadm/schedule: add per_host_daemon_type support
mgr/cephadm: HA_RGW -> Ingress
mgr/cephadm: include daemon_type in DaemonPlacement
mgr/cephadm: update list-networks to report interface names too
mgr/orchestrator: streamline 'orch ps' PORTS formatting
mgr/cephadm/schedule: handle multiple ports per daemon
mgr/cephadm/utils: resolve_ip(): prefer IPv4

Reviewed-by: Sebastian Wagner <swagner@suse.com>
4 years agoMerge pull request #40149 from tchaikov/wip-cmake-job-pool
Kefu Chai [Wed, 14 Apr 2021 07:06:50 +0000 (15:06 +0800)]
Merge pull request #40149 from tchaikov/wip-cmake-job-pool

cmake: use ninja job pool

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #40785 from tchaikov/wip-doc-list-spacing
Kefu Chai [Wed, 14 Apr 2021 04:42:31 +0000 (12:42 +0800)]
Merge pull request #40785 from tchaikov/wip-doc-list-spacing

doc/_themes: remove spacing after `ul li p`

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agotools/osdmaptool: mark unused variable [[maybe_unused]] 40840/head
Kefu Chai [Wed, 14 Apr 2021 02:46:14 +0000 (10:46 +0800)]
tools/osdmaptool: mark unused variable [[maybe_unused]]

to silence warning from GCC when performing release build, like:

../src/tools/osdmaptool.cc: In function ‘int main(int, const char**)’:
../src/tools/osdmaptool.cc:472:9: warning: variable ‘r’ set but not used [-Wunused-but-set-variable]
  472 |     int r = clock_gettime(CLOCK_MONOTONIC, &round_start);
      |         ^

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agodoc/radosgw: fix formatting of command line block 40785/head
Kefu Chai [Wed, 14 Apr 2021 01:33:35 +0000 (09:33 +0800)]
doc/radosgw: fix formatting of command line block

should add an empty line after the directive.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoadmin: require sphinx>=3.2.1
Kefu Chai [Wed, 14 Apr 2021 00:51:08 +0000 (08:51 +0800)]
admin: require sphinx>=3.2.1

loosen the required sphinx version.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agodoc/_themes: remove spacing after `ul li p`
Kefu Chai [Sun, 11 Apr 2021 03:09:25 +0000 (11:09 +0800)]
doc/_themes: remove spacing after `ul li p`

in the latest document generated from RtD, the spacing after `ul li p`
elements is set to 24px as the plain `p` elements. but this the lists
more sparse and difficult to read.

in this change, the spacing is restored to 0 as it was in old theme.css
in sphinx_rtd_theme.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agomon: MMonProbe: direct MMonJoin messages to the leader, instead of the first mon 40839/head
Greg Farnum [Tue, 13 Apr 2021 22:53:03 +0000 (22:53 +0000)]
mon: MMonProbe: direct MMonJoin messages to the leader, instead of the first mon

When monitors are joining a cluster, they may send an MMonJoin message to place
themselves correctly in the map in either handle_probe_reply() or
finish_election(). These messages must be sent to the leader -- monitors do not
forward each other's messages.

Unfortunately, this scenario was missed when converting the monitors to support
connectivity-based elections, and they're sending these messages to
quorum.begin(). Fix this by including an explicit leader in MMonProbe (that the
new monitor may reference in handle_probe_reply) and using the leader
value in both locations.

Fixes: https://tracker.ceph.com/issues/50345
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
4 years agoMerge pull request #40835 from gregsfortytwo/wip-stretch-mon-state
Gregory Farnum [Tue, 13 Apr 2021 22:38:01 +0000 (15:38 -0700)]
Merge pull request #40835 from gregsfortytwo/wip-stretch-mon-state

Fix issues with in-memory monitor stretch state

Reviewed-by: Sam Just <sjust@redhat.com>
4 years agomgr/cephadm: make prometheus scrape ingress haproxy 40734/head
Sage Weil [Tue, 13 Apr 2021 22:20:21 +0000 (18:20 -0400)]
mgr/cephadm: make prometheus scrape ingress haproxy

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agodoc/cephadm: remove big warning about stability
Sage Weil [Tue, 13 Apr 2021 14:20:48 +0000 (10:20 -0400)]
doc/cephadm: remove big warning about stability

It's the first item on the toctree that follows.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agodoc/cepham/compatibility: rgw-ha -> ingress; note possibility of breaking changes
Sage Weil [Tue, 13 Apr 2021 14:20:27 +0000 (10:20 -0400)]
doc/cepham/compatibility: rgw-ha -> ingress; note possibility of breaking changes

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/cephadm: ingress: add optional virtual_interface_networks
Sage Weil [Mon, 12 Apr 2021 21:21:33 +0000 (17:21 -0400)]
mgr/cephadm: ingress: add optional virtual_interface_networks

It may be that the virtual IP we want to use is not in the same network
as any existing IPs on the host.  In that case, allow the spec to specify
a list of networks to match against existing IPs so that a match will
identify an ethernet interface to use.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agodoc/cephadm/rgw: clean up example spec
Sage Weil [Mon, 12 Apr 2021 21:21:22 +0000 (17:21 -0400)]
doc/cephadm/rgw: clean up example spec

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/cephadm/services/ingress: less verbose about prepare_create
Sage Weil [Mon, 12 Apr 2021 19:55:19 +0000 (15:55 -0400)]
mgr/cephadm/services/ingress: less verbose about prepare_create

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agodoc/cephadm/rgw: add note about which ethernet interface is used
Sage Weil [Mon, 12 Apr 2021 19:53:50 +0000 (15:53 -0400)]
doc/cephadm/rgw: add note about which ethernet interface is used

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agocephadm: make keepalived unit fiddle sysctl settings
Sage Weil [Mon, 12 Apr 2021 17:50:12 +0000 (13:50 -0400)]
cephadm: make keepalived unit fiddle sysctl settings

No need to make the user adjust these manually.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/orchestrator: report external endpoints from 'orch ls'
Sage Weil [Fri, 9 Apr 2021 22:47:52 +0000 (18:47 -0400)]
mgr/orchestrator: report external endpoints from 'orch ls'

Add a PORTS column and report the external/virtual IP (and port(s)) from
'orch ls' output.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/orchestrator: drop - when no ports
Sage Weil [Sat, 10 Apr 2021 16:53:24 +0000 (12:53 -0400)]
mgr/orchestrator: drop - when no ports

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agodoc/cephadm/rgw: update docs for ingress service
Sage Weil [Fri, 9 Apr 2021 19:10:49 +0000 (15:10 -0400)]
doc/cephadm/rgw: update docs for ingress service

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/cephadm: use per_host_daemon feature in scheduler
Sage Weil [Fri, 9 Apr 2021 18:43:59 +0000 (14:43 -0400)]
mgr/cephadm: use per_host_daemon feature in scheduler

This only affects ingress, at least for now.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/cephadm/schedule: add per_host_daemon_type support
Sage Weil [Fri, 9 Apr 2021 18:43:45 +0000 (14:43 -0400)]
mgr/cephadm/schedule: add per_host_daemon_type support

This will be used to schedule a per-host keepalived alongside other
services.

Implement this as a final stage for place() that puts one per host and
also takes existing/stray daemons into consideration.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/cephadm: HA_RGW -> Ingress
Sage Weil [Fri, 9 Apr 2021 16:34:20 +0000 (12:34 -0400)]
mgr/cephadm: HA_RGW -> Ingress

This is mostly a rename, with some simplification and cleanup.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/cephadm: include daemon_type in DaemonPlacement
Sage Weil [Fri, 9 Apr 2021 18:19:37 +0000 (14:19 -0400)]
mgr/cephadm: include daemon_type in DaemonPlacement

Initially, this will always match the service_type.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/cephadm: update list-networks to report interface names too
Sage Weil [Thu, 1 Apr 2021 18:14:13 +0000 (14:14 -0400)]
mgr/cephadm: update list-networks to report interface names too

Also, minor fix in the ipv6 addr reporting: ignore networks that aren't in CIDR
form (no /).

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/orchestrator: streamline 'orch ps' PORTS formatting
Sage Weil [Tue, 23 Mar 2021 21:18:56 +0000 (17:18 -0400)]
mgr/orchestrator: streamline 'orch ps' PORTS formatting

"*:8000 *:8100" -> "*:8000,8100"

FWIW this matches the internal rendering used by DaemonPlacement

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/cephadm/schedule: handle multiple ports per daemon
Sage Weil [Tue, 23 Mar 2021 20:37:20 +0000 (16:37 -0400)]
mgr/cephadm/schedule: handle multiple ports per daemon

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agomgr/cephadm/utils: resolve_ip(): prefer IPv4
Sage Weil [Tue, 23 Mar 2021 20:09:15 +0000 (16:09 -0400)]
mgr/cephadm/utils: resolve_ip(): prefer IPv4

On my system the first item in hte list is
'fe80::408d:35e7:510:e9fe%eno1np0'.

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agoMerge PR #40833 into master
Patrick Donnelly [Tue, 13 Apr 2021 20:26:43 +0000 (13:26 -0700)]
Merge PR #40833 into master

* refs/pull/40833/head:
test/librados/tier_cxx: use non-deprecated wait_for_complete

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agotest/librados/tier_cxx: use non-deprecated wait_for_complete 40833/head
Samuel Just [Tue, 13 Apr 2021 18:18:17 +0000 (18:18 +0000)]
test/librados/tier_cxx: use non-deprecated wait_for_complete

Fixes: https://tracker.ceph.com/issues/50342
Signed-off-by: Samuel Just <sjust@redhat.com>
4 years agoMerge pull request #40798 from yuvalif/wip-yuval-fix-49800
Yuval Lifshitz [Tue, 13 Apr 2021 16:00:49 +0000 (19:00 +0300)]
Merge pull request #40798 from yuvalif/wip-yuval-fix-49800

rgw/test: use 'localhost' for amqp ssl test

4 years agoqa/rgw: rgw/crypt uses supported-random-distro$ 40821/head
Casey Bodley [Tue, 13 Apr 2021 14:44:05 +0000 (10:44 -0400)]
qa/rgw: rgw/crypt uses supported-random-distro$

Signed-off-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge branch 'master' into wip-unauthorized-gids
Ilya Dryomov [Tue, 13 Apr 2021 11:57:30 +0000 (13:57 +0200)]
Merge branch 'master' into wip-unauthorized-gids

Sync up with master up to commit 3d8e73b26661 ("Merge pull request
#40731 from tchaikov/wip-yamlize-options").  Specifically, bring in
src/common/options.cc yamlization and move new auth-related options
into src/common/options/global.yaml.in.

Conflicts:
src/common/options.cc
src/common/options/global.yaml.in

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
4 years agoMerge pull request #40832 from wjwithagen/wjw-fix-y2c.py
Kefu Chai [Tue, 13 Apr 2021 13:14:44 +0000 (21:14 +0800)]
Merge pull request #40832 from wjwithagen/wjw-fix-y2c.py

common: make y2c.py work on FreeBSD

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agocommon: make y2c.py work on FreeBSD 40832/head
Willem Jan Withagen [Tue, 13 Apr 2021 08:17:01 +0000 (10:17 +0200)]
common: make y2c.py work on FreeBSD

1) make reference to python3 indepedant of explicit path
2) add required py-yaml module to install list

fixes: #40731
Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
4 years agomon: set_healthy_stretch_mode in update_from_paxos, not random leader calls! 40835/head
Greg Farnum [Tue, 13 Apr 2021 06:25:47 +0000 (06:25 +0000)]
mon: set_healthy_stretch_mode in update_from_paxos, not random leader calls!

Add header comment describing how this works now.

Fixes: https://tracker.ceph.com/issues/50308
Signed-off-by: Greg Farnum <gfarnum@redhat.com>
4 years agomon: maintain stretch_recovery_triggered in new OSDMon::set_*_stretch_mode
Greg Farnum [Tue, 13 Apr 2021 05:28:31 +0000 (05:28 +0000)]
mon: maintain stretch_recovery_triggered in new OSDMon::set_*_stretch_mode

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
4 years agomon: add a set_recovery_stretch_mode function
Greg Farnum [Tue, 13 Apr 2021 05:27:32 +0000 (05:27 +0000)]
mon: add a set_recovery_stretch_mode function

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
4 years agomon: rename maybe_engage_stretch_mode to try_engage_stretch_mode
Greg Farnum [Fri, 9 Apr 2021 21:35:03 +0000 (21:35 +0000)]
mon: rename maybe_engage_stretch_mode to try_engage_stretch_mode

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
4 years agomgr: do not require sqlite3.h if WITH_LIBCEPHSQLITE=OFF 40830/head
Greg Farnum [Tue, 13 Apr 2021 04:12:11 +0000 (04:12 +0000)]
mgr: do not require sqlite3.h if WITH_LIBCEPHSQLITE=OFF

Signed-off-by: Greg Farnum <gfarnum@redhat.com>
4 years agoMerge pull request #40731 from tchaikov/wip-yamlize-options
Kefu Chai [Tue, 13 Apr 2021 03:38:49 +0000 (11:38 +0800)]
Merge pull request #40731 from tchaikov/wip-yamlize-options

common: extract options into yaml

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #40739 from jdurgin/wip-alienstore-debug
Kefu Chai [Tue, 13 Apr 2021 03:06:53 +0000 (11:06 +0800)]
Merge pull request #40739 from jdurgin/wip-alienstore-debug

crimson/os/alienstore: use bluestore debug prefix

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge PR #40626 into master
Sage Weil [Tue, 13 Apr 2021 02:38:49 +0000 (22:38 -0400)]
Merge PR #40626 into master

* refs/pull/40626/head:
qa/suites/rados/objectstore: separate store_test tests
qa/standalone: split osd/ into 2 directories

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agocommon/options: s/immutable-objet-cache/immutable-object-cache/ 40731/head
Kefu Chai [Tue, 13 Apr 2021 01:15:17 +0000 (09:15 +0800)]
common/options: s/immutable-objet-cache/immutable-object-cache/

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocommon: extract options into yaml
Kefu Chai [Fri, 9 Apr 2021 10:54:46 +0000 (18:54 +0800)]
common: extract options into yaml

extract the options in common/options.cc into separate .yaml.in
files, and preprocess them using CMake before translating them into .cc
files using a python script.

this change paves the road to render the options using sphinx, and
will allow us to further annotate the options to include more metadata.

also, a this YAML file can be consumed by applications like dashboard
and Sphinx to consume these metadata in a simpler way.

* use @variable-name@ for substituting the variables in .yaml.in file
* use cmake variable of `mgr_disabled_modules` instead of C macro
  to define `mgr_disabled_modules` in global.yaml.in
* debian/control, ceph.spec.in, win32_deps_build.sh: add python3-yaml
  as build dep
* add y2c.py (short for YAML to C++) to translate .yaml to .cc file
* common/options/*.yaml.in: extract and split options into .yaml.in
  files, the subvars in it is then replaced with CMake variables,
  and copied to the corresponding .yaml files
* include/config-h.in.cmake: remove MGR_DISABLED_MODULES, as it
  is not a CMake variable.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocmake: use the same name for macros and cmake variables
Kefu Chai [Sun, 11 Apr 2021 04:54:18 +0000 (12:54 +0800)]
cmake: use the same name for macros and cmake variables

for two reasons,

* consolidate the namings
* pave the road to yamlize options where we will use cmake variables
  to substitude the @<variable-name>@ in .in files instead of relying
  on C/C++ macros

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocmake: introduce WITH_EC_ISA_PLUGIN
Kefu Chai [Fri, 9 Apr 2021 04:14:23 +0000 (12:14 +0800)]
cmake: introduce WITH_EC_ISA_PLUGIN

instead of checking "HAVE_NASM_X64_AVX2 OR HAVE_ARMV8_SIMD" everywhere,
use a single cached variable of WITH_EC_ISA_PLUGIN. so it's more
consistent when checking the availability of ec_isa plugin.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoqa/suites/rados/objectstore: separate store_test tests 40626/head
Sage Weil [Tue, 6 Apr 2021 14:41:09 +0000 (09:41 -0500)]
qa/suites/rados/objectstore: separate store_test tests

This takes 5 hours currently.

- Separate out filestore and memstore into separate task (~1 hr)
- Split bluestore into -a and -b (a tests exclude SynethicMatrixC,
  b tests include it)

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agoMerge pull request #40576 from idryomov/wip-no-cephxv2-for-unmap
Ilya Dryomov [Mon, 12 Apr 2021 19:23:06 +0000 (21:23 +0200)]
Merge pull request #40576 from idryomov/wip-no-cephxv2-for-unmap

qa/suites/krbd: don't require CEPHX_V2 for unmap subsuite

Reviewed-by: Greg Farnum <gfarnum@redhat.com>
4 years agoMerge pull request #40800 from yuvalif/wip-yuval-fix-50291
Yuval Lifshitz [Mon, 12 Apr 2021 19:19:10 +0000 (22:19 +0300)]
Merge pull request #40800 from yuvalif/wip-yuval-fix-50291

rgw/amqp/test: fix mock prototype for librabbitmq-0.11.0

4 years agoMerge PR #40651 into master
Patrick Donnelly [Mon, 12 Apr 2021 19:11:05 +0000 (12:11 -0700)]
Merge PR #40651 into master

* refs/pull/40651/head:
doc/cephadm: fix a typo

Reviewed-by: Sebastian Wagner <swagner@suse.com>
4 years agoMerge pull request #40067 from myoungwon/wip-49726
Samuel Just [Mon, 12 Apr 2021 18:50:06 +0000 (11:50 -0700)]
Merge pull request #40067 from myoungwon/wip-49726

osd: avoid for the two copy to cancel each other

Reviewed-by: Samuel Just <sjust@redhat.com>
4 years agoqa/suites/upgrade/pacific-x/rgw-multisite: specify distro
Kefu Chai [Mon, 12 Apr 2021 06:55:51 +0000 (14:55 +0800)]
qa/suites/upgrade/pacific-x/rgw-multisite: specify distro

instead of using the default / existing distro, specify the distro for
testing. this change prevents us from using bionic for testing the
builds. this has two consequences:

* so we are one step closer to a non-bionic world.
* avoid building packages with PPA repo which *might* introduce runtime
  dependencies on 3rd party runtimes provided by PPA repo.

see also: https://tracker.ceph.com/issues/50218

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge PR #40546 into master
Sage Weil [Mon, 12 Apr 2021 16:36:48 +0000 (12:36 -0400)]
Merge PR #40546 into master

* refs/pull/40546/head:
SECURITY.md: Create SECURITY.md

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoqa/rgw: reenable valgrind in rgw/website
Casey Bodley [Mon, 12 Apr 2021 16:31:26 +0000 (12:31 -0400)]
qa/rgw: reenable valgrind in rgw/website

Signed-off-by: Casey Bodley <cbodley@redhat.com>
4 years agoqa/rgw: rgw/tempest uses ubuntu_latest.yaml
Casey Bodley [Mon, 12 Apr 2021 16:30:01 +0000 (12:30 -0400)]
qa/rgw: rgw/tempest uses ubuntu_latest.yaml

Signed-off-by: Casey Bodley <cbodley@redhat.com>
4 years agoqa/rgw: rgw/multifs uses ubuntu_latest.yaml
Casey Bodley [Mon, 12 Apr 2021 16:28:14 +0000 (12:28 -0400)]
qa/rgw: rgw/multifs uses ubuntu_latest.yaml

Signed-off-by: Casey Bodley <cbodley@redhat.com>
4 years agoqa/rgw: rgw/thrash uses ubuntu_latest.yaml
Casey Bodley [Mon, 12 Apr 2021 16:27:27 +0000 (12:27 -0400)]
qa/rgw: rgw/thrash uses ubuntu_latest.yaml

Signed-off-by: Casey Bodley <cbodley@redhat.com>
4 years agoqa/rgw: rgw/notifications no longer pins centos
Casey Bodley [Mon, 12 Apr 2021 16:17:21 +0000 (12:17 -0400)]
qa/rgw: rgw/notifications no longer pins centos

Signed-off-by: Casey Bodley <cbodley@redhat.com>
4 years agoqa/rgw: use symlinks for rgw/sts suite, target supported-random-distro$
Casey Bodley [Mon, 12 Apr 2021 16:16:23 +0000 (12:16 -0400)]
qa/rgw: use symlinks for rgw/sts suite, target supported-random-distro$

Signed-off-by: Casey Bodley <cbodley@redhat.com>
4 years agoqa/rgw: rgw/multisite uses supported-random-distro$
Casey Bodley [Mon, 12 Apr 2021 16:06:29 +0000 (12:06 -0400)]
qa/rgw: rgw/multisite uses supported-random-distro$

Signed-off-by: Casey Bodley <cbodley@redhat.com>
4 years agoqa/rgw: move rgw/multisite valgrind config into valgrind.yaml.disabled
Casey Bodley [Mon, 12 Apr 2021 16:04:22 +0000 (12:04 -0400)]
qa/rgw: move rgw/multisite valgrind config into valgrind.yaml.disabled

the valgrind coverage wasn't enabled, and it will take a lot more work
before we can reenable

Signed-off-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge PR #40726 into master
Sage Weil [Mon, 12 Apr 2021 15:53:02 +0000 (11:53 -0400)]
Merge PR #40726 into master

* refs/pull/40726/head:
doc: Add GPG Keys

Reviewed-by: Sage Weil <sage@redhat.com>
4 years agoMerge PR #40736 into master
Sage Weil [Mon, 12 Apr 2021 15:45:50 +0000 (11:45 -0400)]
Merge PR #40736 into master

* refs/pull/40736/head:
mgr/cephadm: rewrite/simplify describe_service
mgr/orchestrator: report osds as osd.unmanaged as appropriate
mgr/orchestrator: remove IMAGE ID from 'orch ls'

Reviewed-by: Michael Fritch <mfritch@suse.com>
4 years agoMerge pull request #40721 from rhcs-dashboard/49925-fix-nfs-ganesha
Ernesto Puerta [Mon, 12 Apr 2021 15:33:52 +0000 (17:33 +0200)]
Merge pull request #40721 from rhcs-dashboard/49925-fix-nfs-ganesha

mgr/dashboard: fix errors when creating NFS export.

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agoqa/standalone: split osd/ into 2 directories
Sage Weil [Tue, 6 Apr 2021 14:47:10 +0000 (09:47 -0500)]
qa/standalone: split osd/ into 2 directories

The whole osd/ directory takes 3 hours to run.  Of that, about half is
osd-backfill*:

2021-04-05T20:38:55.932 INFO:tasks.workunit:Running workunit osd/osd-backfill-prio.sh...
2021-04-05T20:47:27.184 INFO:tasks.workunit:Running workunit osd/osd-backfill-recovery-log.sh...
2021-04-05T20:55:59.497 INFO:tasks.workunit:Running workunit osd/osd-backfill-space.sh...
2021-04-05T21:48:47.549 INFO:tasks.workunit:Running workunit osd/osd-backfill-stats.sh...
2021-04-05T22:17:09.197 INFO:tasks.workunit:Running workunit osd/osd-bench.sh...

Signed-off-by: Sage Weil <sage@newdream.net>
4 years agoMerge pull request #40814 from tchaikov/wip/ceph-object-corpus/pacific
Kefu Chai [Mon, 12 Apr 2021 14:40:13 +0000 (22:40 +0800)]
Merge pull request #40814 from tchaikov/wip/ceph-object-corpus/pacific

ceph-object-corpus: pick up 16.2.0-90-g50f1821b4c

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #40801 from ivancich/wip-radoslist-incomplete-multipart-parts...
J. Eric Ivancich [Mon, 12 Apr 2021 14:34:50 +0000 (10:34 -0400)]
Merge pull request #40801 from ivancich/wip-radoslist-incomplete-multipart-parts-marker

rgw: radoslist incomplete multipart parts marker

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
4 years agomgr/orchestractor: rgw realm and zone flags must both be provided 40735/head
Daniel Pivonka [Fri, 9 Apr 2021 19:25:21 +0000 (15:25 -0400)]
mgr/orchestractor: rgw realm and zone flags must both be provided

Signed-off-by: Daniel Pivonka <dpivonka@redhat.com>
4 years agoceph-object-corpus: pick up 16.2.0-90-g50f1821b4c 40814/head
Kefu Chai [Mon, 12 Apr 2021 13:48:12 +0000 (21:48 +0800)]
ceph-object-corpus: pick up 16.2.0-90-g50f1821b4c

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40806 from rhcs-dashboard/fix-mailmap-master
Kefu Chai [Mon, 12 Apr 2021 13:47:04 +0000 (21:47 +0800)]
Merge pull request #40806 from rhcs-dashboard/fix-mailmap-master

mailmap: sort alphabetically & add Pere and Waad

Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
Reviewed-by: Waad Alkhoury <walkhour@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40656 from tchaikov/wip-qa-upgrade-focal
Kefu Chai [Mon, 12 Apr 2021 13:42:43 +0000 (21:42 +0800)]
Merge pull request #40656 from tchaikov/wip-qa-upgrade-focal

qa/suites: test upgrade/octopus-x on focal instead bionic

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #40811 from tchaikov/wip-gen-corpus
Kefu Chai [Mon, 12 Apr 2021 13:40:29 +0000 (21:40 +0800)]
Merge pull request #40811 from tchaikov/wip-gen-corpus

script/gen-corpus.sh: set CEPH_CONF

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agodoc: Add GPG Keys 40726/head
Hardik Vyas [Fri, 9 Apr 2021 11:41:26 +0000 (17:11 +0530)]
doc: Add GPG Keys

Replaced my GPG key with ceph.com and David's GPG keys

Signed-off-by: Hardik Vyas <hvyas@redhat.com>
4 years agoMerge pull request #40795 from wjwithagen/wjw-fix-ceph-dencoder
Kefu Chai [Mon, 12 Apr 2021 11:47:02 +0000 (19:47 +0800)]
Merge pull request #40795 from wjwithagen/wjw-fix-ceph-dencoder

tools: do not unload plugins during destruction.

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoqa/workunits/cls: add executable bit to script 40811/head
Kefu Chai [Mon, 12 Apr 2021 11:00:18 +0000 (19:00 +0800)]
qa/workunits/cls: add executable bit to script

all the scripts except for test_cls_cas.sh under qa/workunits/cls
are executable. to be more consistent, add the executable bit to
test_cls_cas.sh as well.

also, these scripts are launched by src/script/gen-corpus.sh directly,
so it's convenient just call them.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoscript/gen-corpus.sh: set CEPH_CONF
Kefu Chai [Mon, 12 Apr 2021 10:55:08 +0000 (18:55 +0800)]
script/gen-corpus.sh: set CEPH_CONF

if we happen to run this script on a host where /etc/ceph/ceph.conf is
available, ceph CLI would use it instead. so, point it to $PWD/ceph.conf
instead.

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40797 from wjwithagen/wjw-fix-monmap-retval
Kefu Chai [Mon, 12 Apr 2021 10:35:47 +0000 (18:35 +0800)]
Merge pull request #40797 from wjwithagen/wjw-fix-monmap-retval

test: Undo the FreeBSD specific retval test

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoinclude/denc: include used header 40807/head
Kefu Chai [Mon, 12 Apr 2021 09:43:13 +0000 (17:43 +0800)]
include/denc: include used header

to address the FTBFS like:

/home/kchai/ceph/src/include/denc.h: In member function ‘void DencDumper<T>::dump() const’:
/home/kchai/ceph/src/include/denc.h:121:60: error: ‘O_BINARY’ was not declared in this scope
     int fd = ::open(fn, O_WRONLY|O_TRUNC|O_CREAT|O_CLOEXEC|O_BINARY, 0644);
                                                            ^~~~~~~~
/home/kchai/ceph/src/include/denc.h:121:60: note: the macro ‘O_BINARY’ had not yet been defined
In file included from /home/kchai/ceph/src/include/statlite.h:14,
                 from /home/kchai/ceph/src/include/types.h:41,
                 from /home/kchai/ceph/src/auth/Crypto.h:19,
                 from /home/kchai/ceph/src/auth/Crypto.cc:21:

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agomon,osd: always init local variable
Kefu Chai [Mon, 12 Apr 2021 09:32:59 +0000 (17:32 +0800)]
mon,osd: always init local variable

this change silences the warning like:

../src/mon/Monitor.cc: In member function ‘void Monitor::handle_command(MonOpRequestRef)’:
../src/mon/Monitor.cc:3703:55: warning: ‘osd’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 3703 |     uint64_t seq = mgrstatmon()->get_last_osd_stat_seq(osd);
      |                    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agocommon/Formatter: include used header
Kefu Chai [Mon, 12 Apr 2021 09:28:56 +0000 (17:28 +0800)]
common/Formatter: include used header

otherwise it fails to build with gcc-toolset-10, like:

../src/common/Formatter.cc: In member function ‘virtual void ceph::XMLFormatter::close_section()’:
../src/common/Formatter.cc:449:8: error: ‘transform’ is not a member of ‘std’
  449 |   std::transform(section.begin(), section.end(), section.begin(),
      |        ^~~~~~~~~

Signed-off-by: Kefu Chai <kchai@redhat.com>
4 years agomailmap: add Dashboard members: Waad and Pere 40806/head
Ernesto Puerta [Mon, 12 Apr 2021 09:22:36 +0000 (11:22 +0200)]
mailmap: add Dashboard members: Waad and Pere

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
4 years agomailmap: sort alphabetically
Ernesto Puerta [Mon, 12 Apr 2021 09:19:25 +0000 (11:19 +0200)]
mailmap: sort alphabetically

Signed-off-by: Ernesto Puerta <epuertat@redhat.com>
4 years agoMerge pull request #40794 from wjwithagen/wjw-fix-promtool
Kefu Chai [Mon, 12 Apr 2021 09:06:47 +0000 (17:06 +0800)]
Merge pull request #40794 from wjwithagen/wjw-fix-promtool

test: Run Dockers only on Linux platforms

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #38120 from kiizawa/wip-cls-remote-read
Kefu Chai [Mon, 12 Apr 2021 08:42:52 +0000 (16:42 +0800)]
Merge pull request #38120 from kiizawa/wip-cls-remote-read

osd: allow remote read by calling cls method from within cls context

Reviewed-by: Samuel Just <sjust@redhat.com>
4 years agotest: Undo the FreeBSD specific retval test 40797/head
Willem Jan Withagen [Sun, 11 Apr 2021 14:27:35 +0000 (16:27 +0200)]
test: Undo the FreeBSD specific retval test

Changes to the socket code now result in returning EINVAL
In the past ENOENT was returned which is the FreeBSD error code
if DNS lookup does not work.

And that change is probably because somewhere in the code that
errorcode is not passed verbatim from the systemcall, but is
rewritten in extra evaluation.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
4 years agotools: do not unload plugins during destruction. 40795/head
Willem Jan Withagen [Sun, 11 Apr 2021 13:01:22 +0000 (15:01 +0200)]
tools: do not unload plugins during destruction.

FreeBSD ceph-dencoder crashes in the exit() calls, due to
invalid pointer references during the release process of
the loaded libraries.

Often this is signaled by libc reporting:
  __cxa_thread_call_dtors: dtr 0x47efc0 from unloaded dso, skipping

The cause for this is different behaviour between FreeBSD and Linux:
https://groups.google.com/g/bsdmailinglist/c/22ncTZAbDp4/m/Dii_pII5AwAJ
_The FreeBSD implementation here looks racy. If one thread dlcloses an
object while another thread is exiting, we can end up calling a
function at an invalid memory address. It also looks as if it may
be possible to unload one library, load another at the same address,
and end up executing entirely the wrong code, which would have some
serious security implications.

The GNU/Linux equivalent of this function locks the DSO in memory
until all references to it have gone away. A call to dlclose() on
GNU/Linux will not actually unload the library until all threads
with destructors in that library have been unloaded. I believe
that this reuses the same reference counting mechanism that
allows the same library to be dlopened and dlclosed multiple times.

Signed-off-by: Willem Jan Withagen <wjw@digiware.nl>
4 years agoMerge pull request #37016 from zhangdaolong/subcommon-bulefs-import
Kefu Chai [Mon, 12 Apr 2021 08:26:34 +0000 (16:26 +0800)]
Merge pull request #37016 from zhangdaolong/subcommon-bulefs-import

os/bluestore:Add subcommand bluefs-import in ceph-bluestore-tool.

Reviewed-by: Igor Fedotov <ifedotov@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #40644 from SMIL-Infra/cleanup-slash
Kefu Chai [Mon, 12 Apr 2021 08:23:48 +0000 (16:23 +0800)]
Merge pull request #40644 from SMIL-Infra/cleanup-slash

cephadm: cleanup extra slash in runtime dir

Reviewed-by: Adam King <adking@redhat.com>