Bug #74985
opencephfs-mirror: tentacle release mirror daemon does not work with older cluster (at least with reef)
0%
Description
@a.bolzonella and @Faulkener are reporting that latest cephfs-mirror daemon (at least tentacle release) errors out on a reef Ceph File System. The mirror dameon would try to use blockdiff, but if that's unavailable then there is fallback to full sync. So, I expect this to work. I have requested them to update here with the errors, but I suggest to whoever picks this up to try a test as above.
Files
VS Updated by Venky Shankar 10 months ago
- Related to Bug #74997: qa: include cephfs-mirror with fs upgrade testing added
CÖ Updated by Can Özyurt 10 months ago
ceph 18.2.7
cephfs-mirror --version > ceph version 20.2.0 (69f84cc2651aa259a15bc192ddaabd3baba07489) tentacle (stable - RelWithDebInfo)
debug_client 10 debug_cephfs_mirror 10 in error.txt
test cluster, mirroring between 2 FS in the same cluster
2026-02-18T08:49:27.354+0000 7f2acf1ab640 5 cephfs::mirror::PeerReplayer(e13793f2-58bd-4517-80d2-536f9317aae3) do_synchronize: entry=./reconstruct.sh, data_sync=1, attr_sync=1
2026-02-18T08:49:27.354+0000 7f2acf1ab640 10 cephfs::mirror::PeerReplayer(e13793f2-58bd-4517-80d2-536f9317aae3) remote_file_op: dir_root=/, epath=./reconstruct.sh, need_data_sync=1, need_attr_sync=1
2026-02-18T08:49:27.354+0000 7f2acf1ab640 -1 cephfs::mirror::PeerReplayer(e13793f2-58bd-4517-80d2-536f9317aae3) get_changed_blocks: failed to init file blockdiff: r=-22
2026-02-18T08:49:27.354+0000 7f2acf1ab640 -1 cephfs::mirror::PeerReplayer(e13793f2-58bd-4517-80d2-536f9317aae3) do_sync_snaps: failed to synchronize dir_root=/, snapshot=fourth
2026-02-18T08:49:27.354+0000 7f2acf1ab640 -1 cephfs::mirror::PeerReplayer(e13793f2-58bd-4517-80d2-536f9317aae3) sync_snaps: failed to sync snapshots for dir_root=/
{
"mon": {
"ceph version 18.2.7 (6b0e988052ec84cf2d4a54ff9bbbc5e720b621ad) reef (stable)": 1
},
"mgr": {
"ceph version 18.2.7 (6b0e988052ec84cf2d4a54ff9bbbc5e720b621ad) reef (stable)": 2
},
"osd": {
"ceph version 18.2.7 (6b0e988052ec84cf2d4a54ff9bbbc5e720b621ad) reef (stable)": 3
},
"mds": {
"ceph version 18.2.7 (6b0e988052ec84cf2d4a54ff9bbbc5e720b621ad) reef (stable)": 2
},
"overall": {
"ceph version 18.2.7 (6b0e988052ec84cf2d4a54ff9bbbc5e720b621ad) reef (stable)": 8
}
}
root@can-ubuntu-22:/var/lib/ceph/2efc5194-f539-11f0-be48-9bbcbf39733b/home# ceph fs dump
e18
enable_multiple, ever_enabled_multiple: 1,1
default compat: compat={},rocompat={},incompat={1=base v0.20,2=client writeable ranges,3=default file layouts on dirs,4=dir inode in separate object,5=mds uses versioned encoding,6=dirfrag is stored in omap,8=no anchor table,9=file layout v2,10=snaprealm v2}
legacy client fscid: 1
Filesystem 'primary' (1)
fs_name primary
epoch 18
flags 12 joinable allow_snaps allow_multimds_snaps
created 2026-01-20T14:42:41.240830+0000
modified 2026-02-17T15:14:10.494611+0000
tableserver 0
root 0
session_timeout 60
session_autoclose 300
max_file_size 1099511627776
max_xattr_size 65536
required_client_features {}
last_failure 0
last_failure_osd_epoch 114
compat compat={},rocompat={},incompat={1=base v0.20,2=client writeable ranges,3=default file layouts on dirs,4=dir inode in separate object,5=mds uses versioned encoding,6=dirfrag is stored in omap,7=mds uses inline data,8=no anchor table,9=file layout v2,10=snaprealm v2}
max_mds 1
in 0
up {0=14269}
failed
damaged
stopped
data_pools [2]
metadata_pool 3
inline_data disabled
balancer
bal_rank_mask -1
standby_count_wanted 1
[mds.primary.can-ubuntu-22.qfsove{0:14269} state up:active seq 469935 join_fscid=1 addr [v2:10.1.0.166:6828/3133476479,v1:10.1.0.166:6829/3133476479] compat {c=[1],r=[1],i=[7ff]}]
[peers={uuid=e13793f2-58bd-4517-80d2-536f9317aae3, remote_cluster={client_name=client.admin, cluster_name=site-remote, fs_name=secondary}}]
Filesystem 'secondary' (2)
fs_name secondary
epoch 17
flags 12 joinable allow_snaps allow_multimds_snaps
created 2026-02-17T14:50:59.396568+0000
modified 2026-02-17T15:09:08.949691+0000
tableserver 0
root 0
session_timeout 60
session_autoclose 300
max_file_size 1099511627776
max_xattr_size 65536
required_client_features {}
last_failure 0
last_failure_osd_epoch 0
compat compat={},rocompat={},incompat={1=base v0.20,2=client writeable ranges,3=default file layouts on dirs,4=dir inode in separate object,5=mds uses versioned encoding,6=dirfrag is stored in omap,7=mds uses inline data,8=no anchor table,9=file layout v2,10=snaprealm v2}
max_mds 1
in 0
up {0=14376}
failed
damaged
stopped
data_pools [5]
metadata_pool 6
inline_data disabled
balancer
bal_rank_mask -1
standby_count_wanted 0
[mds.primary.can-ubuntu-22.xfqpbo{0:14376} state up:active seq 134945 join_fscid=1 addr [v2:10.1.0.166:6826/3749603792,v1:10.1.0.166:6827/3749603792] compat {c=[1],r=[1],i=[7ff]}]
[peers=]
CÖ Updated by Can Özyurt 10 months ago
We ran tentacle mirror daemon on production cluster as well and we got the same error on real data.
cephfs-mirror 20.2.0
src ceph cluster 18.2.7
dst ceph cluster 18.2.7
debug 2026-02-19T22:58:56.559+0000 7fa353b08640 -1 cephfs::mirror::PeerReplayer(5372b810-af54-48e0-86ae-d1b66e5eab29) get_changed_blocks: failed to init file blockdiff: r=-22
debug 2026-02-19T22:58:56.559+0000 7fa353b08640 -1 cephfs::mirror::PeerReplayer(5372b810-af54-48e0-86ae-d1b66e5eab29) do_sync_snaps: failed to synchronize dir_root=/redacted/redacted/redacted, snapshot=scheduled-2026-02-11-23_00_00_UTC
debug 2026-02-19T22:58:56.559+0000 7fa353b08640 -1 cephfs::mirror::PeerReplayer(5372b810-af54-48e0-86ae-d1b66e5eab29) sync_snaps: failed to sync snapshots for dir_root=/redacted/redacted/redacted
CÖ Updated by Can Özyurt 10 months ago
debug 2026-02-20T11:29:59.999+0000 7f5f69a03640 20 client.176372601 file_blockdiff_init_state: (snapid1, ino1, size)=(34d5,0x1000042618d,1973) (snapid2, ino2, size)=(3702,0x40020d2435e,2822) debug 2026-02-20T11:29:59.999+0000 7f5f69a03640 -1 cephfs::mirror::PeerReplayer(5372b810-af54-48e0-86ae-d1b66e5eab29) do_sync_snaps: failed to synchronize dir_root=/redacted/redacted/redacted, snapshot=scheduled-2026-02-12-23_00_00_UTC
I suspect EINVAL is coming from here:
client/Client.cc @10381
if (inode1->ino != inode2->ino) {
cleanup_state(this, sst);
return -EINVAL;
}
KH Updated by Kotresh Hiremath Ravishankar 9 months ago
@Venky Shankar Where is the fall back mechanism ? I don't see it in mirror daemon when it fails with EINVAL
VS Updated by Venky Shankar 9 months ago
Kotresh Hiremath Ravishankar wrote in #note-5:
@Venky Shankar Where is the fall back mechanism ? I don't see it in mirror daemon when it fails with EINVAL
You are right. There isn't one, probably because there isn't a version or feature checking mechanism in the mirror daemon.
VS Updated by Venky Shankar 9 months ago · Edited
Can Özyurt wrote in #note-3:
We ran tentacle mirror daemon on production cluster as well and we got the same error on real data.
cephfs-mirror 20.2.0
src ceph cluster 18.2.7
dst ceph cluster 18.2.7
[...]
The mirror daemon would fail if the blockdiff RPC isn't supported by the MDS. There needs to be a fallback mechanism, but only when running against old clusters.
EDIT: the inode number checking you shared, should not be hit when using the mirror daemon since it would only invoke the blockdiff API when its the same file (inode) in two snapshots (else, it fallbacks to full sync). The bug here is that old clusters where the MDS doesn't support blockdiff API will result in the mirror daemon never falling back to using full sync.
CÖ Updated by Can Özyurt 9 months ago
Venky Shankar wrote in #note-7:
The mirror daemon would fail if the blockdiff RPC isn't supported by the MDS. There needs to be a fallback mechanism, but only when running against old clusters.
EDIT: the inode number checking you shared, should not be hit when using the mirror daemon since it would only invoke the blockdiff API when its the same file (inode) in two snapshots (else, it fallbacks to full sync). The bug here is that old clusters where the MDS doesn't support blockdiff API will result in the mirror daemon never falling back to using full sync.
I am here with some updates:
-> ls /source/redacted/.snap |grep "^scheduled*"|head -n3
scheduled-2026-02-06-12_00_03_UTC
scheduled-2026-02-15-23_00_00_UTC
scheduled-2026-02-16-23_00_00_UTC
-> ls /target/redacted/.snap |grep "^scheduled*"
scheduled-2026-02-06-12_00_03_UTC
scheduled-2026-02-15-23_00_00_UTC
debug 2026-02-23T09:34:34.482+0000 7f5f6aa05640 -1 cephfs::mirror::PeerReplayer(5372b810-af54-48e0-86ae-d1b66e5eab29) get_changed_blocks: failed to init file blockdiff: r=-22
debug 2026-02-23T09:34:34.482+0000 7f5f6aa05640 -1 cephfs::mirror::PeerReplayer(5372b810-af54-48e0-86ae-d1b66e5eab29) do_sync_snaps: failed to synchronize dir_root=/redacted/, snapshot=scheduled-2026-02-16-23_00_00_UTC
debug 2026-02-23T09:34:34.482+0000 7f5f6aa05640 -1 cephfs::mirror::PeerReplayer(5372b810-af54-48e0-86ae-d1b66e5eab29) sync_snaps: failed to sync snapshots for dir_root=/redacted/
Seems like it succeeded on first two now and started failing on the third. Is this flakiness still possible with blockdiff API case?
VS Updated by Venky Shankar 9 months ago
Can Özyurt wrote in #note-8:
Venky Shankar wrote in #note-7:
The mirror daemon would fail if the blockdiff RPC isn't supported by the MDS. There needs to be a fallback mechanism, but only when running against old clusters.
EDIT: the inode number checking you shared, should not be hit when using the mirror daemon since it would only invoke the blockdiff API when its the same file (inode) in two snapshots (else, it fallbacks to full sync). The bug here is that old clusters where the MDS doesn't support blockdiff API will result in the mirror daemon never falling back to using full sync.
I am here with some updates:
[...][...]
Seems like it succeeded on first two now and started failing on the third. Is this flakiness still possible with blockdiff API case?
Thanks for checking this. Yes, this is the bug. Once the mirror daemon tries to use blockdiff, snapshot sync starts failing from thereon.
@Kotresh Hiremath Ravishankar is adding the relevant qa suite changes to start testing mirror daemon with old clusters and old old mirror daemons with new clusters.
VS Updated by Venky Shankar 9 months ago
- Status changed from New to Triaged
- Assignee set to Kotresh Hiremath Ravishankar
- Priority changed from Normal to High
VS Updated by Venky Shankar 5 months ago
- Target version changed from v21.0.0 to v22.0.0
- Backport changed from squid,tentacle to umbrella, tentacle, squid