Bug 2041456

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: NEW --- QA Contact:
Severity: medium Docs Contact: Ranjini M N <rmandyam>
Priority: unspecified    
Version: 5.1CC: agunn, ceph-eng-bugs, idryomov, rmandyam
Target Milestone: ---   
Target Release: 7.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
Story Points: ---
Clone Of:
: 2043099 (view as bug list) Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vasishta 2022-01-17 11:39:01 UTC
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