]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
3 years agoMerge pull request #45456 from cfsnyder/wip-52991-octopus
Yuri Weinstein [Thu, 19 May 2022 15:12:38 +0000 (08:12 -0700)]
Merge pull request #45456 from cfsnyder/wip-52991-octopus

octopus: rgw: have "bucket check --fix" fix pool ids correctly

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #46328 from zdover23/wip-pr-46315-backport-to-octopus
zdover23 [Wed, 18 May 2022 23:22:46 +0000 (09:22 +1000)]
Merge pull request #46328 from zdover23/wip-pr-46315-backport-to-octopus

octopus: doc/start: s/3/three/ in intro.rst

Reviewed-by: Anthony D'Atri <anthony.datri@gmail.com>
3 years agodoc/start: s/3/three/ in intro.rst 46328/head
Zac Dover [Wed, 18 May 2022 10:36:53 +0000 (20:36 +1000)]
doc/start: s/3/three/ in intro.rst

I'm changing "3" to "three" for two reasons:

1. It's correct.
2. This allows me to test backports into Octopus, Pacific, and Quincy.
   I am particularly interested to see what happens when I attempt
   the backport into Octopus, because backports into Octopus have
   failed. This will provide me with another unit of data.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 28efcec2d65e85ff2fa54e62b5b134e63ace853b)

3 years agoMerge pull request #44668 from Vicente-Cheng/wip-53715-octopus
Yuri Weinstein [Mon, 16 May 2022 21:58:52 +0000 (14:58 -0700)]
Merge pull request #44668 from Vicente-Cheng/wip-53715-octopus

octopus: mds: skip directory size checks for reintegration

Reviewed-by: Ramana Raja <rraja@redhat.com>
3 years agoMerge pull request #45560 from idryomov/wip-readv-writev-overflow-octopus
Yuri Weinstein [Mon, 16 May 2022 17:16:26 +0000 (10:16 -0700)]
Merge pull request #45560 from idryomov/wip-readv-writev-overflow-octopus

octopus: librbd: readv/writev fix iovecs length computation overflow

Reviewed-by: Christopher Hoffman <choffman@redhat.com>
3 years agoMerge pull request #45554 from idryomov/wip-rbd-du-validate-octopus
Yuri Weinstein [Mon, 16 May 2022 17:15:33 +0000 (10:15 -0700)]
Merge pull request #45554 from idryomov/wip-rbd-du-validate-octopus

octopus: test/librbd: add test to verify diff_iterate size

Reviewed-by: Deepika Upadhyay <dupadhya@redhat.com>
3 years agoMerge pull request #45530 from idryomov/wip-fix-schedule-status-octopus
Yuri Weinstein [Mon, 16 May 2022 17:14:29 +0000 (10:14 -0700)]
Merge pull request #45530 from idryomov/wip-fix-schedule-status-octopus

octopus: mgr/rbd_support: cast pool_id from int to str when collecting LevelSpec

Reviewed-by: Sunny Kumar <sunkumar@redhat.com>
3 years agorgw: during "bucket check --fix" set index entry pool id correctly 45456/head
J. Eric Ivancich [Mon, 11 Oct 2021 20:17:46 +0000 (16:17 -0400)]
rgw: during "bucket check --fix" set index entry pool id correctly

The current code sets the pool id of bucket index entries to the
bucket index pool rather than the data pool. This fixes that.

Signed-off-by: J. Eric Ivancich <ivancich@redhat.com>
(cherry picked from commit 4c2ac79621c7d110d9b3664ef5ce2027d817560c)

Conflicts:
src/rgw/rgw_rados.cc

Cherry-pick notes:
- Conflict due to braces around if condition after change that weren't on Octopus
- Octopus using dout vs. ldpp_dout

3 years agoMerge pull request #45465 from cfsnyder/wip-53470-octopus
Yuri Weinstein [Fri, 13 May 2022 14:08:21 +0000 (07:08 -0700)]
Merge pull request #45465 from cfsnyder/wip-53470-octopus

octopus: common: avoid pthread_mutex_unlock twice

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #45570 from mgfritch/backport-45420-octopus
Yuri Weinstein [Thu, 12 May 2022 22:59:15 +0000 (15:59 -0700)]
Merge pull request #45570 from mgfritch/backport-45420-octopus

octopus: cephadm: infer the default container image during pull

Reviewed-by: Adam King adking@redhat.com
3 years agoMerge pull request #45437 from cfsnyder/wip-51782-octopus
Yuri Weinstein [Thu, 12 May 2022 22:57:34 +0000 (15:57 -0700)]
Merge pull request #45437 from cfsnyder/wip-51782-octopus

octopus: qa/rgw: add failing tempest test to blocklist

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45320 from ljflores/wip-52077-octopus
Yuri Weinstein [Thu, 12 May 2022 22:56:45 +0000 (15:56 -0700)]
Merge pull request #45320 from ljflores/wip-52077-octopus

octopus: test: fix wrong alarm (HitSetWrite)

Reviewed-by: Myoungwon Oh <omwmw@sk.com>
3 years agoMerge pull request #45238 from k0ste/wip-54450-octopus
Yuri Weinstein [Thu, 12 May 2022 22:55:44 +0000 (15:55 -0700)]
Merge pull request #45238 from k0ste/wip-54450-octopus

octopus: mgr/prometheus: Added `avail_raw` field for Pools DF Prometheus mgr module

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #45398 from kamoltat/wip-ksirivad-octopus-backport-45078
Yuri Weinstein [Wed, 11 May 2022 20:59:31 +0000 (13:59 -0700)]
Merge pull request #45398 from kamoltat/wip-ksirivad-octopus-backport-45078

octopus: mon/MonCommands.h: fix target_size_ratio range

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #45433 from cfsnyder/wip-51702-octopus
Yuri Weinstein [Wed, 11 May 2022 20:48:30 +0000 (13:48 -0700)]
Merge pull request #45433 from cfsnyder/wip-51702-octopus

octopus: rgw: fix md5 not match for RGWBulkUploadOp upload when enable rgw com…

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45587 from idryomov/wip-pool-reverse-lookup-osdmap-octopus
Yuri Weinstein [Wed, 11 May 2022 20:46:18 +0000 (13:46 -0700)]
Merge pull request #45587 from idryomov/wip-pool-reverse-lookup-osdmap-octopus

