]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
3 years agomon: do not update inline incompat except via mds
Patrick Donnelly [Tue, 30 Mar 2021 21:07:46 +0000 (14:07 -0700)]
mon: do not update inline incompat except via mds

The MDS_FEATURE_INCOMPAT_INLINE feature indicates that an MDS knows how
to read/write inline data and that the file system may have it. The
separate setting for inline_data protects this file system feature.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agomds: add MDSMap method for creating null MDSMap
Patrick Donnelly [Wed, 17 Mar 2021 16:55:04 +0000 (09:55 -0700)]
mds: add MDSMap method for creating null MDSMap

It's not necessary to distribute a CompatSet with the null mdsmap. We
only need to communicate that the MDS is not part of any map.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agomds: only update beacon epoch if newer
Patrick Donnelly [Tue, 6 Apr 2021 15:20:54 +0000 (08:20 -0700)]
mds: only update beacon epoch if newer

This is a defensive programming change. We don't want the beacon epoch
to ever go backwards.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agomds: harden standby_mds lookup
Patrick Donnelly [Tue, 30 Mar 2021 21:13:42 +0000 (14:13 -0700)]
mds: harden standby_mds lookup

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agomon/FSCommands: accept generic ostream rather than stringstream
Patrick Donnelly [Tue, 30 Mar 2021 19:40:58 +0000 (12:40 -0700)]
mon/FSCommands: accept generic ostream rather than stringstream

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agoinclude: add less verbose CompatSet dump
Patrick Donnelly [Mon, 5 Apr 2021 14:55:20 +0000 (07:55 -0700)]
include: add less verbose CompatSet dump

For printing in `fs dump`.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agoinclude: add dump operator for Feature
Patrick Donnelly [Tue, 30 Mar 2021 21:10:28 +0000 (14:10 -0700)]
include: add dump operator for Feature

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agoinclude: add const qualifier to appropriate CompatSet methods
Patrick Donnelly [Tue, 30 Mar 2021 19:39:36 +0000 (12:39 -0700)]
include: add const qualifier to appropriate CompatSet methods

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agoMerge PR #42513 into master
Patrick Donnelly [Fri, 30 Jul 2021 21:03:36 +0000 (14:03 -0700)]
Merge PR #42513 into master

* refs/pull/42513/head:
qa: multifs already enabled as default

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agoMerge PR #42499 into master
Patrick Donnelly [Fri, 30 Jul 2021 21:02:33 +0000 (14:02 -0700)]
Merge PR #42499 into master

* refs/pull/42499/head:
client:make sure only to update dir dist from auth mds

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agoMerge PR #42201 into master
Patrick Donnelly [Fri, 30 Jul 2021 21:00:19 +0000 (14:00 -0700)]
Merge PR #42201 into master

* refs/pull/42201/head:
qa: fold frag confs into conf/mds.yaml

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Xiubo Li <xiubli@redhat.com>
3 years agoMerge pull request #42133 from sseshasa/wip-persist-osd-iops-cap-mclock
Neha Ojha [Fri, 30 Jul 2021 20:14:03 +0000 (13:14 -0700)]
Merge pull request #42133 from sseshasa/wip-persist-osd-iops-cap-mclock

osd: Add mechanism to avoid running OSD bench on every OSD init when mclock_scheduler is enabled

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #42550 from dang/wip-dang-zipper-writer
Daniel Gryniewicz [Fri, 30 Jul 2021 19:12:21 +0000 (15:12 -0400)]
Merge pull request #42550 from dang/wip-dang-zipper-writer

Zipper Writer API
Reviewed-by: cbodley@redhat.com
3 years agoMerge pull request #31454 from soumyakoduri/dbstore
Daniel Gryniewicz [Fri, 30 Jul 2021 18:00:30 +0000 (14:00 -0400)]
Merge pull request #31454 from soumyakoduri/dbstore

rgw/Zipper: DB Backend store

Reviewed-by: dang@redhat.com
Reviewed-by: amaredia@redhat.com
3 years agoRGW - Zipper - Proper Writer API 42550/head
Daniel Gryniewicz [Wed, 21 Jul 2021 14:56:59 +0000 (10:56 -0400)]
RGW - Zipper - Proper Writer API

With the implementation of DBStore, it was determined that the API used
for writing in Zipper was too tied to RADOS.  Implement a clean writing
API named Writer.

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
3 years agoMerge pull request #42266 from dang/wip-dang-zipper-raw_obj
Daniel Gryniewicz [Fri, 30 Jul 2021 14:06:56 +0000 (10:06 -0400)]
Merge pull request #42266 from dang/wip-dang-zipper-raw_obj

Wip dang zipper raw obj

Reviewed-by: Soumya Koduri <skoduri@redhat.com>
3 years agoqa/standalone/misc: ver-health.sh: Increase wait_for_health_string() timeout 42133/head
Sridhar Seshasayee [Mon, 5 Jul 2021 06:20:04 +0000 (11:50 +0530)]
qa/standalone/misc: ver-health.sh: Increase wait_for_health_string() timeout

Modified test cases:

