]> git.apps.os.sepia.ceph.com Git - ceph.git/log
ceph.git
4 years agoMerge pull request #42647 from cfsnyder/wip-49555-pacific
Yuri Weinstein [Thu, 5 Aug 2021 16:24:52 +0000 (09:24 -0700)]
Merge pull request #42647 from cfsnyder/wip-49555-pacific

pacific: rgw/notification: add exception handling for persistent notification thread

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42646 from cfsnyder/wip-50463-pacific
Yuri Weinstein [Thu, 5 Aug 2021 16:24:26 +0000 (09:24 -0700)]
Merge pull request #42646 from cfsnyder/wip-50463-pacific

pacific: rgw/multisite: return correct error code when op fails

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42645 from cfsnyder/wip-52051-pacific
Yuri Weinstein [Thu, 5 Aug 2021 16:24:03 +0000 (09:24 -0700)]
Merge pull request #42645 from cfsnyder/wip-52051-pacific

pacific: rgw: when deleted obj removed in versioned bucket, extra del-marker added

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42644 from cfsnyder/wip-51804-pacific
Yuri Weinstein [Thu, 5 Aug 2021 16:23:32 +0000 (09:23 -0700)]
Merge pull request #42644 from cfsnyder/wip-51804-pacific

pacific: rgw/http/notifications: support content type in HTTP POST messages

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42641 from cfsnyder/wip-50367-pacific
Yuri Weinstein [Thu, 5 Aug 2021 16:22:56 +0000 (09:22 -0700)]
Merge pull request #42641 from cfsnyder/wip-50367-pacific

pacific: rgw: during reshard lock contention, adjust logging

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42640 from cfsnyder/wip-51801-pacific
Yuri Weinstein [Thu, 5 Aug 2021 16:22:09 +0000 (09:22 -0700)]
Merge pull request #42640 from cfsnyder/wip-51801-pacific

pacific: rgw: radosgw-admin errors if marker not specified on data/mdlog trim

Reviewed-by: Adam Emerson <aemerson@redhat.com>
4 years agoMerge pull request #42639 from cfsnyder/wip-51781-pacific
Yuri Weinstein [Thu, 5 Aug 2021 16:20:49 +0000 (09:20 -0700)]
Merge pull request #42639 from cfsnyder/wip-51781-pacific

pacific: rgw : modfiy error XML for deleterole

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42656 from cfsnyder/wip-51785-pacific
Yuri Weinstein [Thu, 5 Aug 2021 16:19:08 +0000 (09:19 -0700)]
Merge pull request #42656 from cfsnyder/wip-51785-pacific

pacific: rgw multisite: metadata sync treats all errors as 'transient' for retry

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42655 from cfsnyder/wip-50803-pacific
Yuri Weinstein [Thu, 5 Aug 2021 16:18:38 +0000 (09:18 -0700)]
Merge pull request #42655 from cfsnyder/wip-50803-pacific

pacific: radosgw-admin: skip GC init on read-only admin ops

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42654 from cfsnyder/wip-50731-pacific
Yuri Weinstein [Thu, 5 Aug 2021 16:18:07 +0000 (09:18 -0700)]
Merge pull request #42654 from cfsnyder/wip-50731-pacific

pacific: rgw/rgw_file: Fix the return value of read() and readlink()

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42653 from cfsnyder/wip-50728-pacific
Yuri Weinstein [Thu, 5 Aug 2021 16:17:41 +0000 (09:17 -0700)]
Merge pull request #42653 from cfsnyder/wip-50728-pacific

pacific: rgw : add check empty for sync url

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42652 from cfsnyder/wip-50711-pacific
Yuri Weinstein [Thu, 5 Aug 2021 16:16:42 +0000 (09:16 -0700)]
Merge pull request #42652 from cfsnyder/wip-50711-pacific

pacific: rgw: fix for mfa resync crash when supplied with only one totp_pin.

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42651 from cfsnyder/wip-51771-pacific
Yuri Weinstein [Thu, 5 Aug 2021 16:13:19 +0000 (09:13 -0700)]
Merge pull request #42651 from cfsnyder/wip-51771-pacific

pacific: test/rgw: fix use of poll() with timers in unittest_rgw_dmclock_scheduler

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42650 from cfsnyder/wip-50642-pacific
Yuri Weinstein [Thu, 5 Aug 2021 16:12:42 +0000 (09:12 -0700)]
Merge pull request #42650 from cfsnyder/wip-50642-pacific

pacific: rgw/sts: read_obj_policy() consults iam_user_policies on ENOENT

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42648 from cfsnyder/wip-50094-pacific
Yuri Weinstein [Thu, 5 Aug 2021 16:12:15 +0000 (09:12 -0700)]
Merge pull request #42648 from cfsnyder/wip-50094-pacific

pacific: librgw/notifications: initialize kafka and amqp

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoqa/rgw: run multisite tests with metadata sync error injection 42656/head
Casey Bodley [Tue, 13 Jul 2021 18:14:21 +0000 (14:14 -0400)]
qa/rgw: run multisite tests with metadata sync error injection

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

4 years agorgw: limit concurrency of metadata sync
Casey Bodley [Tue, 13 Jul 2021 17:18:27 +0000 (13:18 -0400)]
rgw: limit concurrency of metadata sync

limit the number of concurrent RGWMetaSyncSingleEntryCRs that each mdlog
shard is allowed to spawn. use META_SYNC_SPAWN_WINDOW=20 to match data-
and bucket sync

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

4 years agorgw: metadata sync treats all errors as 'transient'
Casey Bodley [Tue, 13 Jul 2021 17:54:36 +0000 (13:54 -0400)]
rgw: metadata sync treats all errors as 'transient'

collect_children() had a special case for EAGAIN that it treated as
a 'transient' error, which set the can_adjust_marker = false to bail out
of RGWMetaSyncShardCR and retry from the previous marker

but the http client doesn't return EAGAIN - rgw_http_error_to_errno()
defaults to EIO - so this retry logic based on can_adjust_marker never
runs. on any other error, RGWMetaSyncSingleEntryCR would not call
marker_tracker->finish() to advance the sync status marker, and
RGWMetaSyncShardCR would continue on with full- or incremental sync
without ever attempting to retry the failed entries