octopus: librados: check latest osdmap on ENOENT in pool_reverse_lookup()

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #45479 from cfsnyder/wip-53640-octopus
Yuri Weinstein [Wed, 11 May 2022 20:13:24 +0000 (13:13 -0700)]
Merge pull request #45479 from cfsnyder/wip-53640-octopus

octopus: rgw/amqp: add default case to silence compiler warning

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #44260 from sseshasa/wip-53550-octopus
Yuri Weinstein [Wed, 11 May 2022 20:12:06 +0000 (13:12 -0700)]
Merge pull request #44260 from sseshasa/wip-53550-octopus

octopus: osd/OSDMap: Add health warning if 'require-osd-release' != current release

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #46230 from ceph/octopus-gtest2
Yuri Weinstein [Wed, 11 May 2022 19:51:00 +0000 (12:51 -0700)]
Merge pull request #46230 from ceph/octopus-gtest2

octopus: Fixes for make check

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45177 from pponnuvel/wip-54377-octopus
Ilya Dryomov [Wed, 11 May 2022 17:54:57 +0000 (19:54 +0200)]
Merge pull request #45177 from pponnuvel/wip-54377-octopus

octopus: rbd-mirror: synchronize with in-flight stop in ImageReplayer::stop()

Reviewed-by: Ilya Dryomov <idryomov@gmail.com>
3 years agoinclude/denc: use pair<const K,V> in range-based for loop 46230/head
Kefu Chai [Mon, 21 Dec 2020 17:07:37 +0000 (01:07 +0800)]
include/denc: use pair<const K,V> in range-based for loop

map<K,V>::value_type is pair<const K, V>, so if we use range-based for
loop when iterating through a map, we should use pair<const K,V> instead
of pair<K,V>, the latter also compiles, but it might create a temporary
object of pair<K,V> from pair<const K,V>. GCC-11 complains at seeing
this:

../src/include/denc.h:1002:21: warning: loop variable ‘e’ of type ‘const T&’ {aka ‘const std::pair<OSDPerfMetricQuery, OSDPerfMetricReport>&’} binds to a tem\
porary constructed from type ‘const std::pair<const OSDPerfMetricQuery, OSDPerfMetricReport>’ [-Wrange-loop-constru
ct]
 1002 |       for (const T& e : s) {
      |                     ^

this change

* use the value_type of container in `maplike_details<Container>`,
  so we can avoid the overhead of creating temporay objects when
  encoding a map
* define denc_traits for std::pair<const A, B> as well, so the elements
  of a map can be encoded using denc facility

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit c828ce29400a1eea4b223229b36b3a092eda6139)

3 years agotest/test_rbd_replay: move operator<<(..rbd_loc& name) to rbd_replay
Kefu Chai [Fri, 8 Jan 2021 05:42:18 +0000 (13:42 +0800)]
test/test_rbd_replay: move operator<<(..rbd_loc& name) to rbd_replay

so gtest can print out rbd_loc when printing out diagnostic information
when test fails. after moving operator<<(ostream&, const rbd_loc&) to
the `rbd_replay` namespace, ADL is able to find it. for more details on
the lookup rules, see https://en.cppreference.com/w/cpp/language/adl

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit fe696638515dc7a51214930049ebd1a6f951047f)

3 years agocommon/ceph_time: Don't define public things in time_detail
Adam C. Emerson [Tue, 15 Sep 2020 17:58:30 +0000 (13:58 -0400)]
common/ceph_time: Don't define public things in time_detail

Defining things in a detail section and then using them outside turned
out to not be the best idea.

Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 01f706ca0ffd39680dbfacf348750c9c0f851578)

Conflicts:
src/rgw/rgw_sync_error_repo.h not present in octopus

3 years agocommon/ceph_time: add operator<< for signedspan
Kefu Chai [Thu, 7 Jan 2021 03:56:25 +0000 (11:56 +0800)]
common/ceph_time: add operator<< for signedspan

* templatize operator<<(ostream&, duration<>), so it works for more
  duration<> classes with minimal efforts -- we just need to explicitly
  instantiate these template operators
* explicitly instantiate operator<< for timespan, signedspan, seconds
  and milliseconds. they are most likely to be used in Ceph. we can add
  more of them when necessary.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit a64b96dba14df1e61ee6eb449535a6ff4a9d64b3)

3 years agocommon/ceph_time: move operator<<(ostream&, timespan&) into std namespace
Kefu Chai [Thu, 7 Jan 2021 07:17:45 +0000 (15:17 +0800)]
common/ceph_time: move operator<<(ostream&, timespan&) into std namespace

otherwise compiler is not able to find it as the "timespan" here is
actually a class defined in std namespace, even it has an alias defined
in ceph namespace like:

typedef std::chrono::duration<rep, std::nano> timespan;

but this does not make it a member of "ceph" namespace. for more details
on the lookup rules, see https://en.cppreference.com/w/cpp/language/adl

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 75aafcba888a5753d2a4a8378637b4bb9fad5dd0)

3 years agoMerge pull request #45287 from yaarith/wip-52327-octopus
Yuri Weinstein [Wed, 11 May 2022 16:16:31 +0000 (09:16 -0700)]
Merge pull request #45287 from yaarith/wip-52327-octopus

octopus: mgr/devicehealth: fix missing timezone from time delta calculation

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoMerge pull request #45324 from ljflores/wip-54468-octopus
Yuri Weinstein [Wed, 11 May 2022 16:15:48 +0000 (09:15 -0700)]
Merge pull request #45324 from ljflores/wip-54468-octopus

octopus: osd: require osd_pg_max_concurrent_snap_trims > 0

Reviewed-by: Neha Ojha <nojha@redhat.com>
Reviewed-by: Dan van der Ster <daniel.vanderster@cern.ch>
3 years agoMerge pull request #45593 from vumrao/wip-vumrao-55019
Yuri Weinstein [Wed, 11 May 2022 16:14:27 +0000 (09:14 -0700)]
Merge pull request #45593 from vumrao/wip-vumrao-55019

octopus: osd/PrimaryLogPG.cc: CEPH_OSD_OP_OMAPRMKEYRANGE should mark omap dirty

