Bug 1369028

Summary: rpc: Change the way client uuid is built
Product: [Community] GlusterFS Reporter: Susant Kumar Palai <spalai>
Component: rpcAssignee: Susant Kumar Palai <spalai>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: medium    
Version: mainlineCC: bugs, hgowtham
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-4.0.0 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-03-15 11:16:50 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Susant Kumar Palai 2016-08-22 11:09:00 UTC
Description of problem:

The main users of client uuid are protocol layers, locks, leases.
Protocolo layers requires each client uuid to be unique, even across
connects and disconnects. Locks and leases on the server side also use
the same client uid which changes across graph switches and across
file migrations. Which makes the graph switch and file migration
tedious for locks and leases.
As of today lock migration across graph switch is client driven,
i.e. when a graph switches, the client reassociates all the locks(which
were associated with the old graph client uid) with the new graphs
client uid. This means flood of fops to get and set locks for each fd.
Also file migration across bricks becomes even more difficult as
client uuid for the same client, is different on the other brick.

The exact set of issues exists for leases as well.

Hence the solution:
Make the migration of locks and leases during graph switch and migration,
server driven instead of client driven. This can be achieved by changing
the format of client uuid.

Comment 1 Worker Ant 2016-08-22 11:10:05 UTC
REVIEW: http://review.gluster.org/13901 (rpc: Change the way client uuid is built) posted (#6) for review on master by Susant Palai (spalai)

Comment 2 Worker Ant 2016-08-30 12:48:55 UTC
REVIEW: http://review.gluster.org/13901 (crpc: Change the way client uuid is built) posted (#7) for review on master by Poornima G (pgurusid)

Comment 3 Worker Ant 2016-09-14 07:40:56 UTC
REVIEW: http://review.gluster.org/13901 (rpc: Change the way client uuid is built) posted (#8) for review on master by Susant Palai (spalai)

Comment 4 Worker Ant 2016-09-20 08:39:25 UTC
REVIEW: http://review.gluster.org/13901 (rpc: Change the way client uuid is built) posted (#9) for review on master by Susant Palai (spalai)

Comment 5 Worker Ant 2016-09-20 12:56:31 UTC
REVIEW: http://review.gluster.org/13901 (rpc : Change the way client uuid is built) posted (#10) for review on master by Susant Palai (spalai)

Comment 6 Worker Ant 2016-09-28 17:33:28 UTC
REVIEW: http://review.gluster.org/13901 (rpc : Change the way client uuid is built) posted (#11) for review on master by Susant Palai (spalai)

Comment 7 Worker Ant 2017-11-20 08:21:04 UTC
COMMIT: https://review.gluster.org/13901 committed in master by \"Poornima G\" <pgurusid> with a commit message- rpc : Change the way client uuid is built

Problem:
Today the main users of client uuid are protocol layers, locks, leases.
Protocol layers requires each client uuid to be unique, even across
connects and disconnects. Locks and leases on the server side also use
the same client uid which changes across file migrations. Which makes the graph
switch and file migration tedious for locks and leases.

file migration across bricks becomes difficult as client uuid for the same
client, is different on the other brick.

The exact set of issues exists for leases as well.

Solution would be to introduce a constant in the client-uid string which
the locks and leases can use to identify the owner client across bricks.

Client uuid currently:
%s(ctx uuid)-%s(protocol client name)-%d(graph id)%s(setvolume count/reconnect count)

Proposed Client uuid:
"CTX_ID:%s-GRAPH_ID:%d-PID:%d-HOST:%s-PC_NAME:%s-RECON_NO:%s"
-  CTX_ID: This is will be constant per client.
-  GRAPH_ID, PID, HOST, PC_NAME(protocol client name), RECON_NO(setvolume count)
remains the same.

Change-Id: Ia81d57a9693207cd325d7b26aee4593fcbd6482c
BUG: 1369028
Signed-off-by: Susant Palai <spalai>

Comment 8 Shyamsundar 2018-03-15 11:16:50 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-4.0.0, please open a new bug report.

glusterfs-4.0.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://lists.gluster.org/pipermail/announce/2018-March/000092.html
[2] https://www.gluster.org/pipermail/gluster-users/