Adam King [Tue, 22 Mar 2022 21:58:28 +0000 (17:58 -0400)]
Merge pull request #45333 from s0nea/config-fqdn
mgr/cephadm: try to get FQDN for configuration files
Reviewed-by: Adam King <adking@redhat.com> Reviewed-by: Michael Fritch <mfritch@suse.com> Reviewed-by: Patrick Seidensal <pseidensal@suse.com> Reviewed-by: Paul Cuzner <pcuzner@redhat.com> Reviewed-by: Volker Theile <vtheile@suse.com>
Teoman ONAY [Thu, 11 Nov 2021 15:05:49 +0000 (15:05 +0000)]
cephadm: remove containers pids-limit
The default pids-limit (docker 4096/podman 2048) prevent some
customization from working (http threads on RGW) or limits the number
of luns per iscsi target.
Fix a problem in store_test::BluestoreBrokenNoSharedBlobRepairTest where the check for active null-fm was wrong and so reporting bogus errors when null-fm was inactive
The check need to access dynamic value and not config setting (which can be overridden) Signed-off-by: Gabriel BenHanokh <gbenhano@redhat.com>
Feng Hualong [Wed, 16 Feb 2022 06:01:17 +0000 (14:01 +0800)]
common/compressor: fix the issue that cannot processed concurrently
Now, one session cannot support concurrent and it will lead to crash.
So there are mutil session using. At same time, it also can improve
the performance.
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.
Tatjana Dehler [Wed, 9 Mar 2022 15:10:49 +0000 (16:10 +0100)]
mgr/cephadm: unify way to get the host address
There are two different ways to get the host address. From the
inventory of the mgr object directly or via the `_inventory_get_addr`
method of `CephadmService`. Update the code in order to use the
`_inventory_get_addr` method only.
This change is a part of ongoing upgrade of Seastar which will
be completed in a follow-up PR, after merging another change
with the Seastar's upstream.
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.
During test LibRadosWatchNotify.Watch2Delete rados_watch_check can return error -102 if reconnect happened, in that case Broken pipe reconnect and -102 returned
Bug-Fix from PR-44370 force setting need_to_destage_allocation_file to True on device expansion without checking if we work in null-fm mode Signed-off-by: Gabriel Benhanokh <gbenhano@redhat.com>
The prototyped approach adds a copy of the shard name (which is
assured to be a small string) to rgw::sal::LCEntry. It's not
expected to be represented in underlying store types.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Matt Benjamin [Thu, 17 Feb 2022 15:55:14 +0000 (10:55 -0500)]
rgwlc: remove bucket_lc_prepare, add backoff
Remove now-unused RGWLC::bucket_lc_prepare. Wrap serializer calls
in RGWLC::process(int index...) with simple backoff, limited to 5
retries.
In RGWLC::process(int index...), also open-coded the behavior of
RGWLC::bucket_lc_prepare(...), as the lock sharing between these
methods is error prone. For now, that method exists, so that it can
be called from the single-bucket process.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Matt Benjamin [Mon, 14 Feb 2022 21:39:27 +0000 (16:39 -0500)]
rgwlc: remove explicit lc shard resets at start-of-run
This is an alternative solution to the (newly exposed) lifecycle
shard starvation problem reported by Jeegen Chen.
There was always an starvation condition implied by the
reset of lc shard head at the start of processing. The introduction
of "stale sessions" in parallel lifecycle changes made it more
visible, in particular when rgw_lc_debug_interval was set to a small
value and many buckets had lifecycle policy.
My hypothesis in this change is that lifecycle processing for each
lc shard should /always/ continue through the full set of eligible
buckets for the shard, regardless of how many processing cycles might
be required to do so. In general, restarting at the first eligible
bucket on each reschedule invites starvation when processing "gets
behind", so just avoid it.
Fixes: https://tracker.ceph.com/issues/49446 Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
(cherry picked from commit 6e2ae13adced6b3dbb2fe16b547a30e9d68dfa06)
rgwlc: add a wraparound to continued shard processing
If the full set of buckets for a given lc shard couldn't be
processed in the prior cycle, processing will start with a
non-empty marker. Note the initial marker position, then
when the end of shard is reached, allow processing to wrap
around to the logical beginning of the shard and proceeding
through the initial marker.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Please enter the commit message for your changes. Lines starting
(cherry picked from commit 0b8f683d3cf444cc68fd30c3f179b9aa0ea08e7c)
don't report clearing incorrectly
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
Matt Benjamin [Mon, 14 Feb 2022 23:26:22 +0000 (18:26 -0500)]
rgwlc: permit disabling of (default) auto-clearing of stale sessions
Provide an option to disable automatic clearing of stale sessions--
which, unless disabled, happens after 2 lifecycle scheduling cycles.
The default behavior is most likely not desired when a debugging or
testing lifecycle processing with rgw_lc_debug_interval is set, and
therefore re-entering a running session after 2 scheduling cycles is
fairly likely.
Signed-off-by: Matt Benjamin <mbenjamin@redhat.com>
The bucket chown command needs to touch every object, and if it fails
can take a long time to catch up. Allow it to accept the --marker
option so you can tell it where to pick up.
Fixes: https://tracker.ceph.com/issues/53614 Signed-off-by: Daniel Gryniewicz <dang@redhat.com>
Kefu Chai [Mon, 14 Mar 2022 15:35:13 +0000 (23:35 +0800)]
cls/fifo: use friend instead of member operators
to address following error when compiling with C++20 standard:
../src/rgw/cls_fifo_legacy.cc:2217:22: error: ISO C++20 considers use of overloaded operator '==' (with operand types 'rados::cls::fifo::journal_entry' and 'rados::cls::fifo::journal_entry') to be ambiguous despite there being a unique best viable function [-Werror,-Wambiguous-reversed-operator]
!(jiter->second == e)) {
~~~~~~~~~~~~~ ^ ~
../src/cls/fifo/cls_fifo_types.h:148:8: note: ambiguity is between a regular call to this operator and a call with the argument order reversed
bool operator ==(const journal_entry& e) {
^
Casey Bodley [Mon, 14 Feb 2022 22:56:33 +0000 (17:56 -0500)]
neorados: assoc_delete() uses allocator_traits
the std::allocator<T> member functions destroy() and deallocate() were
deprecated in c++17 and removed in c++20. call the static functions on
std::allocator_traits<T> instead
resolves the c++20 compilation error with clang13:
In file included from ceph/src/test/cls_fifo/bench_cls_fifo.cc:38:
ceph/src/neorados/cls/fifo.h:684:7: error: no member named 'destroy' in 'std::allocator<neorados::cls::fifo::detail::JournalProcessor<ceph::async::allocator_binder<boost::asio::executor_binder<(lambda at ceph/src/neorados/cls/fifo.h:1012:4), boost::asio::executor>, std::allocator<void>>>>'
a.destroy(t);
~ ^
ceph/src/neorados/cls/fifo.h:1728:11: note: in instantiation of function template specialization 'neorados::cls::fifo::FIFO::assoc_delete<ceph::async::allocator_binder<boost::asio::executor_binder<(lambda at ceph/src/neorados/cls/fifo.h:1012:4), boost::asio::executor>, std::allocator<void>>, neorados::cls::fifo::detail::JournalProcessor<ceph::async::allocator_binder<boost::asio::executor_binder<(lambda at ceph/src/neorados/cls/fifo.h:1012:4), boost::asio::executor>, std::allocator<void>>>>' requested here
FIFO::assoc_delete(h, this);
^
ceph/src/neorados/cls/fifo.h:1605:6: note: in instantiation of member function 'neorados::cls::fifo::detail::JournalProcessor<ceph::async::allocator_binder<boost::asio::executor_binder<(lambda at ceph/src/neorados/cls/fifo.h:1012:4), boost::asio::executor>, std::allocator<void>>>::handle' requested here
handle(errc::inconsistency);
^
ceph/src/neorados/cls/fifo.h:857:8: note: in instantiation of member function 'neorados::cls::fifo::detail::JournalProcessor<ceph::async::allocator_binder<boost::asio::executor_binder<(lambda at ceph/src/neorados/cls/fifo.h:1012:4), boost::asio::executor>, std::allocator<void>>>::process' requested here
p->process();
^
/usr/include/boost/asio/bind_executor.hpp:407:12: note: in instantiation of member function 'neorados::cls::fifo::FIFO::NewPartPreparer<ceph::async::allocator_binder<boost::asio::executor_binder<(lambda at ceph/src/neorados/cls/fifo.h:1012:4), boost::asio::executor>, std::allocator<void>>>::operator()' requested here
return this->target_(BOOST_ASIO_MOVE_CAST(Args)(args)...);
^
ceph/src/common/async/bind_allocator.h:179:12: note: in instantiation of function template specialization 'boost::asio::executor_binder<neorados::cls::fifo::FIFO::NewPartPreparer<ceph::async::allocator_binder<boost::asio::executor_binder<(lambda at ceph/src/neorados/cls/fifo.h:1012:4), boost::asio::executor>, std::allocator<void>>>, boost::asio::executor>::operator()<boost::system::error_code &, bool>' requested here
return this->target(std::forward<Args>(args)...);
^
ceph/src/neorados/cls/fifo.h:939:5: note: in instantiation of function template specialization 'neorados::cls::fifo::FIFO::_update_meta<ceph::async::allocator_binder<boost::asio::executor_binder<neorados::cls::fifo::FIFO::NewPartPreparer<ceph::async::allocator_binder<boost::asio::executor_binder<(lambda at ceph/src/neorados/cls/fifo.h:1012:4), boost::asio::executor>, std::allocator<void>>>, boost::asio::executor>, std::allocator<void>>>' requested here
_update_meta(fifo::update{}.journal_entries_add(jentries),
^
ceph/src/neorados/cls/fifo.h:1008:7: note: in instantiation of function template specialization 'neorados::cls::fifo::FIFO::_prepare_new_part<ceph::async::allocator_binder<boost::asio::executor_binder<(lambda at ceph/src/neorados/cls/fifo.h:1012:4), boost::asio::executor>, std::allocator<void>>>' requested here
_prepare_new_part(
^
ceph/src/neorados/cls/fifo.h:524:7: note: in instantiation of function template specialization 'neorados::cls::fifo::FIFO::_prepare_new_head<ceph::async::allocator_binder<boost::asio::executor_binder<neorados::cls::fifo::FIFO::Pusher<spawn::detail::coro_handler<boost::asio::executor_binder<void (*)(), boost::asio::executor>, void>>, boost::asio::executor>, std::allocator<void>>>' requested here
_prepare_new_head(std::move(p));
^
Casey Bodley [Fri, 11 Feb 2022 23:56:30 +0000 (18:56 -0500)]
xlist: use friend instead of member operators
resolves a c++20 compilation error with clang 13:
In file included from ceph/src/client/Client.cc:55:
In file included from ceph/src/messages/MClientCaps.h:19:
In file included from ceph/src/mds/mdstypes.h:22:
ceph/src/include/xlist.h:212:27: warning: ISO C++20 considers use of overloaded operator '!=' (with operand types 'xlist<Dentry *>::const_iterat
or' and 'xlist<Dentry *>::const_iterator') to be ambiguous despite there being a unique best viable function with non-reversed arguments [-Wambiguous-reversed
-operator]
for (const auto &item : list) {
^
ceph/src/client/Client.cc:3299:63: note: in instantiation of member function 'operator<<' requested here
ldout(cct, 20) << "link inode " << in << " parents now " << in->dentries << dendl;
^
ceph/src/include/xlist.h:202:10: note: candidate function with non-reversed arguments
bool operator!=(const_iterator& rhs) const {
^
ceph/src/include/xlist.h:199:10: note: ambiguous candidate function with reversed arguments
bool operator==(const_iterator& rhs) const {
^
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").
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.
Volker Theile [Wed, 16 Mar 2022 15:51:54 +0000 (16:51 +0100)]
mgr/dashboard: Language dropdown box is partly hidden on login page
When clicking on the language dropdown combobox on the login page, the menu is partly hidden because it is partly rendered out of the visible area. Additionally the scrollbars are displayed.