Reviewed-by: Neha Ojha <nojha@redhat.com>
3 years agoMerge pull request #45655 from ljflores/wip-55074-octopus
Yuri Weinstein [Wed, 11 May 2022 16:13:48 +0000 (09:13 -0700)]
Merge pull request #45655 from ljflores/wip-55074-octopus

octopus: osd/OSD: osd_fast_shutdown_notify_mon not quite right

Reviewed-by: Nitzan Mordechai <nmordech@redhat.com>
3 years agoMerge pull request #45772 from ljflores/wip-53606-octopus
Yuri Weinstein [Wed, 11 May 2022 16:12:47 +0000 (09:12 -0700)]
Merge pull request #45772 from ljflores/wip-53606-octopus

octopus: mgr/telemetry: fix waiting for mgr to warm up

Reviewed-by: Yaarit Hatuka <yaarithatuka@gmail.com>
3 years agoMerge pull request #45182 from ideepika/wip-54323-octopus
Yuri Weinstein [Wed, 11 May 2022 14:41:05 +0000 (07:41 -0700)]
Merge pull request #45182 from ideepika/wip-54323-octopus

octopus: tools/rbd: expand where option rbd_default_map_options can be set

Reviewed-by: Christopher Hoffman <choffman@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
3 years agoMerge pull request #45180 from ideepika/wip-54380-octopus
Yuri Weinstein [Wed, 11 May 2022 14:39:29 +0000 (07:39 -0700)]
Merge pull request #45180 from ideepika/wip-54380-octopus

octopus: common: replace BitVector::NoInitAllocator with wrapper struct

Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
3 years agoMerge pull request #45441 from cfsnyder/wip-52072-octopus
Yuri Weinstein [Wed, 11 May 2022 14:28:46 +0000 (07:28 -0700)]
Merge pull request #45441 from cfsnyder/wip-52072-octopus

octopus: rgw: add the condition of lock mode conversion to PutObjRentention

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agotest/rbd_mirror: grab timer lock before calling add_event_after() 45177/head
Ilya Dryomov [Wed, 13 Apr 2022 13:24:04 +0000 (15:24 +0200)]
test/rbd_mirror: grab timer lock before calling add_event_after()

add_event_after() expects an externally provided mutex to be held
for the call.  This was missed in commit 8965a0f2a6f7 ("rbd-mirror:
synchronize with in-flight stop in ImageReplayer::stop()").

Fixes: https://tracker.ceph.com/issues/55317
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 60e16106837e0d23366709f70f39c4f1ae7a2a45)

3 years agorbd-mirror: synchronize with in-flight stop in ImageReplayer::stop()
Ilya Dryomov [Sun, 20 Feb 2022 16:33:08 +0000 (17:33 +0100)]
rbd-mirror: synchronize with in-flight stop in ImageReplayer::stop()

Complete on_finish right away only if the replayer is stopped (meaning
that it is legible to be restarted immediately, possibly from on_finish
itself).  This is the behaviour pretty much anyone would assume and
also what ImageReplayer::restart() relies on.

Fixes: https://tracker.ceph.com/issues/54344
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 8965a0f2a6f7bdbe732be94b1ee269cab5be0a2a)

3 years agorbd-mirror: turn m_on_stop_finish into a list of Contexts
Ilya Dryomov [Sun, 20 Feb 2022 16:11:28 +0000 (17:11 +0100)]
rbd-mirror: turn m_on_stop_finish into a list of Contexts

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 4ad31cd0583ebb695a9d84a35b9fc20ad9ec8585)

3 years agorbd-mirror: manual stop should take precedence over regular stop
Ilya Dryomov [Sun, 20 Feb 2022 12:11:02 +0000 (13:11 +0100)]
rbd-mirror: manual stop should take precedence over regular stop

Somewhat similar to commit 0a3794e56256 ("rbd-mirror: make stop
properly cancel restart"), make it so that a) if a manual stop is
joined to regular stop, the stop becomes manual and b) if a regular
stop is joined to a manual stop, the stop stays manual.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit c5b5787349e91a0fd23cd6d5e73b2a383ddd8687)

3 years agorbd-mirror: straighten ImageReplayer::stop() a bit
Ilya Dryomov [Sat, 19 Feb 2022 15:43:04 +0000 (16:43 +0100)]
rbd-mirror: straighten ImageReplayer::stop() a bit

- don't default on_finish parameter
- m_restart_requested is set in ImageReplayer::restart() which is the
  only restart=true call site, so setting m_restart_requested here is
  redundant
- is_stopped_() can't be true in is_running_() branch
- on_finish->complete(0) in the end is unreachable

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 219c500977bbfbcfe4ccd24beb294edbe0562d35)

3 years agoMerge pull request #45458 from cfsnyder/wip-53037-octopus
Yuri Weinstein [Tue, 10 May 2022 23:25:02 +0000 (16:25 -0700)]
Merge pull request #45458 from cfsnyder/wip-53037-octopus

octopus: rgw: cls_bucket_list_unordered() might return one redundent entry every time is_truncated is true

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45481 from cfsnyder/wip-53653-octopus
Yuri Weinstein [Tue, 10 May 2022 23:24:33 +0000 (16:24 -0700)]
Merge pull request #45481 from cfsnyder/wip-53653-octopus

octopus: rgw: init bucket index only if putting bucket instance info succeeds

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45492 from cfsnyder/wip-54075-octopus
Yuri Weinstein [Tue, 10 May 2022 23:24:07 +0000 (16:24 -0700)]
Merge pull request #45492 from cfsnyder/wip-54075-octopus

octopus: rgw: bucket chown bad memory usage

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45496 from cfsnyder/wip-54085-octopus
Yuri Weinstein [Tue, 10 May 2022 23:23:41 +0000 (16:23 -0700)]
Merge pull request #45496 from cfsnyder/wip-54085-octopus

octopus: librgw: make rgw file handle versioned

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45503 from cfsnyder/wip-54149-octopus
Yuri Weinstein [Tue, 10 May 2022 23:23:13 +0000 (16:23 -0700)]
Merge pull request #45503 from cfsnyder/wip-54149-octopus

octopus: rgw: RGWPostObj::execute() may lost data.

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45902 from ivancich/wip-55045-octopus
Yuri Weinstein [Tue, 10 May 2022 23:22:38 +0000 (16:22 -0700)]
Merge pull request #45902 from ivancich/wip-55045-octopus

