Bug #66314
closedmgr/vol: subvolume metadata is incorrectly properly when clones are cancelled
0%
Description
When multiple ongoing and pending clones are cancelled immediately one after the other, race happens between cloner threads to update subvolume's metadata file. Due to this race, one of the threads ends up writing before reading update from previous thread, hence update by previous thread is lost. All this happened in 1/3 runs for tests added on PR 54620. Interestingly, this issue occurred only when tests were run with teuthology but not with vstart_runner.py. The test failed during teardown because subvolume snapshot rm --force --format json cephfs sv1 ss1 would fail with error message Error EAGAIN: snapshot 'ss1' has pending clones and error number 11.
Upon inspecting mgr/vol code it appears SubvolumeV1.remove_snapshot() since has_pending_clones (falsely) returns True. This makes remove_snapshot (falsely) print snapshot foo has pending clones, even though all clones were successfully cancelled. This must subvolume's metadata was incorrectly updated just like issue #66313.
RD Updated by Rishabh Dave over 2 years ago
- Subject changed from mgr/vol: subvolume metadata is not updated properly when clones are cancelled to mgr/vol: subvolume metadata is incorrectly properly when clones are cancelled
RD Updated by Rishabh Dave over 2 years ago
- Pull request ID set to 54620
RD Updated by Rishabh Dave over 2 years ago
- Status changed from Fix Under Review to Closed