mgr/mirroring: Display mon_host and fsid in daemon status command#67335
mgr/mirroring: Display mon_host and fsid in daemon status command#67335
Conversation
|
@kotreshhr - Its been a while since I've closely looked at the mirroring related structures in FSMap, but, once a key is imported (via bootstrapping), then the remote cluster details are stored in monitor config map. Can't the relevant details be fetched from there instead? |
@vshankar I too thought of it. But the ceph/src/tools/cephfs_mirror/ServiceDaemon.cc Line 201 in 22a7cc4 Asking it to fetch it from mon config map for every status update is an extra monitor command which I thought is unnecessary and adds a possible failure layer ? Also having it in FSMap keeps all peer information consistently at one place. Let me know your thoughts. |
e67ae1e to
5914d19
Compare
|
Fixed flake8 error which was causing make check failure and rebased |
5914d19 to
33cd7a5
Compare
The thing is including it in FSMap redundant. If we ever would have to make a future modification to change these attributes, then it would have to be updated in two places, which I think is a good enough reason to not have the information additional stored in FSMap. I would say, let's query the mon to get the attributes. If we are concerned about making mon queries over and over, maybe we can cache the attributes in mgr/mirroring. But for now, I would just fetch it from the mon every time. |
But why do we have Peer information in FSMap in that case ? Any historical reason ? |
The mirror daemon subscribes to FSMap and thereby gets notified on Peer updates. |
33cd7a5 to
0d7effd
Compare
Done. Removed all FSMap changes and modified only mgr/mirroring module to achieve the desired result |
|
jenkins test make check |
|
jenkins test make check arm64 |
@vshankar The relevant test ran fine. But I saw the following failure. This failure was seen at #67305 (comment) (2nd test failure). I initially thought it's not related to new retry logic PR as it was intermittent. I spent more time digging into this and I think I root caused the issue. Please find the analysis at https://tracker.ceph.com/issues/74998#note-2 and the fix #67385 Do we need one more run of qa with fix above or are we good as it's tracked separately and fix is available? |
Let me check the qa fix. We can including that as it does not required rebuilding. |
I triggered the new qa run with the fix for https://tracker.ceph.com/issues/74998 - https://pulpito.ceph.com/khiremat-2026-02-18_07:31:59-fs-wip-khiremat-mirror-status-67335-distro-default-trial/ Everything passed, but unfortunately that race in issue https://tracker.ceph.com/issues/74998 isn't hit this time. |
No luck with second iteration as well :) https://pulpito.ceph.com/khiremat-2026-02-18_10:17:40-fs-wip-khiremat-mirror-status-67335-distro-default-trial/ I grepped for |
|
Rados Approved. |
The cephfs_mirror daemon returns the basic remote info.
Fetch the remote fsid and mon_host from the monitor
config map and append it.
Sample output:
[
{
"daemon_id": 4153,
"filesystems": [
{
"filesystem_id": 1,
"name": "a",
"directory_count": 0,
"peers": [
{
"uuid": "29304477-1fd7-4709-b9f7-8153acebbafd",
"remote": {
"client_name": "client.mirror_remote",
"cluster_name": "remote-site",
"fs_name": "a",
"mon_host": "[v2:192.168.64.5:40183,v1:192.168.64.5:40184]",
"fsid": "5682c8e5-50cd-4cfd-b75c-5354dcdda487"
},
"stats": {
"failure_count": 0,
"recovery_count": 0
}
}
]
}
]
}
]
Fixes: https://tracker.ceph.com/issues/73455
Signed-off-by: Kotresh HR <khiremat@redhat.com>
Fixes: https://tracker.ceph.com/issues/73455 Signed-off-by: Kotresh HR <khiremat@redhat.com>
Fixes: https://tracker.ceph.com/issues/73455 Signed-off-by: Kotresh HR <khiremat@redhat.com>
Fixes: https://tracker.ceph.com/issues/73455 Signed-off-by: Kotresh HR <khiremat@redhat.com>
017c3c0 to
7db2efc
Compare
|
Rebased as there was a conflict with PendingNotes after #66572 is merged |
|
This is an automated message by src/script/redmine-upkeep.py. I have resolved the following tracker ticket due to the merge of this PR: No backports are pending for the ticket. If this is incorrect, please update the tracker Update Log: https://github.com/ceph/ceph/actions/runs/22619816669 |
The cephfs_mirror daemon returns the basic remote info.
Fetch the remote fsid and mon_host from the monitor
config map and append it
Sample output:
Fixes: https://tracker.ceph.com/issues/73455
Contribution Guidelines
To sign and title your commits, please refer to Submitting Patches to Ceph.
If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.
When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an
xbetween the brackets:[x]. Spaces and capitalization matter when checking off items this way.Checklist
Show available Jenkins commands
jenkins test classic perfJenkins Job | Jenkins Job Definitionjenkins test crimson perfJenkins Job | Jenkins Job Definitionjenkins test signedJenkins Job | Jenkins Job Definitionjenkins test make checkJenkins Job | Jenkins Job Definitionjenkins test make check arm64Jenkins Job | Jenkins Job Definitionjenkins test submodulesJenkins Job | Jenkins Job Definitionjenkins test dashboardJenkins Job | Jenkins Job Definitionjenkins test dashboard cephadmJenkins Job | Jenkins Job Definitionjenkins test apiJenkins Job | Jenkins Job Definitionjenkins test docsReadTheDocs | Github Workflow Definitionjenkins test ceph-volume allJenkins Jobs | Jenkins Jobs Definitionjenkins test windowsJenkins Job | Jenkins Job Definitionjenkins test rook e2eJenkins Job | Jenkins Job DefinitionYou must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.