a detailed comment in collect_children() describes a different strategy
for handling 'permanent' errors, but that was never fully elaborated.
i also don't think there's a reasonable way to differentiate between
transient and permanent errors, so this treats all errors as transient
to be retried

if an error really is permanent for a given metadata key, metadata sync
will get stuck there and require manual intervention

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

4 years agoradosgw-admin: skip GC init on read-only admin ops 42655/head
Mark Kogan [Mon, 26 Apr 2021 09:15:11 +0000 (12:15 +0300)]
radosgw-admin: skip GC init on read-only admin ops

Fixes: https://tracker.ceph.com/issues/50520
Signed-off-by: Mark Kogan <mkogan@redhat.com>
(cherry picked from commit 9ac1991fc798af7e0ba0fac18209b71b5ae3f02b)

Conflicts:
src/rgw/rgw_admin.cc
src/rgw/rgw_rados.h
src/rgw/rgw_sal.cc
src/rgw/rgw_sal.h

Cherry-pick notes:
- Conflicts due to move from of RGWStoreManager in rgw_sal_rados.h to StoreManager in rgw_sal.h

4 years agorgw/rgw_file: Fix the return value of read() and readlink() 42654/head
luo rixin [Tue, 29 Dec 2020 06:39:21 +0000 (14:39 +0800)]
rgw/rgw_file: Fix the return value of read() and readlink()

Fixes: https://tracker.ceph.com/issues/49189
Signed-off-by: Dai zhiwei <daizhiwei3@huawei.com>
Signed-off-by: luo rixin <luorixin@huawei.com>
(cherry picked from commit bfd83e8fa142873a0bdf09a4d1ad1b04127f5885)

4 years agorgw : add check empty for sync url 42653/head
cao.leilc [Fri, 2 Apr 2021 03:55:54 +0000 (11:55 +0800)]
rgw : add check empty for sync url

Fixes: https://tracker.ceph.com/issues/50103
Signed-off-by: caolei <halei15848934852@163.com>
(cherry picked from commit 3a4e0b79310b21eeee37043d5419887bb41c0cf6)

4 years agorgw: fix for mfa resync crash when supplied with only one totp_pin. 42652/head
Pritha Srivastava [Fri, 16 Apr 2021 08:28:27 +0000 (13:58 +0530)]
rgw: fix for mfa resync crash when supplied with only one totp_pin.

The fix returns an appropriate error message.

fixes: https://tracker.ceph.com/issues/50394

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
(cherry picked from commit 1b943419c45a9b17be71668bd023aeb814171b2c)

4 years agotest/rgw: use spawn library for test_rgw_dmclock_scheduler 42651/head
Casey Bodley [Tue, 20 Jul 2021 16:50:25 +0000 (12:50 -0400)]
test/rgw: use spawn library for test_rgw_dmclock_scheduler

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

4 years agotest/rgw: fix use of poll() with timers in unittest_rgw_dmclock_scheduler
Casey Bodley [Mon, 19 Jul 2021 22:07:47 +0000 (18:07 -0400)]
test/rgw: fix use of poll() with timers in unittest_rgw_dmclock_scheduler

the AsyncScheduler uses an asio timer to dispatch work to its executor
with an optional delay. when no delay is requested, it waits on the
timer with an expiration time in the past (crimson::dmclock::TimeZero)

tests are failing here because poll() is returning without executing the
handlers of those expired timers

asio implements these timers with timerfd and epoll. debugging with
strace, i see that these timers armed with timerfd_settime() are not
always immediately ready according to epoll_wait():

  eventfd2(0, EFD_CLOEXEC|EFD_NONBLOCK)   = 3
  epoll_create1(EPOLL_CLOEXEC)            = 4
  timerfd_create(CLOCK_MONOTONIC, TFD_CLOEXEC) = 5
  epoll_ctl(4, EPOLL_CTL_ADD, 3, {events=EPOLLIN|EPOLLERR|EPOLLET, data={u32=14164052, u64=14164052}}) = 0
  epoll_ctl(4, EPOLL_CTL_ADD, 5, {events=EPOLLIN|EPOLLERR, data={u32=14164064, u64=14164064}}) = 0
  timerfd_settime(5, TFD_TIMER_ABSTIME, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=1}}, {it_interval={tv_sec=0, tv_nsec=0}, it_value={tv_sec=0, tv_nsec=0}}) = 0
  epoll_wait(4, [{events=EPOLLIN, data={u32=14164052, u64=14164052}}], 128, 0) = 1
  epoll_wait(4, [], 128, 0)               = 0
  epoll_wait(4, [], 128, 0)               = 0
  epoll_wait(4, [], 128, 0)               = 0
  epoll_wait(4, [], 128, 0)               = 0
  epoll_wait(4, [{events=EPOLLIN, data={u32=14164064, u64=14164064}}], 128, 0) = 1

in this example, it took 6 calls to context.poll() before it was ready
to execute the timer's handler

to work around this, replace calls to context.poll() with calls to
context.run_for() with a very short duration

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

4 years agorgw: read_obj_policy() consults iam_user_policies on ENOENT 42650/head
Casey Bodley [Tue, 6 Apr 2021 19:35:54 +0000 (15:35 -0400)]
rgw: read_obj_policy() consults iam_user_policies on ENOENT

when the head object doesn't exist, read_obj_policy() has to decide
whether to return ENOENT or EACCES

when there's a bucket policy, we check whether it has s3ListBucket
permissions. when there's an assumed role, we also need to check
against the role's policies in s->iam_user_policies

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

4 years agolibrgw/notifications: initialize kafka and amqp 42648/head
Yuval Lifshitz [Fri, 12 Mar 2021 06:56:45 +0000 (08:56 +0200)]
librgw/notifications: initialize kafka and amqp

Fixes: https://tracker.ceph.com/issues/49738
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
(cherry picked from commit 178f6bdac97b57300bbe0956633cf686a7e3ccee)

4 years agorgw/notification: add exception handling for persistent notification thread 42647/head
Yuval Lifshitz [Wed, 17 Feb 2021 14:07:18 +0000 (16:07 +0200)]
rgw/notification: add exception handling for persistent notification thread

