SlideShare a Scribd company logo
Glusterfs Session #7
client, server interactions
Scope
- Server init with all programs
- Client Connection - interaction with server xlator
- Client disconnection - interaction with server xlator
- Client reconnection - interaction with server xlator
Server init
- Server xlator sets up auth and programs it supports in the initialization of the
translator
- Demo server_init
Client connection
- On Graph’s PARENT_UP notification rpc-clnt starts connecting to the brick.
- Client first connects to glusterd on the node where the brick is located.
- Once the connection is successful client asks glusterd for the port the brick is running on
- Once it gets the port information, connection with glusterd is disconnected.
- Connection to the brick is established with the port information received from glusterd
Client connection - continued
- After successful connection with the brick
- DUMP_OP rpc is sent to the brick to get the supported programs and their versions
- Decides the version it will use for the fop rpcs v3 vs v4, newer clients go for v4 if the server
has the support, otherwise v3.
- HNDSHK_SETVOLUME rpc is sent now with the credentials and options the clients wants
from the server
- If server accepts the SETVOLUME, we have a successful connection on which glusterfs rpcs
can be sent.
Client connection - continued
- Server will setup the necessary structures(client_t) to make sure the
resources can be cleaned up in case there is a disconnect.
- Client_t data structure Code
Client disconnection
- Client can disconnect because of the following reasons
- Explicit disconnect either from client(graph switch) or server(auth changes)
- Process dying
- client/server Machine shutting off
- Network issues
- On client
- all the open fds are marked bad, further fops on these fds would fail with EBADF.
- Reconnection timers are started which would attempt reconnection.
Client disconnection - continued
- On disconnect server will get a disconnect event and server_rpc_notify will
- cleanup all the resources like locks, open fds.
- All the ongoing requests will be errored while responding because the socket is disconnected
- Structures corresponding to the connection will be cleaned up
- Client_destroy, client_disconnect callbacks are called for each xlator
- Code
Client reconnection
- If client disconnected from server but the client process is still running, then
client will keep trying to reconnect every 3 seconds.
- Each connection attempt would be similar to the connection sequence. The
only difference would be the client connection id will have the reconnection
number incremented
- Once the connection is restored client tries to recover the resources on the
connection like open fds. At the moment locks are not restored.
Client reconnection - continued
- For all the fds that are marked bad in client, a reopen request is sent to the
server. This is best-effort. If reopens for any files/directories fail the fd would
still be bad and would continue to give EBADF.
- Once re-opens are completed the client xlator will notify the parents
CHILD_UP event. New traffic on that xlator will start coming from this time
onwards.
- Code
Q & A

More Related Content

PPTX
Autosupport email sending failed issue netapp cluster mode-
TXT
Ifr tool log
PPTX
Interceptor in mule
PPTX
NetScaler Web2.0 Push Technology Overview
PPTX
04 22-2018-tcpdump red-80
PDF
MMS Automation In Action!
PDF
Autobots @ REA
PDF
Analyzing network packets Using Wireshark
Autosupport email sending failed issue netapp cluster mode-
Ifr tool log
Interceptor in mule
NetScaler Web2.0 Push Technology Overview
04 22-2018-tcpdump red-80
MMS Automation In Action!
Autobots @ REA
Analyzing network packets Using Wireshark

Similar to Glusterfs session #7 client, server interactions (20)

PDF
Debugging with-wireshark-niels-de-vos
PDF
Gluster dev session #6 understanding gluster's network communication layer
DOCX
Remote Procedure Call
PDF
Introduction To Distributed Erlang
DOCX
Rpc mechanism
PPT
remote procedure calls
PPT
Chapter 2B-Communication.ppt
PDF
Introduction to Erlang Part 2
PPTX
CN_U3P2_RPC_design_issues.pptx,CN unit1pr1.pdf where it is useful for the thi...
PDF
BSD Sockets API in Zephyr RTOS - SFO17-108
PPT
DS-Chapter DDEFR2-Communication_105220.ppt
KEY
Polyglot parallelism
PDF
5. Distributed Operating Systems
PDF
Distributed Reactive Services with Reactor & Spring - Stéphane Maldini
PDF
Rest, sockets em golang
PDF
netLec5.pdf
PPTX
Network sockets
PDF
Of the variedtypes of IPC, sockets arout and awaythe foremostcommon..pdf
Debugging with-wireshark-niels-de-vos
Gluster dev session #6 understanding gluster's network communication layer
Remote Procedure Call
Introduction To Distributed Erlang
Rpc mechanism
remote procedure calls
Chapter 2B-Communication.ppt
Introduction to Erlang Part 2
CN_U3P2_RPC_design_issues.pptx,CN unit1pr1.pdf where it is useful for the thi...
BSD Sockets API in Zephyr RTOS - SFO17-108
DS-Chapter DDEFR2-Communication_105220.ppt
Polyglot parallelism
5. Distributed Operating Systems
Distributed Reactive Services with Reactor & Spring - Stéphane Maldini
Rest, sockets em golang
netLec5.pdf
Network sockets
Of the variedtypes of IPC, sockets arout and awaythe foremostcommon..pdf
Ad

More from Pranith Karampuri (15)