1. ver-health.sh:
  a. TEST_check_version_health_1():
    To avoid intermittent timeouts observed in wait_for_health_string(),
    increase the wait time to 20 secs.

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
3 years agoqa/standalone/scrub: Force a subset of scrub tests to use "wpq" scheduler
Sridhar Seshasayee [Mon, 21 Jun 2021 12:47:32 +0000 (18:17 +0530)]
qa/standalone/scrub: Force a subset of scrub tests to use "wpq" scheduler

The following tests in the test files mentioned below use the
"osd_scrub_sleep" option to introduce delays during scrubbing to help
determine scrubbing states, validate reservations during scrubbing etc..
This works when using the "wpq" scheduler.

But when the "mclock_scheduler" is enabled, the "osd_scrub_sleep" is
disabled and overridden to 0. This is done to delegate the scheduling of
the background scrubs to the "mclock_scheduler" based on the set QoS
parameters. Due to this, the checks to verify the scrub states,
reservations etc. fail since the window to check them is very short
due to scrubs completing very quickly. This affects a small subset of
scrub tests mentioned below,

1. osd-scrub-dump.sh -> TEST_recover_unexpected()
2. osd-scrub-repair.sh -> TEST_auto_repair_bluestore_tag()
3. osd-scrub-test.sh -> TEST_scrub_abort(), TEST_deep_scrub_abort()

Only for the above tests, until there's a reliable way to query scrub
states with "--osd-scrub-sleep" set to 0, the "osd_op_queue" config
option is set to "wpq".

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
3 years agoqa/standalone/erasure-code: Modify erasure-code tests for mclock scheduler
Sridhar Seshasayee [Thu, 17 Jun 2021 11:41:58 +0000 (17:11 +0530)]
qa/standalone/erasure-code: Modify erasure-code tests for mclock scheduler

Modified test cases:

1. test-erasure-eio.sh:
  a. Test_ec_backfill_unfound():
    - Set osd_mclock_profile to high_recovery_ops profile.
    - Increase the wait for backfill_unfound timeout to 240 secs.

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
3 years agoqa/standalone/osd-backfill: Modify backfill tests for mclock scheduler
Sridhar Seshasayee [Thu, 17 Jun 2021 12:19:29 +0000 (17:49 +0530)]
qa/standalone/osd-backfill: Modify backfill tests for mclock scheduler

Modified test cases:

1. osd-backfill-prio.sh:
  Set osd_op_queue = wpq for all tests since the mclock doesn't
  consider recovery priority as part of its scheduling algorithm.

2. osd-backfill-space.sh:
  Set osd_mclock_profile to high_recovery_ops and increase the wait
  for backfills timeout to 1200 secs for the following tests:
  - TEST_backfill_test_simple()
  - TEST_backfill_test_multi()
  - TEST_backfill_test_sametarget()
  - TEST_backfill_multi_partial()
  - TEST_ec_backfill_simple()
  - TEST_ec_backfill_multi()
  - SKIP_TEST_ec_backfill_multi_partial()
  - SKIP_TEST_ec_backfill_multi_partial()

3. osd-backfill-stats:
  - TEST_backfill_ec_down_all_out():
   Set osd_mclock_profile to high_recovery_ops and increase the wait
   for recovery timeout to 240 secs.

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
3 years agoqa/standalone/osd: Modify osd tests for mclock scheduler
Sridhar Seshasayee [Wed, 16 Jun 2021 11:26:54 +0000 (16:56 +0530)]
qa/standalone/osd: Modify osd tests for mclock scheduler

Modified test cases:
1. osd-recovery-prio.sh:
   Set osd_op_queue = wpq for all tests since mclock
   doesn't consider recovery priority as part of its
   scheduling algorithm.

2. osd-recovery-stats.sh:
   a. TEST_recovery_undersized():
     - Set osd_mclock_profile to high_recovery_ops profile.
     - Increase wait for recovery timeout to 300 secs.

3. osd-rep-recov-eio.sh:
   a. TEST_rep_backfill_unfound():
     - Set osd_mclock_profile to high_recovery_ops profile.
     - Increase wait for backfill_unfound to 360 secs.

4. repeer-on-acting-back.sh:
   a. TEST_repeer_on_down_act():
     - Set osd_mclock_profile to high_recovery_ops profile.
       (To improve the test duration)

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
3 years agoqa/standalone: Modify ceph-helpers.sh tests for mclock scheduler.
Sridhar Seshasayee [Mon, 14 Jun 2021 08:06:23 +0000 (13:36 +0530)]
qa/standalone: Modify ceph-helpers.sh tests for mclock scheduler.

List of changes:

1. Remove the enforcement to use osd_op_queue=wpq when an osd is brought
   up in the following functions:
   - run_osd()
   - run_osd_filestore() and
   - activate_osd()

2. New functions:
   - get_op_scheduler() - Get the current osd_op_queue for an osd.

3. Modified test cases:
   - test_run_osd() - Add check for osd_max_backfill count.
     The mclock scheduler overrides the count to 1000.

4. New test cases:
   - test_activate_osd_after_mark_down()
   - test_get_op_scheduler()

Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
3 years agoosd: Add a new config option to forcibly run OSD benchmark on init
Sridhar Seshasayee [Thu, 24 Jun 2021 13:15:33 +0000 (18:45 +0530)]
osd: Add a new config option to forcibly run OSD benchmark on init