octopus: cls/rgw: rgw_dir_suggest_changes detects race with completion

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45449 from cfsnyder/wip-52349-octopus
Yuri Weinstein [Tue, 10 May 2022 23:22:08 +0000 (16:22 -0700)]
Merge pull request #45449 from cfsnyder/wip-52349-octopus

octopus: rgw: change order of xml elements in ListRoles response

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agogoogletest submodule: pick up change to silence error=maybe-uninitialized warning 46223/head
Kefu Chai [Wed, 6 Jan 2021 08:18:17 +0000 (16:18 +0800)]
googletest submodule: pick up change to silence error=maybe-uninitialized warning

to include the fix of https://github.com/google/googletest/pull/3024

otherwise GCC-11 fails to compile the tests with following warning:

In file included from ../src/googletest/googletest/src/gtest-all.cc:42:
../src/googletest/googletest/src/gtest-death-test.cc: In function ‘bool testing::internal::StackGrowsDown()’:
../src/googletest/googletest/src/gtest-death-test.cc:1301:24: error: ‘dummy’ may be used uninitialized [-Werror=maybe-uninitialized]
 1301 |   StackLowerThanAddress(&dummy, &result);
      |   ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~
../src/googletest/googletest/src/gtest-death-test.cc:1290:13: note: by argument 1 of type ‘const void*’ to ‘void testing::internal::StackLowerThanAddress(const void*, bool*)’ declared here
 1290 | static void StackLowerThanAddress(const void* ptr, bool* result) {
      |             ^~~~~~~~~~~~~~~~~~~~~
../src/googletest/googletest/src/gtest-death-test.cc:1299:7: note: ‘dummy’ declared here
 1299 |   int dummy;
      |       ^~~~~
cc1plus: all warnings being treated as errors

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit abbdf338d6725febd686ccdbe395b207283c04ab)

3 years agoMerge pull request #46219 from zdover23/wip-doc-45512-backport-to-octopus
zdover23 [Tue, 10 May 2022 17:06:30 +0000 (03:06 +1000)]
Merge pull request #46219 from zdover23/wip-doc-45512-backport-to-octopus

octopus: ceph/admin: s/master/main

Reviewed-by: Laura Flores <lflores@redhat.com>
3 years agoceph/admin: s/master/main 46219/head
Zac Dover [Thu, 17 Mar 2022 23:05:45 +0000 (09:05 +1000)]
ceph/admin: s/master/main

This PR changes the name "master" to "main" so
that builds (and, I assume, a great many other
things) will not fail.

Signed-off-by: Zac Dover <zac.dover@gmail.com>
(cherry picked from commit 6a1dd3a8a2f3dc9fe8615d402c9041273516ff89)

3 years agoMerge pull request #45446 from cfsnyder/wip-52114-octopus
Yuri Weinstein [Tue, 10 May 2022 14:40:47 +0000 (07:40 -0700)]
Merge pull request #45446 from cfsnyder/wip-52114-octopus

octopus: qa/rgw: update apache-maven mirror for rgw/hadoop-s3a

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45443 from cfsnyder/wip-52108-octopus
Yuri Weinstein [Tue, 10 May 2022 14:40:12 +0000 (07:40 -0700)]
Merge pull request #45443 from cfsnyder/wip-52108-octopus

octopus: radosgw-admin: 'sync status' is not behind if there are no mdlog entries

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45431 from cfsnyder/wip-51700-octopus
Yuri Weinstein [Tue, 10 May 2022 14:39:07 +0000 (07:39 -0700)]
Merge pull request #45431 from cfsnyder/wip-51700-octopus

octopus: rgw: url_decode before parsing copysource in copyobject

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45412 from cfsnyder/wip-54495-octopus
Yuri Weinstein [Tue, 10 May 2022 14:38:27 +0000 (07:38 -0700)]
Merge pull request #45412 from cfsnyder/wip-54495-octopus

octopus: rgw: fix segfault in UserAsyncRefreshHandler::init_fetch

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #46042 from cbodley/wip-55459
Yuri Weinstein [Tue, 10 May 2022 14:34:37 +0000 (07:34 -0700)]
Merge pull request #46042 from cbodley/wip-55459

octopus: rgw: RGWCoroutine::set_sleeping() checks for null stack

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45523 from cbodley/wip-54622
Yuri Weinstein [Tue, 10 May 2022 14:32:34 +0000 (07:32 -0700)]
Merge pull request #45523 from cbodley/wip-54622

octopus: rgw: parse tenant name out of rgwx-bucket-instance

Reviewed-by: Shilpa Jagannath <smanjara@redhat.com>
3 years agoMerge pull request #45488 from cfsnyder/wip-53867-octopus
Yuri Weinstein [Tue, 10 May 2022 14:24:42 +0000 (07:24 -0700)]
Merge pull request #45488 from cfsnyder/wip-53867-octopus

octopus: rgw: return OK on consecutive complete-multipart reqs

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45485 from cfsnyder/wip-53836-octopus
Yuri Weinstein [Tue, 10 May 2022 14:23:59 +0000 (07:23 -0700)]
Merge pull request #45485 from cfsnyder/wip-53836-octopus

octopus: rgw: document S3 bucket replication support

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45462 from cfsnyder/wip-53157-octopus
Yuri Weinstein [Tue, 10 May 2022 14:21:33 +0000 (07:21 -0700)]
Merge pull request #45462 from cfsnyder/wip-53157-octopus

octopus: rgw:When KMS encryption is used and the key does not exist, we should…

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45460 from cfsnyder/wip-53078-octopus
Yuri Weinstein [Tue, 10 May 2022 14:20:48 +0000 (07:20 -0700)]
Merge pull request #45460 from cfsnyder/wip-53078-octopus

octopus: src/rgw: Fix for malformed url

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45454 from cfsnyder/wip-52989-octopus
Yuri Weinstein [Tue, 10 May 2022 14:18:58 +0000 (07:18 -0700)]
Merge pull request #45454 from cfsnyder/wip-52989-octopus

octopus: rgw: document rgw_lc_debug_interval configuration option

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45452 from cfsnyder/wip-52957-octopus
Yuri Weinstein [Tue, 10 May 2022 14:18:13 +0000 (07:18 -0700)]
Merge pull request #45452 from cfsnyder/wip-52957-octopus

