Bug 2111650 - Snapshot creation with same name on UI throwing 500 Internal Error
Summary: Snapshot creation with same name on UI throwing 500 Internal Error
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Ceph Storage
Classification: Red Hat Storage
Component: Ceph-Dashboard
Version: 5.2
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: ---
: 6.0
Assignee: Aashish sharma
QA Contact: Amarnath
Eliska
URL:
Whiteboard:
: 2111649 (view as bug list)
Depends On:
Blocks: 2126050
TreeView+ depends on / blocked
 
Reported: 2022-07-27 18:05 UTC by Amarnath
Modified: 2023-03-20 18:57 UTC (History)
5 users (show)

Fixed In Version: ceph-17.2.3-30.el9cp
Doc Type: Bug Fix
Doc Text:
.The Ceph Dashboard now raises appropriate error message, if user tries to create a snapshot with an existing name Previously, Ceph Dashboard would not validate Ceph File System snapshot creation with an existing name and threw an 500 Internal Error. With this fix, the correct error message is added, which throws an appropriate error message when user creates a snapshot with an existing name.
Clone Of:
Environment:
Last Closed: 2023-03-20 18:57:13 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github ceph ceph pull 47976 0 None open mgr/dashboard: fix snapshot creation with duplicate name 2022-09-05 12:06:39 UTC
Red Hat Issue Tracker RHCEPH-4953 0 None None None 2022-07-27 18:10:48 UTC
Red Hat Issue Tracker RHCSDASH-808 0 None None None 2022-07-27 18:10:49 UTC
Red Hat Product Errata RHBA-2023:1360 0 None None None 2023-03-20 18:57:55 UTC

Description Amarnath 2022-07-27 18:05:45 UTC
Description of problem:
Snapshot creation with same name on UI throwing 500 Internal Error

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1. Click FileSystems in left pane
2. select one file systems in right pane which has subvolume created
3. Navigate to subvolume
4. click on create snapshot
5. Create a snapshot with name snap1
6. now again create snapshot with snap1

Currently it is throwing 500 Internal error

Cna we give right error message
in the mgr logs we are seeing
debug 2022-07-27T17:32:22.645+0000 7f7ecfba6700  0 [dashboard INFO cephfs] Creating snapshot: /volumes/subvolgroup_1/subvol_1/.snap/snap1
debug 2022-07-27T17:32:22.652+0000 7f7ecfba6700  0 [dashboard ERROR exception] Internal Server Error
Traceback (most recent call last):
  File "/usr/share/ceph/mgr/dashboard/services/exception.py", line 47, in dashboard_exception_handler
    return handler(*args, **kwargs)
  File "/lib/python3.6/site-packages/cherrypy/_cpdispatch.py", line 54, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/usr/share/ceph/mgr/dashboard/controllers/_base_controller.py", line 258, in inner
    ret = func(*args, **kwargs)
  File "/usr/share/ceph/mgr/dashboard/controllers/_rest_controller.py", line 191, in wrapper
    return func(*vpath, **params)
  File "/usr/share/ceph/mgr/dashboard/controllers/cephfs.py", line 470, in snapshot
    return cfs.mk_snapshot(path, name)
  File "/usr/share/ceph/mgr/dashboard/services/cephfs.py", line 186, in mk_snapshot
    self.cfs.mkdir(snapshot_path, mode)
  File "cephfs.pyx", line 1023, in cephfs.LibCephFS.mkdir
cephfs.ObjectExists: error in mkdir /volumes/subvolgroup_1/subvol_1/.snap/snap1: File exists [Errno 17]


Actual results:


Expected results:


Additional info:

Comment 2 Amarnath 2022-07-27 18:17:00 UTC
*** Bug 2111649 has been marked as a duplicate of this bug. ***

Comment 8 Amarnath 2022-09-26 13:32:44 UTC
Snap with same name is throwing correct error

Comment 20 errata-xmlrpc 2023-03-20 18:57:13 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Red Hat Ceph Storage 6.0 Bug Fix update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2023:1360


Note You need to log in before you can comment on or make changes to this bug.