The new config option "osd_mclock_force_run_benchmark_on_init" is
introduced to allow a user to force run the OSD benchmark test on every
OSD boot-up even if the historical data about the OSD's iops capacity is
available on the MON config store. The 'force_run_benchmark' flag is set
to the value indicated by the new config option.

By default this new config option is set to false.

The utility of this option is to help refresh the OSD iops capacity
when the underlying device's performance characteristics have changed
significantly. In such cases, the OSD can be restarted with this option
enabled temporarily. Once the new iops capacity is updated to the MON
store, this option can be removed from the OSD's start-up config.

Fixes: https://tracker.ceph.com/issues/51464
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
3 years agoosd: Add mechanism to avoid running OSD benchmark on every OSD boot-up
Sridhar Seshasayee [Thu, 24 Jun 2021 07:53:23 +0000 (13:23 +0530)]
osd: Add mechanism to avoid running OSD benchmark on every OSD boot-up

Use "mon_cmd_set_config()" to store the OSD's max iops capacity to
the MON store during the first bring-up. Don't run the OSD benchmark
test on subsequent boot-ups if a previously persisted iops capacity is
available on the MON store and is different from the default iops
capacity.

Add the 'force_run_benchmark' flag to force a run of the benchmark
in case the default iops capacity cannot be determined.

Fixes: https://tracker.ceph.com/issues/51464
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
3 years agocommon/config: Add methods to return the default value of a config option
Sridhar Seshasayee [Wed, 30 Jun 2021 09:22:50 +0000 (14:52 +0530)]
common/config: Add methods to return the default value of a config option

Add wrapper method "get_val_default()" to the ConfigProxy class that takes
the config option key to search. This method in-turn calls another method
with the same name added to md_config_t class that does the actual work of
searching for the config option. If the option is valid, _get_val_default()
is used to get the default value. Otherwise, the wrapper method returns
std::nullopt.

Fixes: https://tracker.ceph.com/issues/51464
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
3 years agoosd: Add method to store config option key/value on the MON store
Sridhar Seshasayee [Thu, 24 Jun 2021 07:44:28 +0000 (13:14 +0530)]
osd: Add method to store config option key/value on the MON store

Add method mon_cmd_set_config() to save config option key and
value to the MON store. The ConfigMonitor command, 'config set' is
used to achieve this.

A corresponding get method is unnecessary since any config option
found on the MON store is loaded during OSD boot-up and set using
the md_config_t::set_mon_vals() method. Therefore, the existing
versions of ConfigProxy::get_val() method are sufficient to get
the latest value for the config option.

Fixes: https://tracker.ceph.com/issues/51464
Signed-off-by: Sridhar Seshasayee <sseshasa@redhat.com>
3 years agoMerge pull request #42308 from jtlayton/wip-51644
Kefu Chai [Fri, 30 Jul 2021 11:03:19 +0000 (19:03 +0800)]
Merge pull request #42308 from jtlayton/wip-51644

osd: don't assert on zero-length OP_ZERO request

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
3 years agoMerge pull request #42523 from mgfritch/cephadm-fsid-validate
Kefu Chai [Fri, 30 Jul 2021 11:01:32 +0000 (19:01 +0800)]
Merge pull request #42523 from mgfritch/cephadm-fsid-validate

cephadm: validate `fsid` command arg

Reviewed-by: Sage Weil <sage@redhat.com>
Reviewed-by: Adam King <adking@redhat.com>
3 years agoMerge pull request #42528 from liewegas/fix-51816
Kefu Chai [Fri, 30 Jul 2021 11:00:30 +0000 (19:00 +0800)]
Merge pull request #42528 from liewegas/fix-51816

mon/LogMonitor: fix crash when cluster log file is not writeable

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #42538 from dsavineau/issue_51902
Kefu Chai [Fri, 30 Jul 2021 10:59:05 +0000 (18:59 +0800)]
Merge pull request #42538 from dsavineau/issue_51902

cephadm: don't use ctx.fsid for clean_cgroup

Reviewed-by: Adam King <adking@redhat.com>
3 years agoMerge pull request #42558 from tchaikov/wip-crimson-cleanup
Kefu Chai [Fri, 30 Jul 2021 08:49:02 +0000 (16:49 +0800)]
Merge pull request #42558 from tchaikov/wip-crimson-cleanup

crimson/os: cleanups for building with Clang

Reviewed-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os: do not capture unused variable 42558/head
Kefu Chai [Fri, 30 Jul 2021 06:57:47 +0000 (14:57 +0800)]
crimson/os: do not capture unused variable

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agocrimson/os: reference this explicitly
Kefu Chai [Fri, 30 Jul 2021 06:56:50 +0000 (14:56 +0800)]
crimson/os: reference this explicitly

to silence false alarm from Clang that `this` is not used.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agocrimson/os: do not capture labels
Kefu Chai [Fri, 30 Jul 2021 05:40:09 +0000 (13:40 +0800)]
crimson/os: do not capture labels

structured binding does not define variables, so we cannot capture them
without defining variables in capture list.

in this change, instead of using a map<> for defining labels, just
create labels on the fly.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agoMerge pull request #42556 from tchaikov/wip-fair-mutex
Kefu Chai [Fri, 30 Jul 2021 06:30:09 +0000 (14:30 +0800)]
Merge pull request #42556 from tchaikov/wip-fair-mutex

common: add ceph::fair_mutex