octopus: radosgw-admin: 'reshard list' doesn't log ENOENT errors

Reviewed-by: Casey Bodley <cbodley@redhat.com>
3 years agoMerge pull request #45283 from cbodley/wip-54482
Yuri Weinstein [Mon, 9 May 2022 21:55:40 +0000 (14:55 -0700)]
Merge pull request #45283 from cbodley/wip-54482

octopus: rgw: fix leak of RGWBucketList memory (octopus only)

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
3 years agoMerge pull request #45088 from dvanders/wip-52076-octopus
Yuri Weinstein [Mon, 9 May 2022 21:54:33 +0000 (14:54 -0700)]
Merge pull request #45088 from dvanders/wip-52076-octopus

octopus: rgw: resolve empty ordered bucket listing results w/ CLS filtering *and* bucket index list produces incorrect result when non-ascii entries

Reviewed-by: J. Eric Ivancich <ivancich@redhat.com>
3 years agoMerge pull request #45972 from ljflores/wip-55077-octopus
Laura Flores [Mon, 9 May 2022 18:39:37 +0000 (13:39 -0500)]
Merge pull request #45972 from ljflores/wip-55077-octopus

octopus: admin/doc-requirements: bump sphinx to 4.4.0

3 years agorgw: RGWCoroutine::set_sleeping() checks for null stack 46042/head
Or Friedmann [Tue, 19 Apr 2022 12:00:28 +0000 (12:00 +0000)]
rgw: RGWCoroutine::set_sleeping() checks for null stack

users of the RGWOmapAppend coroutine don't manage the lifetime of its
underlying coroutine stack, so end up making calls on RGWOmapAppend
after its stack goes away. this null check is a band-aid, and there are
still several other calls in RGWCoroutine that don't check for null
stack

Fixes: https://tracker.ceph.com/issues/49302
Signed-off-by: Or Friedmann <ofriedma@redhat.com>
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 3f0f831d66c7d43c9872f5de2aceb68aef4004d8)

3 years agodoc/conf.py: s/add_javascript/add_js_file/ 45972/head
Kefu Chai [Mon, 22 Jun 2020 01:34:53 +0000 (09:34 +0800)]
doc/conf.py: s/add_javascript/add_js_file/

to address following warning:

jenkins-build/build/workspace/ceph-pr-docs/doc/conf.py:102: RemovedInSphinx40Warning: The app.add_javascript() is deprecated. Please use app.add_js_file() instead.

Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 1704216628729666bc4e2127d613360bb0f7b33a)

3 years agomgr/cephadm: use block quote for "typical use"
Kefu Chai [Sun, 6 Mar 2022 07:28:16 +0000 (15:28 +0800)]
mgr/cephadm: use block quote for "typical use"

otherwise sphinx takes "Typical use" and the following line as a
field. see also

https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#field-lists

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 05798f0cae9afda598f5a154c62fdd24bab9ca30)

3 years agomgr/cephadm: improve the formatting of docstring
Kefu Chai [Sun, 6 Mar 2022 07:20:14 +0000 (15:20 +0800)]
mgr/cephadm: improve the formatting of docstring

add an empty line before a doctest block would help
sphinx to tell where the session starts.

see also https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#doctest-blocks

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 8685fffdf20eeb4e2068c421e351aa02c48ff860)

3 years agomgr/cephadm: document notes using "note::" directive
Kefu Chai [Sun, 6 Mar 2022 07:04:21 +0000 (15:04 +0800)]
mgr/cephadm: document notes using "note::" directive

so it can be rendered by sphinx in a better way.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit ba3ccee01b31ef9e39a5016a0ffda18628ec3bc2)

3 years agodoc/conf.py: silence warnings from breathe
Kefu Chai [Sun, 6 Mar 2022 06:27:50 +0000 (14:27 +0800)]
doc/conf.py: silence warnings from breathe

breathe calls doxygen for extracting/generating docs from code.
while doxygen complains at seeing undocumented fields/func. these
warnings could fail the sphinx-build command, if it takes warnings
as errors.

in this change, these warnings are silenced.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 8891d653198c30f9578499126e1ee9ee67eca04a)

3 years agomgr/cephadm: add empty line after param list in docstring
Kefu Chai [Sun, 6 Mar 2022 06:23:42 +0000 (14:23 +0800)]
mgr/cephadm: add empty line after param list in docstring

this helps to silence the warning from sphinx, like

src/pybind/mgr/orchestrator/_interface.py:docstring of orchestrator._interface.Orchestrator.remove_osds:9: WARNING: Field list ends without a blank line; unexpected unindent.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit d9b8e38e3dfe8e6eec6d56ee934c4632de46fc68)

 Conflicts:
src/pybind/mgr/orchestrator/_interface.py
- `:param zap:` did not exist in Octopus; removed
   this from the param list.

3 years agomgr/cephadm: set docstring for shim() methods
Kefu Chai [Sun, 6 Mar 2022 06:05:07 +0000 (14:05 +0800)]
mgr/cephadm: set docstring for shim() methods

this allows the "rpc"ized methods of OrchestratorClientMixin to
have the docstring defined by the original methods.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit d0db2ae4f946e1a985402640ef8f1733b40e91ef)

 Conflicts:
src/pybind/mgr/orchestrator/_interface.py
- Removed some typing imports that were not present
  in Octopus

3 years agorgw: return OK on consecutive complete-multipart reqs 45488/head
Mark Kogan [Mon, 5 Apr 2021 12:49:42 +0000 (15:49 +0300)]
rgw: return OK on consecutive complete-multipart reqs

Fixes: https://tracker.ceph.com/issues/50141
Signed-off-by: Mark Kogan <mkogan@redhat.com>
fixup! rgw: return OK on consecutive complete-multipart reqs

(cherry picked from commit 324c377849a5d246f689f6e7a2862f42f1504d2c)

Conflicts: src/rgw/rgw_op.h src/rgw/rgw_op.cc

Cherry-pick notes:
- Conflicts due in rgw_op.h due to execute method adjacent to change not having optional_yield arg
- Conflicts in rgw_op.cc due to lack of rgw::sal::Object encapsulation in Octopus

