Actions
Bug #70948
closedA resync on an image deletes the image even when the remote image is not primary.
% Done:
0%
Source:
Backport:
reef,squid,tentacle
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Tags (freeform):
backport_processed
Merge Commit:
Fixed In:
v20.3.0-1949-gcfd294fd2a
Released In:
Upkeep Timestamp:
2025-11-11T01:10:59+00:00
Description
#Steps
root@server1:/workspace/ceph/build# rbd-a create -s 12M data/test
root@server1:/workspace/ceph/build# rbd-a mirror image enable data/test snapshot
Mirroring enabled
root@server1:/workspace/ceph/build# rbd-a info data/test
rbd image 'test':
size 12 MiB in 3 objects
order 22 (4 MiB objects)
snapshot_count: 1
id: 10359ed195d5
block_name_prefix: rbd_data.10359ed195d5
format: 2
features: layering, exclusive-lock, object-map, fast-diff, deep-flatten
op_features:
flags:
create_timestamp: Wed Apr 16 16:47:52 2025
access_timestamp: Wed Apr 16 16:47:52 2025
modify_timestamp: Wed Apr 16 16:47:52 2025
mirroring state: enabled
mirroring mode: snapshot
mirroring global id: 79e8ea6d-a79b-403a-9084-dc63b72eac20
mirroring primary: true
root@server1:/workspace/ceph/build# rbd-b info data/test
rbd image 'test':
size 12 MiB in 3 objects
order 22 (4 MiB objects)
snapshot_count: 1
id: 103545ce601
block_name_prefix: rbd_data.103545ce601
format: 2
features: layering, exclusive-lock, object-map, fast-diff, deep-flatten, non-primary
op_features:
flags:
create_timestamp: Wed Apr 16 16:48:03 2025
access_timestamp: Wed Apr 16 16:48:03 2025
modify_timestamp: Wed Apr 16 16:48:03 2025
mirroring state: enabled
mirroring mode: snapshot
mirroring global id: 79e8ea6d-a79b-403a-9084-dc63b72eac20
mirroring primary: false
## Kill the rbd-mirror daemon on the secondary
root@server1:/workspace/ceph/build# ps ax |grep rbd
1225550 ? Ssl 0:00 bin/rbd-mirror --cluster site-a
1225578 ? Ssl 0:00 bin/rbd-mirror --cluster site-b
1226030 pts/1 S+ 0:00 grep --color=auto rbd
root@server1:/workspace/ceph/build# kill -9 1225578
root@server1:/workspace/ceph/build# ps ax |grep rbd
1225550 ? Ssl 0:00 bin/rbd-mirror --cluster site-a
1226032 pts/1 S+ 0:00 grep --color=auto rbd
## Demote the primary image. The demote snap will not be synced to the secondary as the rbd-mirror daemon is not running
root@server1:/workspace/ceph/build# rbd-a mirror image demote data/test
2025-04-16T16:48:50.610+0530 7f0ff1a006c0 -1 librbd::Operations: update notification timed-out
Image demoted to non-primary
root@server1:/workspace/ceph/build# rbd-a info data/test
rbd image 'test':
size 12 MiB in 3 objects
order 22 (4 MiB objects)
snapshot_count: 2
id: 10359ed195d5
block_name_prefix: rbd_data.10359ed195d5
format: 2
features: layering, exclusive-lock, object-map, fast-diff, deep-flatten, non-primary
op_features:
flags:
create_timestamp: Wed Apr 16 16:47:52 2025
access_timestamp: Wed Apr 16 16:47:52 2025
modify_timestamp: Wed Apr 16 16:47:52 2025
mirroring state: enabled
mirroring mode: snapshot
mirroring global id: 79e8ea6d-a79b-403a-9084-dc63b72eac20
mirroring primary: false
root@server1:/workspace/ceph/build# rbd-a snap ls --all data/test
SNAPID NAME SIZE PROTECTED TIMESTAMP NAMESPACE
3 .mirror.primary.79e8ea6d-a79b-403a-9084-dc63b72eac20.b0c1e273-b2db-4213-9e3a-76c89c5fc234 12 MiB Wed Apr 16 16:48:01 2025 mirror (primary peer_uuids:[0188fbc9-6104-40b6-a108-96ad19cbd53e])
4 .mirror.primary.79e8ea6d-a79b-403a-9084-dc63b72eac20.8f440332-4ce9-4807-84cc-4209e5a73501 12 MiB Wed Apr 16 16:48:45 2025 mirror (demoted peer_uuids:[0188fbc9-6104-40b6-a108-96ad19cbd53e])
root@server1:/workspace/ceph/build# rbd-b snap ls --all data/test
SNAPID NAME SIZE PROTECTED TIMESTAMP NAMESPACE
3 .mirror.non_primary.79e8ea6d-a79b-403a-9084-dc63b72eac20.02c1392b-af78-4446-9e36-dfa74b4dbd39 12 MiB Wed Apr 16 16:48:03 2025 mirror (non-primary peer_uuids:[] d4594fcb-4641-47b2-a0d7-279c82aa2f9e:3 copied)
## Trigger a resync on the secondary
root@server1:/workspace/ceph/build# rbd-b mirror image resync data/test
Flagged image for resync from primary
## Start the rbd-mirror daemon on the secondary
root@server1:/workspace/ceph/build# bin/rbd-mirror --cluster site-b
root@server1:/workspace/ceph/build# rbd-b info data/test
rbd: error opening image test: (2) No such file or directory
Updated by Nithya Balachandran 12 months ago
- Subject changed from Trigger a resync on an image deletes the image even when the remote image is not primary. to A resync on an image deletes the image even when the remote image is not primary.
Updated by Ilya Dryomov 11 months ago
- Status changed from New to Fix Under Review
- Assignee set to Vinay Bhaskar Varada
- Backport set to reef,squid,tentacle
- Pull request ID set to 63270
Updated by Ilya Dryomov 9 months ago
- Status changed from Fix Under Review to Pending Backport
Updated by Upkeep Bot 9 months ago
- Merge Commit set to cfd294fd2a692e14b4bc784e7352cfd4d52e516d
- Fixed In set to v20.3.0-1949-gcfd294fd2a
- Upkeep Timestamp set to 2025-07-29T07:26:18+00:00
Updated by Upkeep Bot 9 months ago
- Copied to Backport #72318: reef: A resync on an image deletes the image even when the remote image is not primary. added
Updated by Upkeep Bot 9 months ago
- Copied to Backport #72319: squid: A resync on an image deletes the image even when the remote image is not primary. added
Updated by Upkeep Bot 9 months ago
- Copied to Backport #72320: tentacle: A resync on an image deletes the image even when the remote image is not primary. added
Updated by Ilya Dryomov 9 months ago
- Related to Bug #72325: arm64 check: unittest_rbd_mirror (Subprocess aborted) added
Updated by Upkeep Bot 5 months ago
- Status changed from Pending Backport to Resolved
- Upkeep Timestamp changed from 2025-07-29T07:26:18+00:00 to 2025-11-11T01:10:59+00:00
Actions