Reviewed-by: Xiubo Li <xiubli@redhat.com>
3 years agoMerge pull request #42539 from cyx1231st/wip-seastore-cache-metrics-2
Kefu Chai [Fri, 30 Jul 2021 05:22:13 +0000 (13:22 +0800)]
Merge pull request #42539 from cyx1231st/wip-seastore-cache-metrics-2

crimson/os/seastore/cache: refine metrics

Reviewed-by: Samuel Just <sjust@redhat.com>
3 years agocommon: add ceph::fair_mutex 42556/head
Kefu Chai [Fri, 30 Jul 2021 04:44:52 +0000 (12:44 +0800)]
common: add ceph::fair_mutex

a mutex which enqueues and wakes up the waiters in FIFO order, to
ensure the fairness of the mutex.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agocrimson/os/seastore: reassign extent_types_t values and remove extent_type_to_index() 42539/head
Yingxin Cheng [Thu, 29 Jul 2021 06:52:20 +0000 (14:52 +0800)]
crimson/os/seastore: reassign extent_types_t values and remove extent_type_to_index()

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os/seastore/cache: misc cleanup to metrics
Yingxin Cheng [Wed, 28 Jul 2021 01:36:20 +0000 (09:36 +0800)]
crimson/os/seastore/cache: misc cleanup to metrics

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os/seastore/cache: remove derived metrics
Yingxin Cheng [Tue, 27 Jul 2021 08:50:52 +0000 (16:50 +0800)]
crimson/os/seastore/cache: remove derived metrics

Only keep the basic metrics to minimize the total number of metrics.

Derived metrics can be numerous according to different needs and can be
confusing with labels.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os/seastore/cache: remove counter labels
Yingxin Cheng [Tue, 27 Jul 2021 08:45:03 +0000 (16:45 +0800)]
crimson/os/seastore/cache: remove counter labels

Do not label metrics by counter type which could be confusing.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os/seastore/cache: cleanup, replace unordered_map by array
Yingxin Cheng [Tue, 27 Jul 2021 08:36:44 +0000 (16:36 +0800)]
crimson/os/seastore/cache: cleanup, replace unordered_map by array

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agoMerge pull request #40965 from rokj/patch-3
Ilya Dryomov [Thu, 29 Jul 2021 21:54:44 +0000 (23:54 +0200)]
Merge pull request #40965 from rokj/patch-3

doc: mention copying keyrings and adjust node names in manual deployment example

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
3 years agorgw/dbstore: Fix library link issues 31454/head
Soumya Koduri [Thu, 29 Jul 2021 16:04:31 +0000 (21:34 +0530)]
rgw/dbstore: Fix library link issues