3 years agoadmin/doc-requirements: bump sphinx to 4.4.0
Kefu Chai [Sat, 5 Mar 2022 17:44:30 +0000 (01:44 +0800)]
admin/doc-requirements: bump sphinx to 4.4.0

bump sphinx to latest stable. to address following build failure

ERROR: sphinx-autodoc-typehints 1.17.0 has requirement Sphinx>=4, but you'll have sphinx 3.5.4 which is incompatible.
ERROR: sphinx-substitution-extensions 2022.2.16 has requirement sphinx>=4.0.0, but you'll have sphinx 3.5.4 which is incompatible.

also bump bump sphinx-rtd-theme, otherwise we'd have following
build failure:

ERROR: sphinx-rtd-theme 0.5.2 has requirement docutils<0.17, but you'll have docutils 0.17.1 which is incompatible.

Signed-off-by: Kefu Chai <tchaikov@gmail.com>
(cherry picked from commit 0a5fab53b3804be5ef1377a2f35006b8df857d39)

 Conflicts:
admin/doc-requirements.txt
- `sphinx_rtd_theme` was not present in Octopus

3 years agotest/cls/rgw: test dir_suggest after successful completion 45902/head
Casey Bodley [Thu, 10 Mar 2022 21:41:46 +0000 (16:41 -0500)]
test/cls/rgw: test dir_suggest after successful completion

Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit a350888bf9d812db36b3bdf6d1e4ee7469964fad)

3 years agocls/rgw: rgw_dir_suggest_changes detects race with completion
Casey Bodley [Thu, 10 Mar 2022 20:32:48 +0000 (15:32 -0500)]
cls/rgw: rgw_dir_suggest_changes detects race with completion

if bucket listing races with a pending index transaction, its suggested
removal may be mistakenly applied if that index transaction completes
before the osd receives this suggestion

in `rgw_dir_suggest_changes()`, the sole condition for applying a
suggested change is that the `cur_disk.pending_map` is empty. this is
true after rgw_bucket_complete_op()

on index completion, `rgw_bucket_dir_entry::index_ver` is updated to match
the new value of `rgw_bucket_dir_header::ver`. because most of `struct
rgw_bucket_dir_entry` makes the round trip through bucket listing ->
dir_suggest, we have access to the index_ver of the suggested entry. by
comparing this against the stored entry, we can ignore any suggestions
that were sent before the most recent completion

Fixes: https://tracker.ceph.com/issues/54528
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit aa381b6765b0fb316976c4af7a45f32a157a4f75)

3 years agomgr/telemetry: fix waiting for mgr to warm up 45772/head
Yaarit Hatuka [Tue, 9 Nov 2021 18:31:11 +0000 (18:31 +0000)]
mgr/telemetry: fix waiting for mgr to warm up

1. The implementation of config_notify() in telemetry module sets the
flag for event, which is supposed to wake up the 'serve' thread whenever
a config option is changed. The problem is that we call config_notify()
at the beginning of serve(), before we enter its 'run' loop. This call
sets the event which cancels the 10 seconds wait for the mgr to warm up.
To fix this, we extract the logic of updating the config options to a
separate function (config_update_module_option()), and call it on
__init__, instead of calling config_notify() in serve().

2. We should always wait for the mgr to warm up here (10 seconds). In
case of a sporadic event (e.g. a config option change via CLI) the event
will be set, and wait will return immediately. We enforce this wait by
using time.sleep(10) instead of event.wait(10).

Fixes: https://tracker.ceph.com/issues/53204
Signed-off-by: Yaarit Hatuka <yaarit@redhat.com>
(cherry picked from commit fa5cc0ca081ca3cce552e0cb21a1e17273cf3482)

 Conflicts:
src/pybind/mgr/telemetry/module.py

- Several options under __init__ not present in Octopus
- No type checking in Octopus

3 years agoosd/OSD: osd_fast_shutdown_notify_mon not quite right 45655/head
Nitzan Mordechai [Thu, 27 Jan 2022 13:13:28 +0000 (15:13 +0200)]
osd/OSD: osd_fast_shutdown_notify_mon not quite right

When osd_fast_shutdown and osd_fast_shutdown_notify_mon set as true, OSD marked as Down
it should be marked as Dead,

Fixed: https://tracker.ceph.com/issues/53327

Signed-off-by: Nitzan Mordechai <nmordech@redhat.com>
nd

nd

(cherry picked from commit 07302d5e41c49c885c9398c1c478638023e3f264)

 Conflicts:
src/mon/OSDMonitor.cc
- In Octopus, an arrow operator was used instead of
                  the dot operator for calling monitor clog info.

3 years agoosd: make osd_fast_shutdown_notify_mon option true by default
Satoru Takeuchi [Thu, 18 Nov 2021 20:48:18 +0000 (20:48 +0000)]
osd: make osd_fast_shutdown_notify_mon option true by default

osd_fast_shutdown_notify_mon option is false by default. So users suffer
from error log flood, slow ops, and the long I/O timeouts on voluntary OS
shutdown before they are aware of the existence of this option. Let's
make this option true by default.

Fixes: https://tracker.ceph.com/issues/53328
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
(cherry picked from commit 729a5b85a6586b47d16acbba2cf8e765e498cd65)

 Conflicts:
src/common/options/global.yaml.in
- global.yaml.in does not exist in Octopus; rather,
  these configs were handled in options.cc.

3 years agoMerge pull request #44960 from BenoitKnecht/wip-54233-octopus
Yuri Weinstein [Fri, 25 Mar 2022 15:08:40 +0000 (08:08 -0700)]
Merge pull request #44960 from BenoitKnecht/wip-54233-octopus

octopus: mon: Abort device health when device not found

Reviewed-by: Yaarit Hatuka <yaarit@redhat.com>
3 years agoMerge pull request #44546 from cfsnyder/wip-53719-octopus
Yuri Weinstein [Fri, 25 Mar 2022 15:08:03 +0000 (08:08 -0700)]
Merge pull request #44546 from cfsnyder/wip-53719-octopus

octopus: osd/OSDMapMapping: fix spurious threadpool timeout errors

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
3 years agoMerge pull request #43224 from kotreshhr/wip-52629-octopus
Yuri Weinstein [Fri, 25 Mar 2022 15:07:04 +0000 (08:07 -0700)]
Merge pull request #43224 from kotreshhr/wip-52629-octopus

