Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
This project is now read‑only. Starting Monday, February 2, please use https://ibm-ceph.atlassian.net/ for all bug tracking management.

Bug 2043099

Summary: [rbd-mirror] : mirroring doesn't start till new snapshot if snapshot based mirroring was enabled before configuring peers
Product: [Red Hat Storage] Red Hat Ceph Storage Reporter: Vasishta <vashastr>
Component: RBD-MirrorAssignee: Ilya Dryomov <idryomov>
Status: CLOSED WONTFIX QA Contact: Vasishta <vashastr>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 4.3CC: ceph-eng-bugs, idryomov, rmandyam
Target Milestone: ---   
Target Release: 4.3z1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
Story Points: ---
Clone Of: 2041456 Environment:
Last Closed: 2022-08-10 13:54:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 2031070    

Description Vasishta 2022-01-20 15:51:54 UTC
This bug was initially created as a copy of Bug #2041456

I am copying this bug because: Issue has been reproduced in 4.3
All of our docs ask users to enable mirroring on image before bootstrapping peers, so users for sure will hit this issue.

Description of problem:
If snapshot mirroring is enabled before the peer bootstrap and import, the image created at secondary site doesn't sync to existing snapshot created during the moment of mirroring enable

Version-Release number of selected component (if applicable):
5.0 GA
16.2.0-146.el8cp

How reproducible:
Tried twice
Observed twice

Steps to Reproduce:
1) Create pool 1 on c1 , create image with separate data pool, enable mirroring on pool (image mode) and image (snapshot mode)
2) create pool on c2 and enable mirroring on pool (image mode)
3) Bootstrap peer on c2
4) Import peer on c1 as two way mode (rx-tx)
5) Observe c2 that the image gets created with from c1 but  mirroring state: unknown

Actual results:
mirroring state in secondary site reports unknown

Expected results:
Mirroring should not wait for upcoming snapshot creation if a snapshot already exists

Additional info:
Easy workaround is to create mirroring snapshot at primary or to schedule snapshot create
Example - sudo rbd mirror image snapshot <pool>/<image>

Have targeted to next available 4.x release