Now that rgw_common is no more linked with rgw_a library (commit#7b61667),
dbstore (rgw_sal_dbstore) should be linked directly to rgw_common.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
3 years agoMerge pull request #42432 from tchaikov/wip-mon-crush-cleanup
Kefu Chai [Thu, 29 Jul 2021 15:40:03 +0000 (23:40 +0800)]
Merge pull request #42432 from tchaikov/wip-mon-crush-cleanup

mon: let CrushWrapper::get_validated_type_id() return an optional<>

Reviewed-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
3 years agoMerge pull request #42524 from guits/cv_wait_destroy_tests
Dimitri Savineau [Thu, 29 Jul 2021 13:42:15 +0000 (09:42 -0400)]
Merge pull request #42524 from guits/cv_wait_destroy_tests

ceph-volume/tests: retry when destroying osd

3 years agoMerge pull request #42515 from rhcs-dashboard/decouple-unit-tests-from-build-dir
Ernesto Puerta [Thu, 29 Jul 2021 12:47:24 +0000 (14:47 +0200)]
Merge pull request #42515 from rhcs-dashboard/decouple-unit-tests-from-build-dir

mgr/dashboard: backend unit tests: decouple from build dir

Reviewed-by: Waad Alkhoury <walkhour@redhat.com>
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
3 years agoMerge pull request #42516 from tchaikov/wip-win32-snappy
Kefu Chai [Thu, 29 Jul 2021 09:15:16 +0000 (17:15 +0800)]
Merge pull request #42516 from tchaikov/wip-win32-snappy

win32_deps_build.sh: bump snappy version to 1.1.9

Reviewed-by: Nathan Cutler <ncutler@suse.com>
3 years agodoc: adding missing command. changed node naming. 40965/head
Rok Jaklič [Wed, 21 Apr 2021 14:35:07 +0000 (16:35 +0200)]
doc: adding missing command. changed node naming.

Signed-off-by: Rok Jaklič <rokj@rasca.net>
3 years agocrimson/os/seastore/cache: cleanup, rename to get_by_src()
Yingxin Cheng [Tue, 27 Jul 2021 08:10:51 +0000 (16:10 +0800)]
crimson/os/seastore/cache: cleanup, rename to get_by_src()

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os/seastore: measure cache hit ratio by src
Yingxin Cheng [Tue, 27 Jul 2021 08:04:28 +0000 (16:04 +0800)]
crimson/os/seastore: measure cache hit ratio by src

Remove excessive amount of cache hit/access metrics by extent type.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agocrimson/os/seastore: measure committed efforts by extent
Yingxin Cheng [Tue, 27 Jul 2021 07:39:05 +0000 (15:39 +0800)]
crimson/os/seastore: measure committed efforts by extent

In order to cross-check the writes at segment manager level, and
evaluate the write amplification from each sub-component.

Signed-off-by: Yingxin Cheng <yingxin.cheng@intel.com>
3 years agowin32_deps_build.sh: only clone the tip of required tag 42516/head
Kefu Chai [Wed, 28 Jul 2021 09:12:33 +0000 (17:12 +0800)]
win32_deps_build.sh: only clone the tip of required tag

no need to clone the whole repo, just clone the tip of the specified
tag. this saves the bandwidth, disk IO and precious time.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agowin32_deps_build.sh: bump snappy version to 1.1.9
Kefu Chai [Wed, 28 Jul 2021 09:01:06 +0000 (17:01 +0800)]
win32_deps_build.sh: bump snappy version to 1.1.9

in snappy, the commit of 26102a0c66175bc39edbf484c994a21902e986dc
fixes the SNAPPY_VERSION generation. and this commit was included by
v1.1.8 and v1.1.9.

also, in v1.1.9, a change was introduced, where the function signature
was changed, and more importantly, this change is not backward
compatible:

<   bool GetUncompressedLength(Source* source, uint32_t* result);
---
>   bool GetUncompressedLength(Source* source, uint32* result);

see also, https://tracker.ceph.com/issues/50934

so we check SNAPPY_VERSION to tell if we should use `uint32_t` or
`uint32`.

in this change, snappy version used to build win32 client is bumped
to the latest stable version, v1.1.9, to include the fix of
SNAPPY_VERSION. this paves the road to fix of https://tracker.ceph.com/issues/50934

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agocompression/snappy: use uint32_t to be compatible with 1.1.9
Nathan Cutler [Tue, 27 Jul 2021 13:27:58 +0000 (15:27 +0200)]
compression/snappy: use uint32_t to be compatible with 1.1.9

The snappy project made the following change in snappy.h between version 1.1.8
and 1.1.9:

<   bool GetUncompressedLength(Source* source, uint32_t* result);
---
>   bool GetUncompressedLength(Source* source, uint32* result);

This causes Ceph to FTBFS with snappy 1.1.9.

Thanks to Chris Denice for bringing this to our attention via Redmine.

Fixes: https://tracker.ceph.com/issues/50934
Signed-off-by: Nathan Cutler <ncutler@suse.com>
3 years agoMerge pull request #42442 from badone/wip-insights-reports-non-persistent-storage
Brad Hubbard [Wed, 28 Jul 2021 23:19:32 +0000 (09:19 +1000)]
Merge pull request #42442 from badone/wip-insights-reports-non-persistent-storage

Don't persist report data

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agocephadm: don't use ctx.fsid for clean_cgroup 42538/head
Dimitri Savineau [Wed, 28 Jul 2021 20:52:05 +0000 (16:52 -0400)]
cephadm: don't use ctx.fsid for clean_cgroup

The clean_cgroup method assumes that the ctx.fsid is set while this is
true for the bootstrap command, it isn't set for adopt or deploy commands
(and maybe others).

This ends up to the adopt command to fails:

Traceback (most recent call last):
  File "/sbin/cephadm", line 8301, in <module>
    main()
  File "/sbin/cephadm", line 8289, in main
    r = ctx.func(ctx)
  File "/sbin/cephadm", line 1764, in _default_image
    return func(ctx)
  File "/sbin/cephadm", line 5091, in command_adopt
    command_adopt_ceph(ctx, daemon_type, daemon_id, fsid)
  File "/sbin/cephadm", line 5299, in command_adopt_ceph
    osd_fsid=osd_fsid)
  File "/sbin/cephadm", line 2884, in deploy_daemon_units
    clean_cgroup(ctx, unit_name)
  File "/sbin/cephadm", line 2724, in clean_cgroup
    if not ctx.fsid:
  File "/sbin/cephadm", line 155, in __getattr__
    return super().__getattribute__(name)
AttributeError: 'CephadmContext' object has no attribute 'fsid'

Since we already have the fsid value in deploy_daemon_units (which calls
clean_cgroup) then we can pass the fsid value directly.

This fixes a regression introduced by 1fee255

Fixes: https://tracker.ceph.com/issues/51902
Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
3 years agoMerge pull request #42527 from ceph/ljflores-patch-3
Neha Ojha [Wed, 28 Jul 2021 20:00:32 +0000 (13:00 -0700)]
Merge pull request #42527 from ceph/ljflores-patch-3

doc/mgr/telemetry: fix formatting problem

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge PR #42349 into master
Patrick Donnelly [Wed, 28 Jul 2021 17:45:08 +0000 (10:45 -0700)]
Merge PR #42349 into master

* refs/pull/42349/head:
mon/MDSMonitor: propose if FSMap struct_v is too old
mon/MDSMonitor: give a proper error message if FSMap struct_v is too old
mds/FSMap: use DECODE_OLDEST to gate FSMap version
qa: add tests for fs dump of epoch and trimming
qa: add file system support for dumping epoch
mon/MDSMonitor: return mon_mds_force_trim_to even if equal to current epoch
mon: add debugging for trimming methods
mon: fix debug spacing
qa: add nofs upgrade suite

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Ramana Raja <rraja@redhat.com>
3 years agoMerge PR #42199 into master
Patrick Donnelly [Wed, 28 Jul 2021 17:36:35 +0000 (10:36 -0700)]
Merge PR #42199 into master

