mgr/prometheus: fix pool_objects_repaired and daemon_health_metrics format
mgr/prometheus: fix pool_objects_repaired and daemon_health_metrics format
- fix "error reading metrics for http://****:***/metrics: reading text format failed: text format parsing error in line 2010: second HELP line for metric name "ceph_pool_objects_repaired" error
- rename label name "poolid" to "pool_id" like all other metrics
- change type for the "daemon_health_metrics" to gauge
This topic has been discussed many times; recently at the Dev
Summit of Cephalocon 2023.
This commit is the minial version of the work, contained entirely
within the `doc`. However, likely it will be expanded as there
were ideas like e.g. adding cache tiering back experimental feature
list (Sam) to warn users when deploying a new cluster.
Matan Breizman [Wed, 3 May 2023 09:39:14 +0000 (09:39 +0000)]
crimson/osd/objclass: Compilation warning
```
In copy constructor ‘ceph::buffer::v15_2_0::list::list(const ceph::buffer::v15_2_0::list&)’,
inlined from ‘OSDOp::OSDOp(const OSDOp&)’ at ../src/osd/osd_types.h:4081:8,
inlined from ‘int cls_cxx_snap_revert(cls_method_context_t, snapid_t)’ at ../src/crimson/osd/objclass.cc:279:37:
../src/include/buffer.h:945:20: warning: ‘op.OSDOp::indata.ceph::buffer::v15_2_0::list::_len’ is used uninitialized [-Wuninitialized]
945 | _len(other._len),
| ~~~~~~^~~~
../src/crimson/osd/objclass.cc: In function ‘int cls_cxx_snap_revert(cls_method_context_t, snapid_t)’:
../src/crimson/osd/objclass.cc:279:9: note: ‘op’ declared here
279 | OSDOp op{op = CEPH_OSD_OP_ROLLBACK};
|
```
crimson/osd/pg: make clone object's version consistent with pglog
Right now, the head object's version is 1 less than clone object's
version in the pg log; while it's exactly the other way around when
it comes to the versions recorded in the object info of head/clone
objects
Matan Breizman [Wed, 15 Mar 2023 11:11:47 +0000 (11:11 +0000)]
test/librados/snapshots: Add FutureSnapRollback test
Add a test we rollback to a future snap id. Meaning, no mutation is
followed after taking the third snapshot.
The read op is expected to be applied to the head object.
Matan Breizman [Wed, 15 Mar 2023 10:00:29 +0000 (10:00 +0000)]
crimson/osd/pg_backend:: rollback to support resolved head
Consider the following `resolve_oid()` case:
```
// Because oid.snap > ss.seq, we are trying to read from a snapshot
// taken after the most recent write to this object. Read from head.
```
In this case, a no-op is expected as the head object can read from.
Xuehan Xu [Tue, 21 Mar 2023 05:52:43 +0000 (05:52 +0000)]
crimson/os/seastore: don't set INVALID extents to CLEAN when reading
extents
CLEAN_PENDING extents may be invalidated before read completes:
1. transaction A retired an laddr, which lead to a RetirePlaceHolder in
Cache
2. transaction B try to read that extent, and replace A's
RetirePlaceHolder with it;
3. transaction A commits and invalidate that extent;
4. transaction B complete reading that extent;
In this case, we shouldn't set the extent's state to CLEAN
Matan Breizman [Sun, 5 Mar 2023 09:31:03 +0000 (09:31 +0000)]
crimson/osd: Introduce with_head_and_clone_obc()
In continuation to 7ca2690be956a36f61c7729946b94ccd970dd9c7:
Now that the head ref is no longer a member of obc, we need a new
substitute way to get the head when needed.
When loading a clone object, the head object is loaded
first (See with_clone_obc). Therefore we can make use of this design
to move the loaded head forward to the relevant func (See with_head_and_clone_obc).
Usually, we wouldn't need to make use of both the head and the clone obc in the
same function. However, SnapTrimObjSubEvent::remove_or_update is an abnormal usage.
Note: We want to avoid holding any unneeded references to obcs
to allow the obc_registery to evict no longer valid obc.
Therefore, with_obc() which references only a single obc is the
preferred entry point for loading obcs.
Matan Breizman [Sun, 19 Feb 2023 10:49:47 +0000 (10:49 +0000)]
crimson/osd: Remove head memeber from ObjectContext
Before this patch, ObjectContext had a head member which was used
to get the head obc of a clone object.
This member caused the head object to being referenced while
attempting to 'clear_replica_obc' (Since we only evict un-referenced
obc from the obc_registery).
This mechanism, of obtaining the head, is no longer needed since
'with_clone_obc' loads the head object context first (using
oid.get_head).
In this commit, head is removed from ObjectContext class and users
are removed as well.
doc: Add missing `ceph` command in documentation section `REPLACING AN OSD`
Signed-off-by: Alexander Proschek <alexander.proschek@protonmail.com> Signed-off-by: Alexander Proschek <alexander.proschek@protonmail.com>
(cherry picked from commit 0557d5e465556adba6d25db62a40ba55a5dd2400)
Zac Dover [Thu, 18 May 2023 21:07:02 +0000 (07:07 +1000)]
doc/radosgw: explain multisite dynamic sharding
Add a note to doc/radosgw/dynamicresharding.rst and a note to
doc/radosgw/multisite.rst that explains that dynamic resharding is not
supported in releases prior to Reef.
This commit is made in response to a request from Mathias Chapelain.
Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com> Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit d4ed4223d914328361528990f89f1ee4acd30e79)
Zac Dover [Wed, 17 May 2023 12:25:38 +0000 (22:25 +1000)]
doc/cephfs: line-edit "Mirroring Module"
Line-edit the "Mirroring Module" section of
doc/cephfs/cephfs-mirroring.rst. Add prompts and formatting where such
things contribute to the realization of adequate sentences.
This commit is a follow-up to https://github.com/ceph/ceph/pull/51505.
Co-authored-by: Anthony D'Atri <anthony.datri@gmail.com> Signed-off-by: Zac Dover <zac.dover@proton.me>
(cherry picked from commit dd8855d9a934bcdd6a026f1308ba7410b1e143e3)
Aashish Sharma [Mon, 8 May 2023 07:19:13 +0000 (12:49 +0530)]
mgr/dashboard: fix regression caused by cephPgImabalance alert
because of an earlier fix delivered, there is a regression caused by it
due to which alerts are not getting displayed in the active alerts tab.
This PR intends to fix this issue.
Venky Shankar [Tue, 16 May 2023 05:25:34 +0000 (10:55 +0530)]
doc: explain cephfs mirroring `peer_add` step in detail
@zdover23 reached out regarding missing explanation for `peer_add`
step in cephfs mirroring documentation. Add some explanation and
and example to make the step clear.
In the case where `iter->second.addr` is an empty address,
m_locker->address string is assigned with "0)/0" and therfore
will never result in an empty string.
Ramana Raja [Wed, 10 May 2023 18:37:44 +0000 (14:37 -0400)]
rbd_support: recover from "double blocklisting"
Recover from being blocklisted while recovering from blocklisting.
When the rbd_support module is being set up to recover from client
blocklisting, the module's new rados client connection can also get
blocklisted. Currently, this will cause the recovery to fail and
the module will remain inoperable. Instead, retry module recovery
when the new client gets blocklisted during the module setup in the
recovery thread.
Ramana Raja [Wed, 15 Feb 2023 15:12:54 +0000 (10:12 -0500)]
mgr/rbd_support: recover from rados client blocklisting
In certain scenarios the OSDs were slow to process RBD requests.
This lead to the rbd_support module's RBD client not being able to
gracefully handover a RBD exclusive lock to another RBD client.
After the condition persisted for some time, the other RBD client
forcefully acquired the lock by blocklisting the rbd_support module's
RBD client, and consequently blocklisted the module's RADOS client. The
rbd_support module stopped working. To recover the module, the entire
mgr service had to be restarted which reloaded other mgr modules.
Instead of recovering the rbd_support module from client blocklisting
by being disruptive to other mgr modules, recover the module
automatically without restarting the mgr serivce. On client getting
blocklisted, shutdown the module's handlers and blocklisted client,
create a new rados client for the module, and start the new handlers.
librbd: localize snap_remove op for mirror snapshots
A client may attempt a lock request not quickly enough to
obtain exclusive lock for operations when another competing
client responds quicker. This can happen when a peer site has
different performance characteristics or latency. Instead of
relying on this unpredictable behavior, localize operation to
primary cluster.
Fixes: https://tracker.ceph.com/issues/59393 Signed-off-by: Christopher Hoffman <choffman@redhat.com>
(cherry picked from commit ac552c9b4d65198db8038d397a3060d5a030917d)