diff options
author | Poornima G <pgurusid@redhat.com> | 2016-04-04 07:13:09 -0400 |
---|---|---|
committer | Raghavendra G <rgowdapp@redhat.com> | 2017-11-20 08:20:35 +0000 |
commit | c810ea1e2ba5c15b11808e2bd378e95c428b7f96 (patch) | |
tree | 1e9cbed99b85c37747e02b6da85fc3493e445cae /rpc/rpc-lib | |
parent | 1c7041fd6b4be82415866dc19b9b2a5b41bd1396 (diff) |
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@redhat.com>
Diffstat (limited to 'rpc/rpc-lib')
-rw-r--r-- | rpc/rpc-lib/src/protocol-common.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/rpc/rpc-lib/src/protocol-common.h b/rpc/rpc-lib/src/protocol-common.h index d4b64e16796..ccb3c5002b4 100644 --- a/rpc/rpc-lib/src/protocol-common.h +++ b/rpc/rpc-lib/src/protocol-common.h @@ -360,4 +360,5 @@ typedef enum gf_get_snapshot_info_type gf_get_snapshot_info_type; #define GD_VOLUME_NAME_MAX 256 /* Maximum size of volume name */ +#define GLUSTER_PROCESS_UUID_FMT "CTX_ID:%s-GRAPH_ID:%d-PID:%d-HOST:%s-PC_NAME:%s-RECON_NO:%s" #endif /* !_PROTOCOL_COMMON_H */ |