* refs/pull/42199/head:
mds: add debugging when rejecting mksnap with EPERM

Reviewed-by: Milind Changire <mchangir@redhat.com>
3 years agoMerge PR #41025 into master
Patrick Donnelly [Wed, 28 Jul 2021 17:34:12 +0000 (10:34 -0700)]
Merge PR #41025 into master

* refs/pull/41025/head:
qa: wait pgs to be clean before using the pools
qa: ignore PG_RECOVERY_FULL and PG_DEGRADED for mds-full
qa: wait more time since there have many more pgs than before
qa: do not multiple the full ratio twice
qa: do not raise for kclient for _fsync test
qa: use the pg autoscale mode to calcuate the pg_num
qa: set the object_size to 1M
qa: move the is_full() to parent class

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agoMerge PR #38388 into master
Patrick Donnelly [Wed, 28 Jul 2021 17:30:31 +0000 (10:30 -0700)]
Merge PR #38388 into master

* refs/pull/38388/head:
mds: check rejoin_ack_gather before enter rejoin_gather_finish

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: Sidharth Anupkrishnan <sanupkri@redhat.com>
3 years agoMerge pull request #42453 from sebastian-philipp/githubmap-rh
Kefu Chai [Wed, 28 Jul 2021 17:01:03 +0000 (01:01 +0800)]
Merge pull request #42453 from sebastian-philipp/githubmap-rh

.githubmap: Update Sebastian Wagner's mapping

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
Reviewed-by: David Galloway <dgallowa@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
3 years agoMerge pull request #42501 from ybwang0211/doc-cap
Kefu Chai [Wed, 28 Jul 2021 16:59:10 +0000 (00:59 +0800)]
Merge pull request #42501 from ybwang0211/doc-cap

doc/man: add missing right parenthesis in manpage.

Reviewed-by: Kefu Chai <kchai@redhat.com>
3 years agoMerge pull request #42495 from hjwsm1989/wip-51842
Kefu Chai [Wed, 28 Jul 2021 16:32:00 +0000 (00:32 +0800)]
Merge pull request #42495 from hjwsm1989/wip-51842

crush: cancel upmaps with up set size != pool size

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
3 years agoMerge pull request #42511 from adk3798/shutil-copy-exception
Kefu Chai [Wed, 28 Jul 2021 16:28:53 +0000 (00:28 +0800)]
Merge pull request #42511 from adk3798/shutil-copy-exception

cephadm: don't fail hard on SameFileError during shutil.copy

Reviewed-by: Michael Fritch <mfritch@suse.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
3 years agoMerge pull request #40337 from ideepika/wip-bugzilla-1857447
Kefu Chai [Wed, 28 Jul 2021 16:21:49 +0000 (00:21 +0800)]
Merge pull request #40337 from ideepika/wip-bugzilla-1857447

mon/PGMap: remove DIRTY field in `ceph df detail` when cache tiering  is not in use

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #42508 from cybozu/kv-rocksdbstore-enrich-debug-message
Kefu Chai [Wed, 28 Jul 2021 16:20:09 +0000 (00:20 +0800)]
Merge pull request #42508 from cybozu/kv-rocksdbstore-enrich-debug-message

kv/RocksDBStore: enrich debug message

Reviewed-by: Kefu Chai <kchai@redhat.com>
3 years agoMerge pull request #42500 from ybwang0211/doc-list-get-attr
Kefu Chai [Wed, 28 Jul 2021 16:19:51 +0000 (00:19 +0800)]
Merge pull request #42500 from ybwang0211/doc-list-get-attr

tools/rados: improve the usage message of {get,set}omapaheader

Reviewed-by: Kefu Chai <kchai@redhat.com>
3 years agoRGW - Zipper - MultipartUpload 42266/head
Daniel Gryniewicz [Tue, 6 Jul 2021 14:32:19 +0000 (10:32 -0400)]
RGW - Zipper - MultipartUpload

Create a MultipartUpload object in the Zipper API.

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
3 years agoRemove get_raw_obj() from Object
Daniel Gryniewicz [Mon, 14 Jun 2021 14:58:26 +0000 (10:58 -0400)]
Remove get_raw_obj() from Object

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
3 years agorgw - Configure ceph.conf for orphan-list
Daniel Gryniewicz [Mon, 12 Jul 2021 19:08:13 +0000 (15:08 -0400)]
rgw - Configure ceph.conf for orphan-list

Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
3 years agomon/LogMonitor: fix crash when cluster log file is not writeable 42528/head
Sage Weil [Wed, 28 Jul 2021 15:45:19 +0000 (11:45 -0400)]
mon/LogMonitor: fix crash when cluster log file is not writeable

If we are in this block, then p == channel_fds.end() and p->first is not
valid.

Also, no need to populate channel_fds with an fd of -1.

Fixes: https://tracker.ceph.com/issues/51816
Signed-off-by: Sage Weil <sage@newdream.net>
3 years agodoc/mgr/telemetry: fix formatting problem 42527/head
Laura Flores [Wed, 28 Jul 2021 15:11:17 +0000 (10:11 -0500)]
doc/mgr/telemetry: fix formatting problem