Fixes: https://tracker.ceph.com/issues/49322
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
(cherry picked from commit 915963ecb9effcb1f2d38f444c1bb9307f8ffbe1)

Conflicts:
src/rgw/rgw_notify.cc

4 years agorgw/multisite: return correct error code when op fails 42646/head
Yuval Lifshitz [Wed, 7 Apr 2021 09:49:50 +0000 (12:49 +0300)]
rgw/multisite: return correct error code when op fails

when trying to disable/enbale sync on non-master zone

Fixes: https://tracker.ceph.com/issues/50201
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
(cherry picked from commit 83e89dfa3358fe91597d6714483f96b21a234ae6)

4 years agorgw: when deleted obj removed in versioned bucket, extra del-marker added 42645/head
J. Eric Ivancich [Tue, 15 Jun 2021 19:20:33 +0000 (15:20 -0400)]
rgw: when deleted obj removed in versioned bucket, extra del-marker added

After initial checks are complete, this will read the OLH earlier than
previously to check the delete-marker flag and under the bug's
conditions will return -ENOENT rather than create a spurious delete
marker.

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

4 years agorgw/http/notifications: support content type in HTTP POST messages 42644/head
Yuval Lifshitz [Mon, 5 Jul 2021 19:13:58 +0000 (22:13 +0300)]
rgw/http/notifications: support content type in HTTP POST messages

Fixes: https://tracker.ceph.com/issues/51530
Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
(cherry picked from commit 6a1688b57d1e329cecd0c26c494cb08c9a4c3079)

4 years agoMerge pull request #42629 from rhcs-dashboard/wip-52049-pacific
Ernesto Puerta [Wed, 4 Aug 2021 14:52:49 +0000 (16:52 +0200)]
Merge pull request #42629 from rhcs-dashboard/wip-52049-pacific

pacific: mgr/dashboard: show perf. counters for rgw svc. on Cluster > Hosts

Reviewed-by: Aashish Sharma <aasharma@redhat.com>
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agoMerge pull request #42628 from rhcs-dashboard/wip-52048-pacific
Ernesto Puerta [Wed, 4 Aug 2021 14:49:17 +0000 (16:49 +0200)]
Merge pull request #42628 from rhcs-dashboard/wip-52048-pacific

pacific: mgr/dashboard: fix ssl cert validation for rgw service creation

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agorgw: during reshard lock contention, adjust logging 42641/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>
(cherry picked from commit 6d3dee37791ad427a3435c493a1d7874ba075674)

4 years agorgw: radosgw-admin errors if marker not specified on data/mdlog trim 42640/head
Adam C. Emerson [Fri, 16 Jul 2021 15:20:39 +0000 (11:20 -0400)]
rgw: radosgw-admin errors if marker not specified on data/mdlog trim

Check that a marker was specified and trim if we don't have one.

Also: In a world where we're parsing for generation, it doesn't really
make sense to have a 'no marker specified' as separate from a marker
that is just an empty string.

Also: Successful datalog trim returns zero, not
-ENODATA, and radosgw-admin should expect this.

Fixes: https://tracker.ceph.com/issues/51712
Signed-off-by: Adam C. Emerson <aemerson@redhat.com>
(cherry picked from commit 4cb6fcf7f4e9548a8a0dd017b49a6ea23bedffd6)

Conflicts:
src/rgw/rgw_admin.cc

Cherry-pick notes:
- static_cast for RadosStore not needed in Pacific

4 years agorgw : modfiy error XML for deleterole 42639/head
cao.leilc [Thu, 10 Jun 2021 02:34:54 +0000 (10:34 +0800)]
rgw : modfiy error XML for deleterole

Fixes: https://tracker.ceph.com/issues/51157
Signed-off-by: caolei <halei15848934852@163.com>
(cherry picked from commit c7ab6579c7655352d08a4c12fc3a6951217dbe6f)

4 years agomgr/dashboard: show perf. counters for rgw svc. on Cluster > Hosts 42629/head
Alfonso Martínez [Wed, 4 Aug 2021 09:11:50 +0000 (11:11 +0200)]
mgr/dashboard: show perf. counters for rgw svc. on Cluster > Hosts

- Use service_map_id to retrieve perf. counters for rgw services.
- Move logic from controller to CephService.

Fixes: https://tracker.ceph.com/issues/52022
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
(cherry picked from commit 69a87a1dea6fe148f2a81b1d7775f5ade9626c09)

4 years agomgr/dashboard: Cluster > Hosts > Performance Counters: do not show context bar.
Alfonso Martínez [Tue, 3 Aug 2021 13:20:54 +0000 (15:20 +0200)]
mgr/dashboard: Cluster > Hosts > Performance Counters: do not show context bar.

Do not show the context bar (Object Gateway selection).

Fixes: https://tracker.ceph.com/issues/52022
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
(cherry picked from commit 73acb9b60d23e79bdcdd03437b0a813487420e33)

4 years agomgr/dashboard: fix ssl cert validation for rgw service creation 42628/head
Avan Thakkar [Thu, 29 Jul 2021 22:53:43 +0000 (04:23 +0530)]
mgr/dashboard: fix ssl cert validation for rgw service creation

Fixes: https://tracker.ceph.com/issues/51965
Signed-off-by: Avan Thakkar <athakkar@redhat.com>
(cherry picked from commit 5f52c00e5291b53b4fe9ab7f9fae5d499017f91b)

4 years agoMerge pull request #42585 from rhcs-dashboard/wip-51994-pacific
Ernesto Puerta [Tue, 3 Aug 2021 15:35:17 +0000 (17:35 +0200)]
Merge pull request #42585 from rhcs-dashboard/wip-51994-pacific

pacific: mgr/dashboard: cephadm-e2e job script: improvements

Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
4 years agomgr/dashboard: cephadm-e2e script: improvements 42585/head
Alfonso Martínez [Tue, 27 Jul 2021 08:51:18 +0000 (10:51 +0200)]
mgr/dashboard: cephadm-e2e script: improvements

Improvements and some adaptations related to the jenkins job.

