Project

General

Profile

Cleanup #16130

Proxied operations shouldn't result in error messages if replayed

Added by Jason Dillaman 11 months ago. Updated 6 months ago.

Status:
Resolved
Priority:
Low
Assignee:
Target version:
-
Start date:
06/02/2016
Due date:
% Done:

0%

Tags:
Backport:
jewel
Reviewed:
Affected Versions:
Release:
Needs Doc:
No

Description

For example, if the "snap rename" operation is replayed, it's possible that the second SnapshotRenameRequest state machine will encounter '-EEXISTS' when testing for the destination. This should apply to snap create, snap rename, snap remove, snap protect, snap unprotect, and rename.

# rbd bench-write -p cephfs_data --image testing2 --io-size 10240 &
# for i in {1..100}; do rbd snap rename cephfs_data/testing2@snap$i cephfs_data/testing2@snappey$i; done
2016-05-30 08:52:11.847718 7f8329ffb700 -1 librbd::SnapshotRenameRequest: encountered error: (17) File exists
2016-05-30 08:52:12.293367 7f8329ffb700 -1 librbd::SnapshotRenameRequest: encountered error: (17) File exists
2016-05-30 08:52:13.731278 7f8329ffb700 -1 librbd::SnapshotRenameRequest: encountered error: (17) File exists
2016-05-30 08:52:16.385266 7f8329ffb700 -1 librbd::SnapshotRenameRequest: encountered error: (17) File exists
2016-05-30 08:52:20.514545 7f8329ffb700 -1 librbd::SnapshotRenameRequest: encountered error: (17) File exists
2016-05-30 08:52:24.469216 7f8329ffb700 -1 librbd::SnapshotRenameRequest: encountered error: (17) File exists

Related issues

Copied to Backport #17481: jewel: Proxied operations shouldn't result in error messages if replayed Resolved

History

#1 Updated by Vikhyat Umrao 11 months ago

  • Status changed from New to In Progress
  • Assignee set to Vikhyat Umrao

#2 Updated by Vikhyat Umrao 11 months ago

@Jason , I hope here you meant we should not return replay errors in Snapshot<Type>Request . For types : snap create, snap rename, snap remove, snap protect, snap unprotect, and rename if replayed.

#3 Updated by Vikhyat Umrao 11 months ago

- I have tested in latest master and I am not getting these error messages from Snapshot<Type>Request, if replayed :

./rbd snap rename rbd/testrbd@snap1 rbd/testrbd@snap1
rbd: renaming snap failed: (17) File exists

./rbd -p rbd ls -l
NAME              SIZE PARENT FMT PROT LOCK 
testrbd          1024k          2           
testrbd@snap1    1024k          2 yes       
testrbd@testsnap 1024k          2      

./rbd snap protect rbd/testrbd@snap1
rbd: protecting snap failed: (16) Device or resource busy 

$ ./rbd snap unprotect rbd/testrbd@snap1

 $ ./rbd snap unprotect rbd/testrbd@snap1
rbd: unprotecting snap failed: (22) Invalid argument

- This is my current understanding or I am missing something ?

#4 Updated by Jason Dillaman 11 months ago

@Vikhyat: yes, we should suppress the lderr log messages from the state machines if it's possible to hit the error from a duplicated op (e.g. ldout but don't lderr in SnapshotRemoveRequest if you hit -ENOENT attempting to remove a snapshot).

#5 Updated by Vikhyat Umrao 10 months ago

  • Status changed from In Progress to Need Review

#6 Updated by Jason Dillaman 9 months ago

  • Status changed from Need Review to Resolved

#7 Updated by Ken Dreyer 7 months ago

  • Status changed from Resolved to Pending Backport
  • Backport set to jewel
  • Needs Doc set to No

#8 Updated by Loic Dachary 7 months ago

  • Copied to Backport #17481: jewel: Proxied operations shouldn't result in error messages if replayed added

#9 Updated by Loic Dachary 6 months ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF