Bug 1463192 - gfapi: discard glfs object when volume is deleted
gfapi: discard glfs object when volume is deleted
Status: NEW
Product: Red Hat Gluster Storage
Classification: Red Hat
Component: libgfapi (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Niels de Vos
Vivek Das
: ZStream
Depends On: 1463191
Blocks: 1459850
  Show dependency treegraph
Reported: 2017-06-20 07:12 EDT by Prasanna Kumar Kalever
Modified: 2018-01-31 00:22 EST (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 1463191
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Prasanna Kumar Kalever 2017-06-20 07:12:28 EDT
Description of problem:

currently, once we have a glfs object in hand for a given volume, after deleting and recreating the volume with same name, we still can access new volume using the old glfs object, which is wrong.

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

How reproducible:
1. write a gfapi program, once you are done calling glfs_init() try creating a file in the volume, now apply break-point there.

2. delete the volume and recreate the volume with the same name.

3. now continue with your program, in the next lines try creating another file in the volume using the same old glfs object

4. surprisingly it allows to create.

My use-case was more like calling glfs_get_volumeid() returns old volume id rather than throwing an error which should say glfs object is not valid or worst case return new volume id, but in my case it returned old uuid.

Refer https://bugzilla.redhat.com/show_bug.cgi?id=1461808#c9 for some more interesting context and sample programs.

Actual results:
with old glfs object we still can access new volume

Expected results:
return invalid object.

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