Bug 1461808 - glfs_get_volumeid() returns junk strings
Summary: glfs_get_volumeid() returns junk strings
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Gluster Storage
Classification: Red Hat Storage
Component: libgfapi
Version: rhgs-3.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Poornima G
QA Contact: surabhi
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-06-15 11:21 UTC by Prasanna Kumar Kalever
Modified: 2018-09-18 08:01 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-06-20 09:26:12 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1463192 0 medium CLOSED gfapi: discard glfs object when volume is deleted 2021-02-22 00:41:40 UTC

Internal Links: 1463192

Comment 3 Poornima G 2017-06-16 09:49:32 UTC
My apologies, missed in the first code walktrough. So, the glfs_get_volumeid gives the UUID in uuid_t format i.e. as opaque data of 16 bytes and is non printable. Hence, the printf on uuid is wrong usage. The API documentation in glfs.h clearly states that the uuid returned is opaque.

Hence this is not a bug. Please confirm the same.

Also for your use case, you can store the uuid as opaque and compare the uuids using memcmp()

Comment 4 Niels de Vos 2017-06-19 08:45:12 UTC
I stronly recommend to not use an opaque value if you care about calling glfs_get_volumeid(). Store it in a uuid_t, and don't use memcmp() to compare but use uuid_compare() instead :)

We can not change glfs_get_volumeid() because there are other users of this function (at least NFS-Ganesha).

This should probably be closed as NOTABUG, please do so while replying with your acceptance.

Comment 7 Niels de Vos 2017-06-19 11:43:42 UTC
Also, Prasanna, what is your use-case for calling glfs_get_volumeid() in the first place? Normal users should really not need to know the volume-id...

Comment 10 Poornima G 2017-06-20 09:15:42 UTC
So hence we can close this bug and work as a part of some other bug https://bugzilla.redhat.com/show_bug.cgi?id=1459850 may be?


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