PDF
Glusterfs session #18 intro to fuse and its trade offs
PDF
Glusterfs session #12 locks xlator posixlk
PDF
Glusterfs session #17 self heal daemon data, metadata, entry healing
PDF
Glusterfs session #16 self-heal daemon ( for replication)
PDF
Glusterfs session #14 replication update fops
PDF
Glusterfs session #13 replication introduction
PDF
Glusterfs session #11 locks xlator entrylks
PDF
Glusterfs session #10 locks xlator inodelks
PDF
Glusterfs session #9 index xlator
PDF
Glusterfs session #8 memory tracking infra, io-threads
PDF
Glusterfs session #5 inode t, fd-t lifecycles
PDF
Glusterfs session #4 call frame and programming model
PDF
Gluster dev session #3 xlator interface
PDF
Glusterfs session #2 1 layer above disk filesystems
PDF
Glusterfs session #1 disk filesystems
Glusterfs session #18 intro to fuse and its trade offs
Glusterfs session #12 locks xlator posixlk
Glusterfs session #17 self heal daemon data, metadata, entry healing
Glusterfs session #16 self-heal daemon ( for replication)
Glusterfs session #14 replication update fops
Glusterfs session #13 replication introduction
Glusterfs session #11 locks xlator entrylks
Glusterfs session #10 locks xlator inodelks
Glusterfs session #9 index xlator
Glusterfs session #8 memory tracking infra, io-threads
Glusterfs session #5 inode t, fd-t lifecycles
Glusterfs session #4 call frame and programming model
Gluster dev session #3 xlator interface
Glusterfs session #2 1 layer above disk filesystems
Glusterfs session #1 disk filesystems
Ad

Recently uploaded (20)

PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
Cell Structure & Organelles in detailed.
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PDF
Basic Mud Logging Guide for educational purpose
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PDF
Sports Quiz easy sports quiz sports quiz
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Classroom Observation Tools for Teachers
PDF
RMMM.pdf make it easy to upload and study
PPTX
Lesson notes of climatology university.
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Supply Chain Operations Speaking Notes -ICLT Program
PDF
Insiders guide to clinical Medicine.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Pharma ospi slides which help in ospi learning
Pharmacology of Heart Failure /Pharmacotherapy of CHF
Cell Structure & Organelles in detailed.
STATICS OF THE RIGID BODIES Hibbelers.pdf
Basic Mud Logging Guide for educational purpose
human mycosis Human fungal infections are called human mycosis..pptx
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Sports Quiz easy sports quiz sports quiz
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
ANTIBIOTICS.pptx.pdf………………… xxxxxxxxxxxxx
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Classroom Observation Tools for Teachers
RMMM.pdf make it easy to upload and study
Lesson notes of climatology university.
PPH.pptx obstetrics and gynecology in nursing
Abdominal Access Techniques with Prof. Dr. R K Mishra
Supply Chain Operations Speaking Notes -ICLT Program
Insiders guide to clinical Medicine.pdf
O7-L3 Supply Chain Operations - ICLT Program
Pharma ospi slides which help in ospi learning

Glusterfs session #7 client, server interactions

  • 1. Glusterfs Session #7 client, server interactions
  • 2. Scope - Server init with all programs - Client Connection - interaction with server xlator - Client disconnection - interaction with server xlator - Client reconnection - interaction with server xlator
  • 3. Server init - Server xlator sets up auth and programs it supports in the initialization of the translator - Demo server_init
  • 4. Client connection - On Graph’s PARENT_UP notification rpc-clnt starts connecting to the brick. - Client first connects to glusterd on the node where the brick is located. - Once the connection is successful client asks glusterd for the port the brick is running on - Once it gets the port information, connection with glusterd is disconnected. - Connection to the brick is established with the port information received from glusterd
  • 5. Client connection - continued - After successful connection with the brick - DUMP_OP rpc is sent to the brick to get the supported programs and their versions - Decides the version it will use for the fop rpcs v3 vs v4, newer clients go for v4 if the server has the support, otherwise v3. - HNDSHK_SETVOLUME rpc is sent now with the credentials and options the clients wants from the server - If server accepts the SETVOLUME, we have a successful connection on which glusterfs rpcs can be sent.
  • 6. Client connection - continued - Server will setup the necessary structures(client_t) to make sure the resources can be cleaned up in case there is a disconnect. - Client_t data structure Code
  • 7. Client disconnection - Client can disconnect because of the following reasons - Explicit disconnect either from client(graph switch) or server(auth changes) - Process dying - client/server Machine shutting off - Network issues - On client - all the open fds are marked bad, further fops on these fds would fail with EBADF. - Reconnection timers are started which would attempt reconnection.
  • 8. Client disconnection - continued - On disconnect server will get a disconnect event and server_rpc_notify will - cleanup all the resources like locks, open fds. - All the ongoing requests will be errored while responding because the socket is disconnected - Structures corresponding to the connection will be cleaned up - Client_destroy, client_disconnect callbacks are called for each xlator - Code
  • 9. Client reconnection - If client disconnected from server but the client process is still running, then client will keep trying to reconnect every 3 seconds. - Each connection attempt would be similar to the connection sequence. The only difference would be the client connection id will have the reconnection number incremented - Once the connection is restored client tries to recover the resources on the connection like open fds. At the moment locks are not restored.
  • 10. Client reconnection - continued - For all the fds that are marked bad in client, a reopen request is sent to the server. This is best-effort. If reopens for any files/directories fail the fd would still be bad and would continue to give EBADF. - Once re-opens are completed the client xlator will notify the parents CHILD_UP event. New traffic on that xlator will start coming from this time onwards. - Code
  • 11. Q & A