There was strange bolding and bullet point placement due to a missing new line in the perf description.

Signed-off-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #42502 from tchaikov/wip-bloomfilter-cleanups
Kefu Chai [Wed, 28 Jul 2021 14:56:52 +0000 (22:56 +0800)]
Merge pull request #42502 from tchaikov/wip-bloomfilter-cleanups

include/intarith, common/bloom_filter: add popcount() and cleanups

Reviewed-by: Sage Weil <sage@redhat.com>
3 years agoceph-volume/tests: retry when destroying osd 42524/head
Guillaume Abrioux [Wed, 28 Jul 2021 14:22:09 +0000 (16:22 +0200)]
ceph-volume/tests: retry when destroying osd

Sometimes, it can happen that the osds being destroyed in those tests
are not yet marked as 'down' for some reason. Let's add some retries on
those tasks to avoid CI failures.

Fixes: https://tracker.ceph.com/issues/51903
Signed-off-by: Guillaume Abrioux <gabrioux@redhat.com>
3 years agomon/MDSMonitor: propose if FSMap struct_v is too old 42349/head
Patrick Donnelly [Thu, 15 Jul 2021 01:02:20 +0000 (18:02 -0700)]
mon/MDSMonitor: propose if FSMap struct_v is too old

To flush older versions which may still be an empty MDSMap (for clusters
that have never used CephFS), we need to force a proposal so older
versions of the struct are trimmed.

This is the main fix of this branch. We removed code which processed old
encodings of the MDSMap in the mon store via 60bc524. That broke old
ceph clusters which never used CephFS (see cited ticket below).  This is
because the initial epoch is an empty MDSMap (back in Infernalis/Hammer)
that is never updated. So, the fix here is to just do proposals
periodically until all of the old structs are automatically trimmed by
the mons.

Fixes: 60bc524827bac072658203e56b1fa3dede9641c5
Fixes: https://tracker.ceph.com/issues/51673
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agomon/MDSMonitor: give a proper error message if FSMap struct_v is too old
Patrick Donnelly [Thu, 15 Jul 2021 01:00:24 +0000 (18:00 -0700)]
mon/MDSMonitor: give a proper error message if FSMap struct_v is too old

Fixes: https://tracker.ceph.com/issues/51673
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agomds/FSMap: use DECODE_OLDEST to gate FSMap version
Patrick Donnelly [Thu, 15 Jul 2021 00:55:40 +0000 (17:55 -0700)]
mds/FSMap: use DECODE_OLDEST to gate FSMap version

This throws a proper exception which can be handled.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agoqa: add tests for fs dump of epoch and trimming
Patrick Donnelly [Wed, 14 Jul 2021 21:00:09 +0000 (14:00 -0700)]
qa: add tests for fs dump of epoch and trimming

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agoqa: add file system support for dumping epoch
Patrick Donnelly [Wed, 14 Jul 2021 20:59:48 +0000 (13:59 -0700)]
qa: add file system support for dumping epoch

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agomon/MDSMonitor: return mon_mds_force_trim_to even if equal to current epoch
Patrick Donnelly [Wed, 14 Jul 2021 20:31:21 +0000 (13:31 -0700)]
mon/MDSMonitor: return mon_mds_force_trim_to even if equal to current epoch

The PaxosService code already excludes the value returned by
PaxosService::get_trim_to as the upper bound of the range of epochs to
trim. Without this fix, you need to set mon_mds_force_trim_to to one
greater than the epoch you want to trim _and_ force the current epoch to
be one greater than that; the net result being that you can only force
trimming up to 2 epochs behind the current epoch.

This change is helpful for resolving issue 51673, but not strictly
necessary.

Related-to: https://tracker.ceph.com/issues/51673
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agomon: add debugging for trimming methods
Patrick Donnelly [Wed, 14 Jul 2021 19:04:03 +0000 (12:04 -0700)]
mon: add debugging for trimming methods

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agomon: fix debug spacing
Patrick Donnelly [Wed, 14 Jul 2021 20:23:47 +0000 (13:23 -0700)]
mon: fix debug spacing

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agoqa: add nofs upgrade suite
Patrick Donnelly [Wed, 14 Jul 2021 16:16:26 +0000 (09:16 -0700)]
qa: add nofs upgrade suite

This adds an upgrade suite to ensure that a Ceph cluster without a
CephFS file system does not blow up on upgrade (in particular, that the
MDSMonitor does not trip). This was developed to potentially reproduce
tracker 51673 but the actual cause for that issue was an old encoding
for the MDSMap which was obsoleted in Pacific. You must create a cluster
older than the FSMap (~Hammer or Infernalis) to reproduce. In any case,
this upgrade suite may be useful in the future so let's keep it!

Related-to: https://tracker.ceph.com/issues/51673
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
3 years agocephadm: validate fsid during ceph-volume command 42523/head
Michael Fritch [Tue, 27 Jul 2021 21:56:25 +0000 (15:56 -0600)]
cephadm: validate fsid during ceph-volume command

Signed-off-by: Michael Fritch <mfritch@suse.com>
3 years agocephadm: validate fsid during shell command
Michael Fritch [Mon, 26 Jul 2021 22:58:54 +0000 (16:58 -0600)]
cephadm: validate fsid during shell command

