Project

General

Profile

Actions

Bug #46733

closed

Erro:EEXIST returned while unprotecting a snap which is not protected

Added by Humble Chirammal almost 4 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Normal
Category:
-
Target version:
% Done:

0%

Source:
Development
Tags:
Backport:
octopus,nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
libcephfs, mgr/volumes
Labels (FS):
snapshots
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Double unprotect or unprotect on a snap which is not protected give EEXIST error code.
[root@node /]# ceph fs subvolume snapshot protect cephfilesystem vol1 hum-snap1 csi
[root@node /]# ceph fs subvolume snapshot unprotect cephfilesystem vol1 hum-snap1 csi
[root@node /]# ceph fs subvolume snapshot unprotect cephfilesystem vol1 hum-snap1 csi
Error EEXIST: snapshot 'hum-snap1' is not protected

IMO, EEXIST does not make much sense in this context, May be 'no error' or 'some other error code' would be the correct thing to do.
This add additional overhead to the caller while doing `unproect` check before deleting the volume.

Actions

Also available in: Atom PDF