Fixes: https://tracker.ceph.com/issues/51612
Signed-off-by: Alfonso Martínez <almartin@redhat.com>
(cherry picked from commit 65b75000b7694cb3cbe617bbec28c513a2522be8)

4 years agoMerge pull request #42480 from smithfarm/wip-51836-pacific
Yuri Weinstein [Fri, 30 Jul 2021 16:03:21 +0000 (09:03 -0700)]
Merge pull request #42480 from smithfarm/wip-51836-pacific

pacific: rpm: drop use of $FIRST_ARG in ceph-immutable-object-cache

Reviewed-by: Kefu Chai <kchai@redhat.com>
Reviewed-by: Ilya Dryomov <idryomov@redhat.com>
4 years agoMerge pull request #42482 from MrFreezeex/wip-51840-pacific
Yuri Weinstein [Fri, 30 Jul 2021 14:50:14 +0000 (07:50 -0700)]
Merge pull request #42482 from MrFreezeex/wip-51840-pacific

pacific: osd: log snaptrim message to dout

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #42426 from ifed01/wip-ifed-compact-after-upgrade-pac
Yuri Weinstein [Wed, 28 Jul 2021 18:34:01 +0000 (11:34 -0700)]
Merge pull request #42426 from ifed01/wip-ifed-compact-after-upgrade-pac

pacific: os/bluestore: compact db after bulk omap naming upgrade.

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #42424 from ifed01/wip-ifed-bluefs-safer-flush-pac
Yuri Weinstein [Wed, 28 Jul 2021 18:27:03 +0000 (11:27 -0700)]
Merge pull request #42424 from ifed01/wip-ifed-bluefs-safer-flush-pac

pacific: os/bluestore: Remove possibility of replay log and file inconsistency

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #42477 from tchaikov/pacific-pr-40961
Yuri Weinstein [Wed, 28 Jul 2021 15:27:23 +0000 (08:27 -0700)]
Merge pull request #42477 from tchaikov/pacific-pr-40961

pacific: bind on loopback address if no other addresses are available

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #42472 from tchaikov/pacific-pr-42464
Yuri Weinstein [Wed, 28 Jul 2021 15:26:58 +0000 (08:26 -0700)]
Merge pull request #42472 from tchaikov/pacific-pr-42464

pacific: cmake, ceph.spec.in: build with header only fmt on RHEL

Reviewed-by: Josh Durgin <jdurgin@redhat.com>
4 years agoMerge pull request #42458 from vshankar/wip-51819
Yuri Weinstein [Wed, 28 Jul 2021 15:24:14 +0000 (08:24 -0700)]
Merge pull request #42458 from vshankar/wip-51819

pacific: cephfs-mirror: record directory path cancel in DirRegistry

Reviewed-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agoMerge pull request #42299 from callithea/wip-51374-pacific
Ernesto Puerta [Tue, 27 Jul 2021 17:22:24 +0000 (19:22 +0200)]
Merge pull request #42299 from callithea/wip-51374-pacific

pacific: monitoring: Clean up Grafana dashboards

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: p-se <NOT@FOUND>
4 years agoMerge pull request #42213 from rhcs-dashboard/wip-51542-pacific
Ernesto Puerta [Tue, 27 Jul 2021 17:21:17 +0000 (19:21 +0200)]
Merge pull request #42213 from rhcs-dashboard/wip-51542-pacific

pacific: radosgw: include realm_{id,name} in service map

Reviewed-by: Waad Alkhoury <walkhour@redhat.com>
Reviewed-by: Alfonso Martínez <almartin@redhat.com>
Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Ernesto Puerta <epuertat@redhat.com>
Reviewed-by: Sage Weil <sage@redhat.com>
4 years agoMerge pull request #42363 from k0ste/wip-51699-pacific
Yuri Weinstein [Tue, 27 Jul 2021 15:15:43 +0000 (08:15 -0700)]
Merge pull request #42363 from k0ste/wip-51699-pacific

pacific: rgw: allow to set ssl options and ciphers for beast frontend

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42490 from dsavineau/wip-51851-pacific
Guillaume Abrioux [Mon, 26 Jul 2021 20:03:34 +0000 (22:03 +0200)]
Merge pull request #42490 from dsavineau/wip-51851-pacific

pacific: ceph-volume/tests: update ansible environment variables in tox

4 years agoMerge pull request #42398 from satoru-takeuchi/wip-50900-pacific
Yuri Weinstein [Mon, 26 Jul 2021 19:17:08 +0000 (12:17 -0700)]
Merge pull request #42398 from satoru-takeuchi/wip-50900-pacific

pacific: osd/scrub: separate between PG state flags and internal scrubber operation

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #41783 from pponnuvel/wip-51140-pacific
Yuri Weinstein [Mon, 26 Jul 2021 19:15:09 +0000 (12:15 -0700)]
Merge pull request #41783 from pponnuvel/wip-51140-pacific

pacific: rgw: Improve error message on email id reuse

Reviewed-by: Daniel Gryniewicz <dang@redhat.com>
4 years agoceph-volume/tests: use ansible_facts 42490/head
Dimitri Savineau [Thu, 22 Jul 2021 13:58:03 +0000 (09:58 -0400)]
ceph-volume/tests: use ansible_facts

Since inject_facts_as_vars is set to false in the ansible.cfg file then we
have to update the references to use ansible_facts[<thing>] instead of
ansible_<thing>.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 842fc2b605a2321a031a240c4aa4348c1be24e14)

4 years agoceph-volume/tests: use pytest rerunfailures
Dimitri Savineau [Wed, 21 Jul 2021 21:07:24 +0000 (17:07 -0400)]
ceph-volume/tests: use pytest rerunfailures

We already install the dependency from ceph-ansible requirements.txt and to
avoid false positive (like after rebooting a node) we can retry failing test.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 95056a24e4fbc19307f5b32724bfdb459a42f7ab)

4 years agoceph-volume/tests: set ANSIBLE_CONFIG env var
Dimitri Savineau [Wed, 21 Jul 2021 20:54:57 +0000 (16:54 -0400)]
ceph-volume/tests: set ANSIBLE_CONFIG env var