octopus: mgr/volumes: Fix permission during subvol creation with mode

Reviewed-by: Venky Shankar vshankar@redhat.com
3 years agoMerge pull request #45613 from rhcs-dashboard/octopus-null-injection-fix
Ernesto Puerta [Thu, 24 Mar 2022 10:05:19 +0000 (11:05 +0100)]
Merge pull request #45613 from rhcs-dashboard/octopus-null-injection-fix

octopus: mgr/dashboard: fix "NullInjectorError: No provider for I18n

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
3 years agomgr/dashboard: fix "NullInjectorError: No provider for I18n 45613/head
Nizamudeen A [Thu, 24 Mar 2022 08:01:18 +0000 (13:31 +0530)]
mgr/dashboard: fix "NullInjectorError: No provider for I18n

Although I am not sure what's the root cause of this but this seems to
fix the test failure. I don't know if this is caused by the differnce in
angular versions between master and octopus but I still don't understand
why it didn't catch in the recent PR to this file (https://github.com/ceph/ceph/pull/44763)

Fixes: https://tracker.ceph.com/issues/55011
Signed-off-by: Nizamudeen A <nia@redhat.com>
3 years agoosd/PrimaryLogPG.cc: CEPH_OSD_OP_OMAPRMKEYRANGE should mark omap dirty 45593/head
Neha Ojha [Wed, 16 Mar 2022 18:37:19 +0000 (18:37 +0000)]
osd/PrimaryLogPG.cc: CEPH_OSD_OP_OMAPRMKEYRANGE should mark omap dirty

We should mark_omap_dirty() for all omap write ops, just like we did
in cb927925af1f3df4b9c31df85cf31f982aae1988.

Currently, for CEPH_OSD_OP_OMAPRMKEYRANGE ops, clean_omap gets set to true,
which results in incomplete recovery of objects and results in
inconsistent PGs after a scrub.

Fixes: https://tracker.ceph.com/issues/54592
Signed-off-by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit f7fd5895fd3d7d7c4691be91434868d90f7a4e0f)

3 years agolibrados: check latest osdmap on ENOENT in pool_reverse_lookup() 45587/head
Ilya Dryomov [Wed, 16 Mar 2022 19:05:56 +0000 (20:05 +0100)]
librados: check latest osdmap on ENOENT in pool_reverse_lookup()

Avoid spurious ENOENT errors from rados_pool_reverse_lookup() and
Rados::pool_reverse_lookup().

This makes lookup by id consistent with lookup by name: the latter
has been checking latest osdmap since commit 7e5669b11b14 ("rados: we
need to get the latest osdmap when pool does not exists").

Fixes: https://tracker.ceph.com/issues/54593
Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 1f837e233af32c8a66f88508cde534c361ecfcbc)

3 years agocephadm: infer the default container image during pull 45570/head
Michael Fritch [Wed, 16 Mar 2022 13:39:03 +0000 (07:39 -0600)]
cephadm: infer the default container image during pull

Fixes: https://tracker.ceph.com/issues/54588
Signed-off-by: Michael Fritch <mfritch@suse.com>
(cherry picked from commit 736af2b9c29e375a184b863220641b7d254e7d04)

3 years agolibrbd: readv/writev fix iovecs length computation overflow 45560/head
Jonas Pfefferle [Wed, 9 Mar 2022 13:26:42 +0000 (14:26 +0100)]
librbd: readv/writev fix iovecs length computation overflow

iovec have unsigned length (size_t) and before this patch the
total length was computed by adding iovec's length to a signed
length variable (ssize_t). While the code checked if the resulting
length was negative on overflow, the case where length is positive
after overflow was not checked. This patch fixes the overflow check
by changing length to unsigned size_t.

Additionally, this patch fixes the case where some iovecs have been
added to the bufferlist and the aio completion has been blocked, but
adding an additional iovec fails because of overflow. This leads to
the UserBufferDeleter trying to unblock the completion on destruction
of the bufferlist but asserting because the completion was never
armed. We avoid this by first computing the total length and checking
for overflows and iovcnt before adding them to the bufferlist.

Signed-off-by: Jonas Pfefferle <pepperjo@japf.ch>
(cherry picked from commit e50405ef857f487bc1c104bbf3e8859ea099a0c4)

Conflicts:
src/librbd/librbd.cc [ commit b12b8c447a41 ("librbd: switch
  to new api::Io dispatch helper methods") not in octopus ]

3 years agotest/librbd: add test to verify diff_iterate size 45554/head
Christopher Hoffman [Mon, 7 Mar 2022 18:35:56 +0000 (18:35 +0000)]
test/librbd: add test to verify diff_iterate size

Add test case to verify diff size values of image and multiple
snapshots.

Fixes: https://tracker.ceph.com/issues/54440
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
(cherry picked from commit d4e44df1be2bafa1c0ceabc73bb7243104fc7ad4)

3 years agoqa/workunits/rbd/cli_generic.sh: relax trash purge schedule status assert 45530/head
Ilya Dryomov [Sat, 19 Mar 2022 13:04:52 +0000 (14:04 +0100)]
qa/workunits/rbd/cli_generic.sh: relax trash purge schedule status assert

Commit 08df6e0fd006 ("qa/workunits/rbd: expand LevelSpec parsing
coverage") didn't account for images with a separate data pool.  This
was missed because of small-cache-pool.yaml breakage.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 90a90ad47dd3140c796ef4da7263c9633d34e841)

3 years agorbd: fix a typo in "rbd trash purge schedule ls" formatted output
Ilya Dryomov [Sat, 5 Mar 2022 08:59:36 +0000 (09:59 +0100)]
rbd: fix a typo in "rbd trash purge schedule ls" formatted output

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit beffb7f9c6a4a19b6c4cfb65d04386575af50961)

3 years agoqa/workunits/rbd: expand LevelSpec parsing coverage
Ilya Dryomov [Fri, 4 Mar 2022 13:52:43 +0000 (14:52 +0100)]
qa/workunits/rbd: expand LevelSpec parsing coverage

Invoke "rbd mirror snapshot schedule ls -R" and "rbd mirror snapshot
schedule status" commands on all levels, consistently.  In particular,
make sure that an image level schedule is listed for a recursive query
at the pool level both before and after the schedule kicks in:

  $ rbd create --size 1G --mirror-image-mode snapshot -p foo bar
  $ rbd mirror snapshot schedule add -p foo --image bar 1m
  $ rbd mirror snapshot schedule ls -p foo -R
  POOL  NAMESPACE  IMAGE  SCHEDULE
  foo              bar    every 1m
  <wait for schedule to become visible in status>
  $ rbd mirror snapshot schedule ls -p foo -R
  POOL  NAMESPACE  IMAGE  SCHEDULE
  foo              bar    every 1m

Also, make sure that pool and image level status queries work:

  $ rbd mirror snapshot schedule status -p foo
  SCHEDULE TIME        IMAGE
  2022-03-04 07:14:00  foo/bar
  $ rbd mirror snapshot schedule status -p foo --image bar
  SCHEDULE TIME        IMAGE
  2022-03-04 07:14:00  foo/bar

Both of these issues are fixed by the previous commit.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
(cherry picked from commit 08df6e0fd00689649b802e975df320efe3b07c83)

3 years agorgw: parse tenant name out of rgwx-bucket-instance 45523/head
Casey Bodley [Wed, 12 May 2021 18:13:13 +0000 (14:13 -0400)]
rgw: parse tenant name out of rgwx-bucket-instance

used by multisite bucket full sync to request the listing of a specific
bucket instance. if the bucket lives under a tenant, we need to get that
out of the rgwx-bucket-instance header, because the http request path
only names the bucket

Fixes: https://tracker.ceph.com/issues/50785
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit 291342425e4b49de9b6985c718f6cb9210f5554d)