Signed-off-by: Michael Fritch <mfritch@suse.com>
3 years agotest: add a test for zero-length OP_ZERO request 42308/head
Jeff Layton [Tue, 13 Jul 2021 15:50:48 +0000 (11:50 -0400)]
test: add a test for zero-length OP_ZERO request

This triggered an assertion before. Verify that it's a no-op now.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
3 years agomgr/dashboard: backend unit tests: decouple from build dir 42515/head
Alfonso Martínez [Wed, 28 Jul 2021 07:51:52 +0000 (09:51 +0200)]
mgr/dashboard: backend unit tests: decouple from build dir

After https://github.com/ceph/ceph/pull/42255 some unit tests got coupled
to the frontend folder of the build dir.
Backend unit tests do not need a build folder: they only test our business logic.

Signed-off-by: Alfonso Martínez <almartin@redhat.com>
3 years agoMerge pull request #42169 from Matan-B/lua-nats-example
Yuval Lifshitz [Wed, 28 Jul 2021 07:16:30 +0000 (10:16 +0300)]
Merge pull request #42169 from Matan-B/lua-nats-example

rgw: Add an example for lua scripting

3 years agoMerge pull request #42350 from TRYTOBE8TME/wip-rgw-notification
Yuval Lifshitz [Wed, 28 Jul 2021 07:13:10 +0000 (10:13 +0300)]
Merge pull request #42350 from TRYTOBE8TME/wip-rgw-notification

rgw/notifications: Change in multipart upload notification behavior

3 years agorgw/dbstore: Add DBStore base class def to namespace rgw::store
Soumya Koduri [Sun, 11 Jul 2021 13:53:32 +0000 (19:23 +0530)]
rgw/dbstore: Add DBStore base class def to namespace rgw::store

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
3 years agorgw/dbstore: Use dpp for logging
Soumya Koduri [Thu, 8 Jul 2021 10:10:34 +0000 (15:40 +0530)]
rgw/dbstore: Use dpp for logging

Aligning with other Ceph RGW modules, use dpp for logging.
A default dpp is defined for DBStore to be used for unit-tests.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
3 years agorgw/dbstore: Use CEPH RGW logging in ceph context
Soumya Koduri [Fri, 2 Jul 2021 19:06:16 +0000 (00:36 +0530)]
rgw/dbstore: Use CEPH RGW logging in ceph context

When running dbstore as RGW backend, use the logging mechanism
and config values provided by default by RGW.
For other tests, set logfile and loglevel to the input values provided.

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
3 years agorgw/dbstore: DB backend for RGW
Soumya Koduri [Tue, 29 Jun 2021 13:41:10 +0000 (19:11 +0530)]
rgw/dbstore: DB backend for RGW

As part of Zipper, adding support for DB backend (using SQLite) for Stackable RGW.

The base class methods implemented are generic which could be extended to any backend database, not just SQLite.

More details on design/implementation can be found at -
https://docs.google.com/document/d/1xCoHT5DCujqbe1pnEfYpSaSqiBcW8z87CgQCC5LivOo/edit#

Current status:

[Done]
- User related APIs
- Bucket APIs
- Testcases (using Gtest) to test the DBStore APIs

[Not handled in the first pass]
- Quota
- Usage Stats
- Swift Users
- Multiple Zones/Zonegroups

[WIP]
- Object APIs

Signed-off-by: Soumya Koduri <skoduri@redhat.com>
3 years agoqa: multifs already enabled as default 42513/head
Xiubo Li [Wed, 28 Jul 2021 01:44:07 +0000 (09:44 +0800)]
qa: multifs already enabled as default

Since pacific already mark multifs enabled as defaut.

Signed-off-by: Xiubo Li <xiubli@redhat.com>
3 years agocommon/bloom_filter: move bloom_filter::density() to .cc 42502/head
Kefu Chai [Tue, 27 Jul 2021 10:13:36 +0000 (18:13 +0800)]
common/bloom_filter: move bloom_filter::density() to .cc

for faster compilation, also, bloom_filter::density()
is not sitting in the critical paths, so no need to make it an
inline function.

Signed-off-by: Kefu Chai <kchai@redhat.com>
3 years agoMerge pull request #42389 from asannes/ingress-fix
Kefu Chai [Wed, 28 Jul 2021 04:48:04 +0000 (12:48 +0800)]
Merge pull request #42389 from asannes/ingress-fix

mgr/cephadm: ingress: fix typo in spec.virtual_interface_networks reference

Reviewed-by: Sage Weil <sage@redhat.com>
3 years agoMerge pull request #42510 from rzarzynski/wip-crimson-use-random-nonce
Kefu Chai [Wed, 28 Jul 2021 03:06:11 +0000 (11:06 +0800)]
Merge pull request #42510 from rzarzynski/wip-crimson-use-random-nonce

crimson/osd: fix misdirecting msgs when an OSD flips at Sepia.

Reviewed-by: Samuel Just <sjust@redhat.com>
Reviewed-by: Kefu Chai <kchai@redhat.com>
3 years agodoc/man: add missing right parenthesis in manpage. 42501/head
wangyingbin [Tue, 27 Jul 2021 07:25:34 +0000 (15:25 +0800)]
doc/man: add missing right parenthesis in manpage.

Signed-off-by: wangyingbin <ybwang0211@163.com>