Soumya Koduri [Mon, 7 Oct 2024 11:24:02 +0000 (16:54 +0530)]
rgw/lc: Fix issues with non-current objects with instance empty
When the bucket versioning is enabled, old plain object entry is converted
to versioned by updating its instance as "null" in its raw head/old object.
However its instance remains empty in the bi list entry. Same is the case for
the entries created after versioning is suspended and re-enabled.
So to access such objects which are non-current, we need to set rgw_obj_key.instance as
1) "null" to read the actual raw obj and
2) empty while accessing/updating their bi entry.
Patrick Donnelly [Tue, 22 Oct 2024 00:57:15 +0000 (20:57 -0400)]
Merge PR #60174 into main
* refs/pull/60174/head:
common/Finisher: pass name as std::string_view to ctor
common/Finisher: add method get_thread_name()
mgr/ActivePyModule: build thread name with fmt
mgr/ActivePyModule: return std::string_view instead of std::string copy
common/Finisher: use fmt to build strings
common/Finisher: un-inline ctor and dtor
common/Finisher: add `const` to several fields
common/Finisher: merge duplicate field initializers
common/Finisher: call notify_one() instead of notify_all()
common/Finisher: wake up after pushing to the queue
common/Finisher: do not wake up the thread if already running
common/Finisher: call logger without holding the lock
common/Finisher: use `std::lock_guard` instead of `std::unique_lock`
common/Finisher: merge all queue() container methods into one template
Patrick Donnelly [Tue, 22 Oct 2024 00:56:01 +0000 (20:56 -0400)]
Merge PR #60214 into main
* refs/pull/60214/head:
mds/MDCache: use `auto`
mds/CDir: use the erase() return value
mds/MDCache: remove unnecessary empty() check
mds/MDCache: use the erase() return value
mds/MDCache: pass iterator by value
Patrick Donnelly [Tue, 22 Oct 2024 00:54:15 +0000 (20:54 -0400)]
Merge PR #60216 into main
* refs/pull/60216/head:
common/options: pass name as rvalue reference
common/config: use libfmt to build strings
common/config: use emplace_back() instead of push_back()
common/HeartbeatMap: pass name as rvalue reference
common/config_obs_mgr: use the erase() return value
common/SloppyCRCMap: use the erase() return value
common: disable `boost::intrusive::constant_time_size`
Patrick Donnelly [Tue, 22 Oct 2024 00:53:44 +0000 (20:53 -0400)]
Merge PR #60220 into main
* refs/pull/60220/head:
msg/async/AsyncConnection: move the writeCallback instead of copying it
msg/async/AsyncConnection: do not wrap writeCallback in `std::optional`
msg/async/frames_v2: use zero-initialization instead of memset()
msg/async/Event: use zero-initialization instead of memset()
msg/Message: use zero-initialization instead of memset()
msg/async/ProtocolV2: eliminate redundant std::map lookups
msg/async/ProtocolV[12]: reverse the std::map sort order
msg/async/ProtocolV[12]: use `auto`
msg/async/ProtocolV[12]: use range-based `for`
msg/async/ProtocolV1: use zero-initialization instead of memset()
Add multi-cluster support (showMultiCluster=True) to alerts
Following PR https://github.com/ceph/ceph/pull/55495 fixing the
dashboard in regards to multiple clusters storing their metrics
in a single Prometheus instance, this PR addresses the issues
for alerts.
Fixes: https://tracker.ceph.com/issues/64321 Signed-off-by: Christian Rohmann <christian.rohmann@inovex.de>
Add a new command ("ceph mgr module force disable <module>") that allows
forcibly disabling an always-on module. This command should ideally only
be used to for cluster recovery.
Fixes: https://tracker.ceph.com/issues/66005 Signed-off-by: Rishabh Dave <ridave@redhat.com>
Rishabh Dave [Wed, 17 Jul 2024 12:35:33 +0000 (18:05 +0530)]
mon/MgrMonitor: improve a log message
Following log message has 3 distinct information (enabled modules,
modules that are alwats on and total number of commands enabled) printed
on the same line which makes it hard to find one of the information and
also makes it comparatively hard to read -
Patrick Donnelly [Tue, 15 Oct 2024 21:12:28 +0000 (17:12 -0400)]
doc/dev: add walkthrough for CephFS kernel development
Specifically, an opinionated walkthrough of how to setup an environment for a
built kernel, networking a VM to sepia, and mounting a remote Ceph cluster.
Signed-off-by: Patrick Donnelly <pdonnell@ibm.com>
This introduces a new `ceph orch device replace` command in order to
improve the user experience when it comes to replacing the underlying
device of an OSD.
```
ceph_volume/util/disk.py:1374: error: Incompatible types in assignment (expression has type "Optional[str]", variable has type "str") [assignment]
```
Adam Kupczyk [Tue, 15 Oct 2024 12:41:22 +0000 (12:41 +0000)]
os/bluestore: Fix repair of multilabel when collides with BlueFS
The problem was that BDEV_FIRST_LABEL_POSITION was removed from
bdev_label_valid_locations set.
Now, if label at BDEV_FIRST_LABEL_POSITION is valid, it is in the set.
Fixes: https://tracker.ceph.com/issues/68528 Signed-off-by: Adam Kupczyk <akupczyk@ibm.com>
Afreen Misbah [Fri, 11 Oct 2024 15:28:56 +0000 (20:58 +0530)]
mgr/dashboard: Adapt gateway group changes in nvmeof UI
- Added gateway group param in namespace request - GET, POST, PATCH, DELETE
- Added gateway group param in Listeners request - GET
- Added gateway group param in Initiators - GET, POST, DELETE
Max Kellermann [Tue, 15 Oct 2024 15:52:45 +0000 (17:52 +0200)]
CodingStyle: allow C++ forward declarations
The Google coding guide opposes to forward declarations, but I
disagree with that opinion. In my opinion, forward declarations are
useful. Ceph build times are miserable due to header dependency bloat
and template bloat, both of which can be reduced using forward
declarations.
All cons listed in https://google.github.io/styleguide/cppguide.html
> Forward declarations can hide a dependency, allowing user code to
> skip necessary recompilation when headers change.
That is a pro, not a con. Skipping (unnecessary) recompilation is a
good thing, it's the goal of forward declarations.
> A forward declaration as opposed to an #include statement makes it
> difficult for automatic tooling to discover the module defining the
> symbol.
That certainly depends on the tools one uses, but I cannot imagine
today's IDEs are limited to one compilation unit.
> A forward declaration may be broken by subsequent changes to the
> library.
True, and that will lead to a compiler error.
> Forward declarations of functions and templates can prevent the
> header owners from making otherwise-compatible changes to their
> APIs, such as widening a parameter type, adding a template parameter
> with a default value, or migrating to a new namespace.
Forward declarations do not prevent any of that. But if you change
the "real" declaration, all incompatible forward declarations will
cause a compiler error.
Sad, but true. But that is not an argument against forward
declarations for Ceph's own types.
> It can be difficult to determine whether a forward declaration or a
> full #include is needed.
If it compiles without the `#include`, then the forward declaration is
fine. (Or the primary header happened to be already included by
somebody else.)
> Replacing an #include with a forward declaration can silently change
> the meaning of code: [...] If the #include was replaced with forward
> decls for B and D, test() would call f(void*).
True, but this is a contrived example, and is bad coding style because
it is error prone. Casts to `void*` can and should be avoided. There
are rare examples where such casts are necessary (boundary to C APIs),
and then it's very unusual to pass derived incomplete types.
> Forward declaring multiple symbols from a header can be more verbose
> than simply #includeing the header.
True, but that misses the point of forward declarations.
> Structuring code to enable forward declarations (e.g., using pointer
> members instead of object members) can make the code slower and more
> complex.
True, but that is not a property of forward declarations. I don't
suggest doing such a thing.
Signed-off-by: Max Kellermann <max.kellermann@ionos.com>
test/osd: Add interactive mode to ceph_test_rados_io_sequence
Reorganisers the main function to be more modular, moving functionality into a TestRunner object and anonymous namespaces.
Adds a new "interactive" test mode that allows you to direct the order of operations rather than using the preset sequences. This allows complete precise control of the tool when you want to test specific IOs.
Signed-off-by: Jon Bailey <jonathan.bailey1@ibm.com>
Redouane Kachach [Tue, 15 Oct 2024 11:34:32 +0000 (13:34 +0200)]
mgr/cephadm: disabling nginx buffering for grafana location
Disabling Nginx buffering for Grafana, as it may lead to errors or
delays while loading the main Grafana page, particularly when
receiving JavaScript files.
* pthread name is saved in a thread_local storage
* the thread_local name is copied into Entry object's ctor
* Log::dump_recent() reads the thread name from the Entry
object's data member when dumping logs