Without loading the ansible.cfg file from ceph-ansible project, we don't
have the pipelining enabled which can result in significant performance
improvement.
This removes the ANSIBLE_ACTION_PLUGINS, ANSIBLE_RETRY_FILES_ENABLED and
ANSIBLE_SSH_RETRIES environment variables as it is already included in the
ansible.cfg file.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit b758fdd829e3b4d7b790e6d35a02c97f3962d13e)

4 years agoceph-volume/tests: update ansible ssh_args env var
Dimitri Savineau [Wed, 21 Jul 2021 20:44:57 +0000 (16:44 -0400)]
ceph-volume/tests: update ansible ssh_args env var

The ansible ssh_args parameter is usually defined in the ansible.cfg file.
Currently this variable is overrided in tox to manage the vagrant ssh file
but we lost all default values.

Signed-off-by: Dimitri Savineau <dsavinea@redhat.com>
(cherry picked from commit 0ad615bab555d9965aec36d025acb28708b07cf0)

4 years agoosd: log snaptrim message to dout 42482/head
Arthur Outhenin-Chalandre [Fri, 23 Jul 2021 07:27:00 +0000 (09:27 +0200)]
osd: log snaptrim message to dout

This log message is not an error and is done on every tick of the
snaptrim process. Replace the derr logging to dout(10) to not log it
by default.

Fixes: https://tracker.ceph.com/issues/51799
Signed-off-by: Arthur Outhenin-Chalandre <arthur.outhenin-chalandre@cern.ch>
(cherry picked from commit e2b2faef11c18df6c2f1f083d32d279e51b63e82)

4 years agorpm: drop use of $FIRST_ARG in ceph-immutable-object-cache 42480/head
Nathan Cutler [Thu, 22 Jul 2021 20:52:39 +0000 (22:52 +0200)]
rpm: drop use of $FIRST_ARG in ceph-immutable-object-cache

The use of $FIRST_ARG was probably required because the SUSE-specific
%service_* rpm macros were playing tricks on the shell positional parameters.
This is bad practice and error-prone, so let's assume that no macros should do
that anymore and hence it's safe to assume that positional parameters remain
unchanged after any rpm macro call.

Thanks to Franck Bui for providing the original patch
926433f5d45e557c42f050b43798ba29dc495e02 that this patch is modeled after.

NOTE: the use of FIRST_ARG had already been eliminated by
926433f5d45e557c42f050b43798ba29dc495e02 but was re-introduced later by
9466d7098573dafcfede5e9c852374fbbd99f9e7

Fixes: 9466d7098573dafcfede5e9c852374fbbd99f9e7
Fixes: https://tracker.ceph.com/issues/51797
Signed-off-by: Nathan Cutler <ncutler@suse.com>
(cherry picked from commit 1cb84a1160ed4108cae30100682b1e3ee7c7721d)

4 years agocommon/pick_address: define in_addr_t if it is not defined 42477/head
Kefu Chai [Sat, 1 May 2021 15:30:18 +0000 (23:30 +0800)]
common/pick_address: define in_addr_t if it is not defined

neither mingw not not have in_addr_t defined, see
https://docs.microsoft.com/en-us/windows/win32/api/winsock2/ns-winsock2-in_addr,
so define it if it is not defined.

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

Conflicts:
cmake/modules/CephChecks.cmake: trivial resolution

4 years agocommon/pick_addr: use grading machinery to refactor pick_address()
Kefu Chai [Thu, 22 Apr 2021 17:03:54 +0000 (01:03 +0800)]
common/pick_addr: use grading machinery to refactor pick_address()

as picking iface on the same NUMA node is not a hard requirement, the
grading machinery is a nice fit for this purpose.

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

4 years agocommon/pick_address: prefer non-loopback addresses
Kefu Chai [Wed, 21 Apr 2021 11:50:48 +0000 (19:50 +0800)]
common/pick_address: prefer non-loopback addresses

instead of filtering out loopback ifaces, check for loopback addresses,
and prefer non-loopback addresses over loopback addresses.

before this change, iface named "lo" is filtered out by default,
and "lo" is allowed if `ms_bind_exclude_lo_iface` is false.

after this change, iface with address out of 127/8 is prefered.
the iface marked down is not considered.

the option of "ms_bind_exclude_lo_iface" is removed. the tests are
updated accordingly.

Fixes: https://tracker.ceph.com/issues/50456
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit a9b9bcd53215a07608a28ac2c8e4a8c8b8e80e66)

Conflicts:
src/common/options/global.yaml.in: global.yaml.in was introduced
in master only, so, in this change src/common/options.cc is updated
instead.

4 years agocommon/pick_address: Allow binding on loopback iface
Kefu Chai [Fri, 26 Mar 2021 12:03:09 +0000 (20:03 +0800)]
common/pick_address: Allow binding on loopback iface

in 6147c0917157efd2d35610e759685656a4989abb, "lo" is also skipped when
daemon is trying to find an address to bind. but that change reverts the
fix of 201b59204374ebdab91bb554b986577a97b19c36, to address the problem.

an option named "ms_bind_exclude_lo_iface" is added, it defaults to
"true". but it can be changed to false to allow daemon to bind on "lo".

Fixes: https://tracker.ceph.com/issues/50012
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 7f01d36a2ca0576f1ff103ae3fa7c3662e93b722)

4 years agocommon/pick_address: document find_ip_in_subnet_list()
Kefu Chai [Fri, 26 Mar 2021 07:36:21 +0000 (15:36 +0800)]
common/pick_address: document find_ip_in_subnet_list()

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

4 years agocommon/pick_address: pass string by reference
Kefu Chai [Sat, 27 Mar 2021 02:03:02 +0000 (10:03 +0800)]
common/pick_address: pass string by reference

to silence warnings from clang-tidy.

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

4 years agocommon/pick_addr: refactor pick_address.cc and ipaddr.cc
Kefu Chai [Fri, 26 Mar 2021 10:23:35 +0000 (18:23 +0800)]
common/pick_addr: refactor pick_address.cc and ipaddr.cc

* do not replicate the same logic in IPv4 and IPv6 paths
* use helpers returning bool for filtering the candidate addresses
  for better readability

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