3 years agorgw: RGWPostObj::execute() may lost data. 45503/head
Lei Zhang [Wed, 14 Jul 2021 09:30:48 +0000 (17:30 +0800)]
rgw: RGWPostObj::execute() may lost data.

Signed-off-by: Lei Zhang <1091517373@qq.com>
(cherry picked from commit f241a330dcb5968f9ec1de1a382572258cb6daac)

3 years agolibrgw: move RGWFileHandle::encode/decode to the private sector 45496/head
Xuehan Xu [Sun, 25 Apr 2021 07:24:08 +0000 (15:24 +0800)]
librgw: move RGWFileHandle::encode/decode to the private sector

To prevent RGWFileHandle::encode/decode methods to be invoked directly by
other modules

Signed-off-by: Xuehan Xu <xxhdx1985126@gmail.com>
(cherry picked from commit 068c5e7ff1286ac4d5624f6e6bd7dedc21b34095)

3 years agolibrgw: make rgw file handle versioned
Xuehan Xu [Sat, 2 Jan 2021 14:50:23 +0000 (22:50 +0800)]
librgw: make rgw file handle versioned

The reason that we need this is that there could be the following scenario:

1. rgw_setattr sets the file attr;
2. rgw_write writes some new data, and encodes its attr to store into rados;
3. before the actual persistence of the file's attr bl, rgw_lookup loads the file's
   previous attr and modifies the current file handle's metadata;
4. rgw_write's result persisted to rados;
5. rgw_setattr set the current file handle's metadata which is actually an old one to rados

In this case, the attr in rados would be out of date which means loss of data

Fixes: https://tracker.ceph.com/issues/50194
Signed-off-by: Xuehan Xu <xuxuehan@qianxin.com>
(cherry picked from commit 49a35d72e0982c03781d4845c800332bded1c658)

3 years agorgw: fix bad memory usage of bucket chown method 45492/head
Mohammad Fatemipour [Sun, 19 Dec 2021 18:33:55 +0000 (22:03 +0330)]
rgw: fix bad memory usage of bucket chown method

In RGWBucketCtl::chown we have one RGWObjectCtx for all objects of a bucket.
In RGWObjectCtx there is a cache mechanism (std::map) for states of objects that will grows
continuously. for buckets with millions of objects this mechanism leads to huge memory usage.

in chown process we really do not need this caching mechanism so we could create one RGWObjectCtx
for every 1000 objects to limit usage of memory.

Fixes: https://tracker.ceph.com/issues/53599
Signed-off-by: Mohammad Fatemipour <mohammad.fatemipour@sotoon.ir>
(cherry picked from commit cf2d83ef81458524715c23e802977dc0760c847f)

Conflicts:
src/rgw/rgw_bucket.cc

Cherry-pick notes:
- Conflicts due to Octopus implementation differences in RGWBucketCtl::chown

3 years agodoc: rgw: document S3 bucket replication support 45485/head
Matt Benjamin [Tue, 5 Jan 2021 20:30:23 +0000 (15:30 -0500)]
doc: rgw: document S3 bucket replication support

Support was added at Octopus.

Fixes: https://tracker.ceph.com/issues/48755
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit 774a247b2b854538b679490581e6950372142797)

3 years agorgw: init bucket index only if putting bucket instance info succeeds 45481/head
Huber-ming [Wed, 10 Nov 2021 12:37:44 +0000 (20:37 +0800)]
rgw: init bucket index only if putting bucket instance info succeeds

Signed-off-by: Huber-ming <zhangsm01@inspur.com>
(cherry picked from commit 6e97f2a32df80f00d44ed3daceac381c46c17026)

Conflicts:
src/rgw/rgw_reshard.cc

Cherry-pick notes:
- pub_bucket_instance_info and init_index don't take prefix provider arg on Octopus

3 years agorgw/amqp: add default case to silence compiler warning 45479/head
Casey Bodley [Wed, 15 Dec 2021 16:07:49 +0000 (11:07 -0500)]
rgw/amqp: add default case to silence compiler warning

Fixes: https://tracker.ceph.com/issues/53252
Signed-off-by: Casey Bodley <cbodley@redhat.com>
(cherry picked from commit a32ae4b61ac4af244533ce53388411ca50fc1148)

3 years agocommon: avoid pthread_mutex_unlock twice 45465/head
Dai Zhiwei [Mon, 18 Oct 2021 03:34:50 +0000 (11:34 +0800)]
common: avoid pthread_mutex_unlock twice

        modified:   src/common/cohort_lru.h

Signed-off-by: Dai Zhiwei <daizhiwei3@huawei.com>
(cherry picked from commit a5523129590c4ecf900161f89521b07b73aef615)