4 years agocommon/pick_address: use scope_guard for freeifaddrs()
Kefu Chai [Fri, 26 Mar 2021 10:34:32 +0000 (18:34 +0800)]
common/pick_address: use scope_guard for freeifaddrs()

for better readability

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

4 years agoceph.spec.in: build with header only fmt on RHEL 42472/head
Kefu Chai [Fri, 23 Jul 2021 10:02:36 +0000 (18:02 +0800)]
ceph.spec.in: build with header only fmt on RHEL

because fmt is packaged in EPEL, while librados is packaged
in RHEL, so we cannot have fmt as a runtime dependency of librados.
to address this issue, we should compile librados either with static library
or with header-only library of fmt. but because the fedora packaging
guideline does no encourage us to package static libraries, and it would
be complicated to package both static and dynamic library for fmt.

the simpler solution would be to compile Ceph with the header-only
version of fmt.

in this change, we compile ceph with the header-only version of fmt
on RHEL to address the runtime dependency issue.

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

Conflicts:
ceph.spec.in: trivial resolution

4 years agocmake: add an option "WITH_FMT_HEADER_ONLY"
Kefu Chai [Fri, 23 Jul 2021 09:52:12 +0000 (17:52 +0800)]
cmake: add an option "WITH_FMT_HEADER_ONLY"

in this change:

* an interface library named "fmt-header-only" is introduced. it brings
  the support to the header only fmt library.
* fmt::fmt is renamed to fmt
* an option named "WITH_FMT_HEADER_ONLY" is introduced
* fmt::fmt is an alias of "fmt-header-only" if "WITH_FMT_HEADER_ONLY"
  is "ON", and an alias of "fmt" otherwise.

because fmt is packaged in EPEL, while librados is packaged
in RHEL, so we cannot have fmt as a runtime dependency of librados.
to address this issue an option "WITH_FMT_HEADER_ONLY" is introduced, so
that we can enable it when building Ceph with the header version of fmt.
and the built packages won't have runtime dependency of fmt.

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

Conflicts:
src/CMakeLists.txt
src/common/CMakeLists.txt: trivial resolution

4 years agoosdc/Objecter: move LingerOp's ctor to .cc
Kefu Chai [Fri, 23 Jul 2021 16:09:58 +0000 (00:09 +0800)]
osdc/Objecter: move LingerOp's ctor to .cc

so the linkage of fmt::fmt does not spill out to other compilation
units.

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

4 years agoMerge pull request #42423 from ifed01/wip-ifed-fix-missing-shared-blob-pac
Yuri Weinstein [Fri, 23 Jul 2021 22:01:11 +0000 (15:01 -0700)]
Merge pull request #42423 from ifed01/wip-ifed-fix-missing-shared-blob-pac

pacific: os/bluestore: fix erroneous SharedBlob record removal during repair.

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #42344 from neha-ojha/wip-51663-pacific
Yuri Weinstein [Fri, 23 Jul 2021 21:59:31 +0000 (14:59 -0700)]
Merge pull request #42344 from neha-ojha/wip-51663-pacific

pacific: qa/*/test_envlibrados_for_rocksdb.sh: install libarchive-3.3.3

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #42238 from trociny/wip-51584-pacific
Yuri Weinstein [Fri, 23 Jul 2021 21:56:39 +0000 (14:56 -0700)]
Merge pull request #42238 from trociny/wip-51584-pacific

pacific: osd: move down peers out from peer_purged

Reviewed-by: xie xingguo <xie.xingguo@zte.com.cn>
Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #39902 from singuliere/wip-49377-pacific
Yuri Weinstein [Fri, 23 Jul 2021 21:54:13 +0000 (14:54 -0700)]
Merge pull request #39902 from singuliere/wip-49377-pacific

pacific: cmake: build static libs if they are internal ones

Reviewed-by: Kefu Chai <kchai@redhat.com>
4 years agoMerge pull request #42414 from votdev/wip-51731-pacific
Yuri Weinstein [Fri, 23 Jul 2021 18:31:31 +0000 (11:31 -0700)]
Merge pull request #42414 from votdev/wip-51731-pacific

pacific: mgr/dashboard: Add configurable MOTD or wall notification

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
4 years agoMerge pull request #42411 from tchaikov/pacific-pr-27465
Yuri Weinstein [Fri, 23 Jul 2021 18:30:50 +0000 (11:30 -0700)]
Merge pull request #42411 from tchaikov/pacific-pr-27465

pacific: ceph-monstore-tool: use a large enough paxos/{first,last}_committed

Reviewed-by: Neha Ojha <nojha@redhat.com>
4 years agoMerge pull request #42219 from ifed01/wip-ifed-migrate-pac
Yuri Weinstein [Fri, 23 Jul 2021 18:29:08 +0000 (11:29 -0700)]
Merge pull request #42219 from ifed01/wip-ifed-migrate-pac

pacific: ceph-volume: implement bluefs volume migration

Guillaume Abrioux <gabrioux@redhat.com>
Reviewed-by: Dimitri Savineau <dsavinea@redhat.com>
4 years agotest: add test for checking readd after remove for a directory path 42458/head
Venky Shankar [Thu, 15 Jul 2021 11:27:35 +0000 (07:27 -0400)]
test: add test for checking readd after remove for a directory path

Fixes: http://tracker.ceph.com/issues/51666
Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 19a45c8d54bd67727a4017720d22af4fa5d34c3f)

4 years agocephfs-mirror: record directory path cancel in DirRegistry
Venky Shankar [Wed, 14 Jul 2021 09:31:43 +0000 (05:31 -0400)]
cephfs-mirror: record directory path cancel in DirRegistry

When removing a directory path from mirroring, cephfs-mirror records
this state in a thread-local storage. The replayer thread backs-off
in midst of mirroring the directory snapshots for this directory path.
However, the state (canceled state) is never cleared causing the thread
to incorrectly assume that other directory paths (which are picked up
by this thread) need backing-off, hence, marking these directory paths
as failed (to synchronize snapshots).

Fix is to store this state in the directory specific store which is
allocated when a thread picks up a directory path for synchronization.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit 1a956be9baf0f21e64d81a684cd8f90cb6481f6a)

4 years agocephfs-mirror: complete context when a mirror instance is not failed or blocklisted
Venky Shankar [Thu, 15 Jul 2021 11:26:38 +0000 (07:26 -0400)]
cephfs-mirror: complete context when a mirror instance is not failed or blocklisted

Without this, the updater thread can start processing othere queued
contexts when a mirror instance is failed or blocklisted resulting
in unexpected behavior.

Signed-off-by: Venky Shankar <vshankar@redhat.com>
(cherry picked from commit c49024c90a1da7905c491897ea26e8bbc8942186)

4 years agorgw: set default ssl options for beast frontend 42363/head
Mykola Golub [Wed, 16 Jun 2021 15:41:44 +0000 (16:41 +0100)]
rgw: set default ssl options for beast frontend

to 'no_sslv2:no_sslv3:no_tlsv1:no_tlsv1_1'

Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit fb31c87c2d6c02563d2d2a1e63d5b62bea2c6f91)

4 years agoqa/standalone: fixing the timings when waiting for deep-scrub to start 42398/head
Ronen Friedman [Sun, 11 Jul 2021 07:43:03 +0000 (10:43 +0300)]
qa/standalone: fixing the timings when waiting for deep-scrub to start

initiate_and_fetch_state() initiates a scrub, then polls the published
PG state looking for 'scrubbing'. Calling flush_pg_stats() as part of
the polling process might cause the scrub and the following recovery to
be missed altogether.

Note: this polling mechanism is definitely not robust. Will be
redesigned in the future.

Fixes: https://tracker.ceph.com/issues/51581
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit ed45acee34435611f8dea7f77fde54a6586cf6d9)

4 years agotest: recovery_scrub: do not display 'repair' status on auto-repair deep-scrub
Ronen Friedman [Sat, 15 May 2021 19:14:38 +0000 (22:14 +0300)]
test: recovery_scrub: do not display 'repair' status on auto-repair deep-scrub

A new test: auto_repair_bluestore_tag.

Based on auto_repair_bluestore_basic. Sets auto-repair, starts a periodic
deep-scrub, then verifies that the PG state, while scrubbing, is 'scrubbing+deep'
and not 'scrubbing+deep+repair'.

Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
(cherry picked from commit d6eb3e3a3c29a02d6c7c088ef7c8c668a872d16e)

4 years agoosd/scrub: separate between PG state flags and internal scrubber operation
Ronen Friedman [Mon, 10 May 2021 13:15:16 +0000 (16:15 +0300)]
osd/scrub: separate between PG state flags and internal scrubber operation

Modify the scrubber to rely on internal flags for 'should we repair' and
'is this a deep scrub', instead of using PG_STATE_REPAIR & PG_STATE_DEEP_SCRUB.

This enables us to implement the 'fix-as-you-go deepscrub' functionality
of 'osd_scrub_auto_repair', without displaying REPAIR status to the user.

Fixes: https://tracker.ceph.com/issues/50446
Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
Co-Authored by: Neha Ojha <nojha@redhat.com>
(cherry picked from commit 80c756b00927a306249de2d5887c4f4f64e4c679)

4 years agoos/bluestore: compact db after bulk omap naming upgrade. 42426/head
Igor Fedotov [Wed, 7 Jul 2021 13:17:52 +0000 (16:17 +0300)]
os/bluestore: compact db after bulk omap naming upgrade.

Omap naming scheme upgrade introduced recently might perform bulk data
removal and hence leave DB in a "degraded" state. Let's compact it.

Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 0e5c140b79a0b1809a8044696dce1eb7a36b1d41)

4 years agoos/bluestore/bluefs: Add test that detects bluefs inconsistency 42424/head
Adam Kupczyk [Mon, 24 May 2021 12:27:05 +0000 (14:27 +0200)]
os/bluestore/bluefs: Add test that detects bluefs inconsistency

Add test that detects possible scenario that will cause BlueFS to have file
that contains data that has never been written. This is done by tricking
replay log to already accept file metadata (size, allocations), but actual data
stored in these allocations is not yet synced to disk.

Scenario:
1) write to file h1 on SLOW device
2) flush h1 (and trigger h1 mark to be added to bluefs replay log)
3) write to file h2
4) fsync h2 (forces replay log to be written)

The result is:
- bluefs log now has stable state of h1
- SLOW device is not yet flushed (no fdatasync())

Test detects this condition and fails.

Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
(cherry picked from commit c591a6e14e2c956d268adcaa9aa3e9c8a1fdea2a)

4 years agoos/bluestore/bluefs: Remove possibility of bluefs replay log containing files without...
Adam Kupczyk [Mon, 24 May 2021 12:49:51 +0000 (14:49 +0200)]
os/bluestore/bluefs: Remove possibility of bluefs replay log containing files without data

It had been possible to have a bluefs replay log to serialize file metadata (size, allocations),
but actual data stored in these allocations is not yet synced to disk.

This could happen if _flush_range(h1) allocated space for file h1 on device (like SLOW) that will not
be used when flushing future replay log. Such thing can happen when we have h2 that wrote to WAL and
out replay log is on DB. After fsync(h2) we write to replay log, wait for fdatasync on WAL and DB.
There is no waiting on SLOW, but h1 was dirty and has been serialized to replay log.

Solution is to delay notifying replay log that it has to include h1 after finishing fdatasync.

Fixes: https://tracker.ceph.com/issues/50965
Signed-off-by: Adam Kupczyk <akupczyk@redhat.com>
(cherry picked from commit 03ac53f7d4c83e56f664ad371ffe3bc2d40e1837)

4 years agoos/bluestore: fix erroneous SharedBlob record removal during repair. 42423/head
Igor Fedotov [Fri, 9 Jul 2021 18:13:48 +0000 (21:13 +0300)]
os/bluestore: fix erroneous SharedBlob record removal during repair.

Fixes: https://tracker.ceph.com/issues/51619
Signed-off-by: Igor Fedotov <ifedotov@suse.com>
(cherry picked from commit 7090930d4a2e6f2efdecaff23f9a2f795e7819fb)

4 years agomgr/dashboard: Add configurable MOTD or wall notification 42414/head
Volker Theile [Mon, 5 Jul 2021 09:49:33 +0000 (11:49 +0200)]
mgr/dashboard: Add configurable MOTD or wall notification

Fixes: https://tracker.ceph.com/issues/51408
Signed-off-by: Volker Theile <vtheile@suse.com>
(cherry picked from commit f7f163e75cf5fb6cd022a8d13c28f5b923e01aed)

4 years agotasks/ceph_manager: ignore EACCES when waiting for quorum 42411/head
Kefu Chai [Thu, 10 Jun 2021 12:19:09 +0000 (20:19 +0800)]
tasks/ceph_manager: ignore EACCES when waiting for quorum

mon_tick_interval is 5 seconds by default. monitors update their
rotating keys every mon_tick_interval. before monitors forms a
quorum, the auth requests from clients are put into the wait list.
these requests are re-enqueued once the monitors form a quorum. but
there is a small window of mon_tick_interval, before they are able
to serve the auth requests even after their claim to be able to
server requests. if these re-enqueued requests happen to be served
in this window, and if authx is enabled, they will be greeted with
errors like

handle_auth_bad_method server allowed_methods [2] but i only support [2]

in the case of ceph cli, the error would look like:

[errno 13] RADOS permission denied (error connecting to the cluster)

so, to address this issue, the EACCES error is ignored when waiting
for a quorum.

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

4 years agotasks/ceph_manager: use safe_while() to refactor the wait for quorum
Kefu Chai [Thu, 10 Jun 2021 12:10:06 +0000 (20:10 +0800)]
tasks/ceph_manager: use safe_while() to refactor the wait for quorum

for better readability

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

4 years agoceph-monstore-tool: use a large enough paxos/{first,last}_committed
Kefu Chai [Tue, 9 Apr 2019 14:07:02 +0000 (22:07 +0800)]
ceph-monstore-tool: use a large enough paxos/{first,last}_committed

so the rebuild paxos transaction won't be overwritten by the ones
created before recovery completes.

when the quorum is recovering, the leader will collect the paxos
transactions from peons. if the quorum accept the proposal for setting
the fingerprint, the peon will update the monitor with the paxos
transaction with a newer "last_committed" than the one created using
update_paxos() in ceph_monstore_tool.cc. the latter "last_committed" is
always 0.

so, to avoid this extra paxos proposal obsoleting the "rebuilding" paxos
transaction, we use a large enough number for {first,last}_committed.

Fixes: http://tracker.ceph.com/issues/38219
Signed-off-by: Kefu Chai <kchai@redhat.com>
(cherry picked from commit 5475ef7843ab4021eddee60c2789b81d616383e9)

4 years agoMerge pull request #42297 from callithea/wip-51558-pacific
Ernesto Puerta [Mon, 19 Jul 2021 17:53:20 +0000 (19:53 +0200)]
Merge pull request #42297 from callithea/wip-51558-pacific

pacific: mgr/dashboard: fix Accept-Language header parsing

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Laura Paduano <lpaduano@suse.com>
Reviewed-by: huww98 <NOT@FOUND>
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
4 years agoMerge pull request #42346 from adamemerson/wip-51674-pacific
Yuri Weinstein [Mon, 19 Jul 2021 15:04:50 +0000 (08:04 -0700)]
Merge pull request #42346 from adamemerson/wip-51674-pacific

rgw: Backport of 51674 to Pacific

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42336 from adamemerson/wip-51661-pacific
Yuri Weinstein [Mon, 19 Jul 2021 15:04:34 +0000 (08:04 -0700)]
Merge pull request #42336 from adamemerson/wip-51661-pacific

pacific: rgw: Don't segfault on datalog trim

Reviewed-by: Casey Bodley <cbodley@redhat.com>
4 years agoMerge pull request #42166 from batrick/i51499
Yuri Weinstein [Mon, 19 Jul 2021 15:03:54 +0000 (08:03 -0700)]
Merge pull request #42166 from batrick/i51499

pacific: qa: test_ls_H_prints_human_readable_file_size failure

Reviewed-by: Jos Collin <jcollin@redhat.com>
4 years agoMerge pull request #42354 from rhcs-dashboard/wip-51685-pacific
Yuri Weinstein [Mon, 19 Jul 2021 15:02:13 +0000 (08:02 -0700)]
Merge pull request #42354 from rhcs-dashboard/wip-51685-pacific

pacific: mgr/dashboard: Fix test_error force maintenance dashboard check

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
Reviewed-by: Aaryan Porwal <aaryanporwal2233@gmail.com>
4 years agopacific: qa: avoid sudo on tmpfile 42166/head
Patrick Donnelly [Mon, 12 Jul 2021 15:18:27 +0000 (08:18 -0700)]
pacific: qa: avoid sudo on tmpfile

This code does not exist in master. This is a continuation of the fix
for the backport. Resolves failures like [1].

[1] /ceph/teuthology-archive/yuriw-2021-07-08_23:33:26-fs-wip-yuri2-testing-2021-07-08-1142-pacific-distro-basic-smithi/6260232/teuthology.log

Fixes: https://tracker.ceph.com/issues/51704
Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
4 years agorgw: allow to set ssl options and ciphers for beast frontend
Mykola Golub [Thu, 27 May 2021 16:09:48 +0000 (17:09 +0100)]
rgw: allow to set ssl options and ciphers for beast frontend

Two new conf keys are added for "beast" framework:

- ssl_options: a colon separated list of ssl context options,
  documented in boost's ssl::context_base;

- ssl_ciphers: a colon separated list of ciphers, documented
  in openssl's ciphers(1) manual.

Example:

  rgw frontends = beast ...  ssl_options=default_workarounds:no_tlsv1:no_tlsv1_1 ssl_ciphers=HIGH:!aNULL:!MD5

Fixes: https://tracker.ceph.com/issues/50932
Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit 91abede6357d167063c63eade45421d2f17bb0e7)

4 years agoMerge pull request #42228 from cfsnyder/wip-51188-pacific
Yuri Weinstein [Thu, 15 Jul 2021 15:35:30 +0000 (08:35 -0700)]
Merge pull request #42228 from cfsnyder/wip-51188-pacific

pacific: mgr/telemetry: pass leaderboard flag even w/o ident

Reviewed-by: Neha Ojha <nojha@redhat.com>