SlideShare una empresa de Scribd logo
1 de 20
Descargar para leer sin conexión
Debugging GlusterFS protocols with
help from Wireshark
Niels de Vos
Software Maintenance Engineer
Global Support Services
Red Hat, Inc.
Gluster Workshop
Barcelona, November 2012
Gluster & Wireshark | Niels de Vos8 November 2012
Agenda
● Some typical use-cases
● Different protocols used by Gluster
● Capturing the network traffic
● Browsing network traces with Wireshark
● Correlate the trace with the events or logs
Gluster & Wireshark | Niels de Vos8 November 2012
Applications of Wireshark
● Troubleshooting (non)working environments
● Debugging during development
● Performance checking
● Auditing of network traffic
Gluster & Wireshark | Niels de Vos8 November 2012
General protocol details
● All calls and replies are RPC based as defined
in RFC 5531 “Remote Procedure Call Protocol
Specification Version 2”
● Standard for programs, procedures and versions
● AUTH_FLAVOR (credentials) is Gluster specific
● The encoding of parameters and structures is
done in the “External Data Representation
Standard” (XDR, RFC 4506, 'man 3 xdr')
Gluster & Wireshark | Niels de Vos8 November 2012
Overview of Gluster components
● gluster commandine
● glusterd management daemon
● glusterfsd for brick access
● glusterfs as a FUSE-client and NFS-server
glusterd is the center of everything and talks to all
components, each with their own protocol.
Gluster & Wireshark | Niels de Vos8 November 2012
Used ports
● Everything is TCP
● Outgoing connections use a port < 1024 by
default
● glusterd listens on port tcp/24007 (rdma/24008)
● glusterfsd (brick) listens on port >= 24009
● The NFSv3 server (a glusterfs process) listens
on ports 38465-38467
● Registered in the standard portmapper (port 111)
● NLM (locking) uses port 38468
Gluster & Wireshark | Niels de Vos8 November 2012
The Gluster CLI protocol
● Used between the client 'gluster' command and
the service 'glusterd'
● Normally 'gluster' connects to 'localhost'
● Some common operations:
● CREATE_VOLUME, START_VOLUME,
GET_VOLUME, ADD_BRICK
Gluster & Wireshark | Niels de Vos8 November 2012
The GlusterD Management protocol
● Used for coordination between different
glusterd instances
● Part of glusterd, using port 24007
● Common operations:
● CLUSTER_(UN)LOCK, STAGE_OP, COMMIT_OP
Gluster & Wireshark | Niels de Vos8 November 2012
The Gluster DUMP protocol
● Used for discovering the available RPC
programs and versions of an other glusterd
processes
● Part of glusterd, using port 24007
● Only one operation:
● DUMP
Gluster & Wireshark | Niels de Vos8 November 2012
The GlusterD Friend protocol
● Interactions about peer changes
● Part of glusterd, using port 24007
● Some common operations:
● PROBE_QUERY, ADD, UPDATE
Gluster & Wireshark | Niels de Vos8 November 2012
The Gluster Portmap protocol
● Handled by glusterd on port 24007
● glusterfsd (brick) informs glusterd what port is
used
● glusterfs (client) retrieves the port for a brick
● Common operations:
● PORTBYBRICK, SIGNIN, SIGNOUT
Gluster & Wireshark | Niels de Vos8 November 2012
The GlusterFS Callback protocol
● Notifications to glusterd processes
● Handled by glusterd on port 24007
● Only one operation used:
● FETCHSPEC
Gluster & Wireshark | Niels de Vos8 November 2012
The GlusterFS Handshake protocol
● glusterfs (client) processes communicate with
glusterfsd (brick) processes
● glusterfs (client) processes request the latest
vol-file from glusterd
● Usage management and accounting
● Client identifies itself when using a brick
● Some common operations:
● GETSPEC, SETVOLUME, LOCK_VERSION
Gluster & Wireshark | Niels de Vos8 November 2012
The GlusterFS protocol
● glusterfs (client) talks to glusterfsd (brick)
● Implements the actual filesystem procedures
● Some common operations:
● LOOKUP, CREATE, UNLINK, OPEN, RELEASE,
READ, WRITE, READDIRP
Gluster & Wireshark | Niels de Vos8 November 2012
Capturing network traffic
● Use tcpdump:
# tcpdump -s 0 -i any -w /tmp/dump.pcap 
tcp and portrange 24007-24050
● When capturing on a storage server:
● Change the portrange to match the specific bricks
● Add a filter for the client IP-address
● Use gzip to compress the .pcap file, Wireshark
knows how to read .pcap.gz files
● Use editcap to trim big captures
Gluster & Wireshark | Niels de Vos8 November 2012
Browsing packets in Wireshark
● Remove all (uninteresting) empty packets
● Filter: tcp.len > 0
● Filter by protocol
● Right click on the protocol in the 'Packet Details'
● Select 'Apply as Silter'
● Click 'Selected'
Gluster & Wireshark | Niels de Vos8 November 2012
Use Case: Adobe InDesign crashes
● Issue:
Adobe InDesign crashes on occasion when
editing files on a Samba share
● Error in the log:
0-data-client-1: remote operation failed: Operation not permitted
0-data-client-0: remote operation failed: Operation not permitted
0-glusterfs-fuse: 971574587: SETATTR() /dir/filename.ext => -1 (Operation not permitted)
● Diagnostics:
● Check file permissions, owner and group
● Compare with RPC Credentials of the
SETATTR procedure
Gluster & Wireshark | Niels de Vos8 November 2012
Use Case: Adobe InDesign crashes
● Result:
● Permissions on the file are too strict
● SETATTR should indeed be denied
● Solution:
Force permissions through the Samba
configuration and open a support case at Adobe
to check the return value of the chmod(2) call.
More details in the related article on the Red Hat Customer Portal, or on request.
Gluster & Wireshark | Niels de Vos8 November 2012
What if decoding fails?
● Wireshark tries to detect protocols by well
known port numbers. If STUN, SSL,
TURNCHANNEL, PCEP or others are detected,
disable these through the 'Analyze' and
'Enabled Protocols' menu.
● Some lesser used procedures are not decoded
yet. A few will only show 'Data (.. bytes)' and no
further details.
● It may be a bug in Wireshark or a change in the
protocol.
Thanks!
Questions, comments etc. are welcome.
Niels de Vos
ndevos@redhat.com
ndevos in #gluster

Más contenido relacionado

La actualidad más candente

Gluster fs tutorial part 2 gluster and big data- gluster for devs and sys ...
Gluster fs tutorial   part 2  gluster and big data- gluster for devs and sys ...Gluster fs tutorial   part 2  gluster and big data- gluster for devs and sys ...
Gluster fs tutorial part 2 gluster and big data- gluster for devs and sys ...
Tommy Lee
 

La actualidad más candente (20)

GlusterD 2.0 - Managing Distributed File System Using a Centralized Store
GlusterD 2.0 - Managing Distributed File System Using a Centralized StoreGlusterD 2.0 - Managing Distributed File System Using a Centralized Store
GlusterD 2.0 - Managing Distributed File System Using a Centralized Store
 
Sdc 2012-challenges
Sdc 2012-challengesSdc 2012-challenges
Sdc 2012-challenges
 
Glusterfs for sysadmins-justin_clift
Glusterfs for sysadmins-justin_cliftGlusterfs for sysadmins-justin_clift
Glusterfs for sysadmins-justin_clift
 
Lcna 2012-tutorial
Lcna 2012-tutorialLcna 2012-tutorial
Lcna 2012-tutorial
 
20160401 guster-roadmap
20160401 guster-roadmap20160401 guster-roadmap
20160401 guster-roadmap
 
Smb gluster devmar2013
Smb gluster devmar2013Smb gluster devmar2013
Smb gluster devmar2013
 
Qemu gluster fs
Qemu gluster fsQemu gluster fs
Qemu gluster fs
 
Gluster for sysadmins
Gluster for sysadminsGluster for sysadmins
Gluster for sysadmins
 
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
 
Gluster d2
Gluster d2Gluster d2
Gluster d2
 
Gluster intro-tdose
Gluster intro-tdoseGluster intro-tdose
Gluster intro-tdose
 
Gluster fs hadoop_fifth-elephant
Gluster fs hadoop_fifth-elephantGluster fs hadoop_fifth-elephant
Gluster fs hadoop_fifth-elephant
 
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
Integrating gluster fs,_qemu_and_ovirt-vijay_bellur-linuxcon_eu_2013
 
Gluster overview & future directions vault 2015
Gluster overview & future directions vault 2015Gluster overview & future directions vault 2015
Gluster overview & future directions vault 2015
 
Red Hat Gluster Storage : GlusterFS
Red Hat Gluster Storage : GlusterFSRed Hat Gluster Storage : GlusterFS
Red Hat Gluster Storage : GlusterFS
 
Gluster intro-tdose
Gluster intro-tdoseGluster intro-tdose
Gluster intro-tdose
 
Gluster fs tutorial part 2 gluster and big data- gluster for devs and sys ...
Gluster fs tutorial   part 2  gluster and big data- gluster for devs and sys ...Gluster fs tutorial   part 2  gluster and big data- gluster for devs and sys ...
Gluster fs tutorial part 2 gluster and big data- gluster for devs and sys ...
 
Gluster fs current_features_and_roadmap
Gluster fs current_features_and_roadmapGluster fs current_features_and_roadmap
Gluster fs current_features_and_roadmap
 
Accessing gluster ufo_-_eco_willson
Accessing gluster ufo_-_eco_willsonAccessing gluster ufo_-_eco_willson
Accessing gluster ufo_-_eco_willson
 
On demand file-caching_-_gustavo_brand
On demand file-caching_-_gustavo_brandOn demand file-caching_-_gustavo_brand
On demand file-caching_-_gustavo_brand
 

Destacado

Destacado (19)

Sdc challenges-2012
Sdc challenges-2012Sdc challenges-2012
Sdc challenges-2012
 
State of the_gluster_-_lceu
State of the_gluster_-_lceuState of the_gluster_-_lceu
State of the_gluster_-_lceu
 
Gsummit apis-2013
Gsummit apis-2013Gsummit apis-2013
Gsummit apis-2013
 
Lcna tutorial-2012
Lcna tutorial-2012Lcna tutorial-2012
Lcna tutorial-2012
 
Disperse xlator ramon_datalab
Disperse xlator ramon_datalabDisperse xlator ramon_datalab
Disperse xlator ramon_datalab
 
Hands On Gluster with Jeff Darcy
Hands On Gluster with Jeff DarcyHands On Gluster with Jeff Darcy
Hands On Gluster with Jeff Darcy
 
Gsummit apis-2012
Gsummit apis-2012Gsummit apis-2012
Gsummit apis-2012
 
Gluster as Block Store in Containers
Gluster as Block Store in ContainersGluster as Block Store in Containers
Gluster as Block Store in Containers
 
Tiering barcelona
Tiering barcelonaTiering barcelona
Tiering barcelona
 
YDAL Barcelona
YDAL BarcelonaYDAL Barcelona
YDAL Barcelona
 
Lcna example-2012
Lcna example-2012Lcna example-2012
Lcna example-2012
 
Gluster d thread_synchronization_using_urcu_lca2016
Gluster d thread_synchronization_using_urcu_lca2016Gluster d thread_synchronization_using_urcu_lca2016
Gluster d thread_synchronization_using_urcu_lca2016
 
Join the super_colony_-_feb2013
Join the super_colony_-_feb2013Join the super_colony_-_feb2013
Join the super_colony_-_feb2013
 
Gdeploy 2.0
Gdeploy 2.0Gdeploy 2.0
Gdeploy 2.0
 
Bug triage in_gluster
Bug triage in_glusterBug triage in_gluster
Bug triage in_gluster
 
Developing apps and_integrating_with_gluster_fs_-_libgfapi
Developing apps and_integrating_with_gluster_fs_-_libgfapiDeveloping apps and_integrating_with_gluster_fs_-_libgfapi
Developing apps and_integrating_with_gluster_fs_-_libgfapi
 
Dedupe nmamit
Dedupe nmamitDedupe nmamit
Dedupe nmamit
 
Introduction to Open Source
Introduction to Open SourceIntroduction to Open Source
Introduction to Open Source
 
20160130 Gluster-roadmap
20160130 Gluster-roadmap20160130 Gluster-roadmap
20160130 Gluster-roadmap
 

Similar a Gluster wireshark niels_de_vos

OSDC 2015: Roland Kammerer | DRBD9: Managing High-Available Storage in Many-N...
OSDC 2015: Roland Kammerer | DRBD9: Managing High-Available Storage in Many-N...OSDC 2015: Roland Kammerer | DRBD9: Managing High-Available Storage in Many-N...
OSDC 2015: Roland Kammerer | DRBD9: Managing High-Available Storage in Many-N...
NETWAYS
 

Similar a Gluster wireshark niels_de_vos (20)

OSDC 2013 | Distributed Storage with GlusterFS by Dr. Udo Seidel
OSDC 2013 | Distributed Storage with GlusterFS by Dr. Udo SeidelOSDC 2013 | Distributed Storage with GlusterFS by Dr. Udo Seidel
OSDC 2013 | Distributed Storage with GlusterFS by Dr. Udo Seidel
 
Scaling Redis: Dmitry Polyakovsky
Scaling Redis: Dmitry PolyakovskyScaling Redis: Dmitry Polyakovsky
Scaling Redis: Dmitry Polyakovsky
 
Janus & docker: friends or foe
Janus & docker: friends or foe Janus & docker: friends or foe
Janus & docker: friends or foe
 
Gluster dev session #6 understanding gluster's network communication layer
Gluster dev session #6  understanding gluster's network   communication layerGluster dev session #6  understanding gluster's network   communication layer
Gluster dev session #6 understanding gluster's network communication layer
 
NetFlow Data processing using Hadoop and Vertica
NetFlow Data processing using Hadoop and VerticaNetFlow Data processing using Hadoop and Vertica
NetFlow Data processing using Hadoop and Vertica
 
Building a Dynamic Rules Engine with Kafka Streams
Building a Dynamic Rules Engine with Kafka StreamsBuilding a Dynamic Rules Engine with Kafka Streams
Building a Dynamic Rules Engine with Kafka Streams
 
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
Como creamos QuestDB Cloud, un SaaS basado en Kubernetes alrededor de QuestDB...
 
Kubernetes Networking - Giragadurai Vallirajan
Kubernetes Networking - Giragadurai VallirajanKubernetes Networking - Giragadurai Vallirajan
Kubernetes Networking - Giragadurai Vallirajan
 
Lt2013 glusterfs.talk
Lt2013 glusterfs.talkLt2013 glusterfs.talk
Lt2013 glusterfs.talk
 
Swarm: Native Docker Clustering
Swarm: Native Docker ClusteringSwarm: Native Docker Clustering
Swarm: Native Docker Clustering
 
What’s New in NGINX Plus R15? - EMEA
What’s New in NGINX Plus R15? - EMEAWhat’s New in NGINX Plus R15? - EMEA
What’s New in NGINX Plus R15? - EMEA
 
OSDC 2015: Roland Kammerer | DRBD9: Managing High-Available Storage in Many-N...
OSDC 2015: Roland Kammerer | DRBD9: Managing High-Available Storage in Many-N...OSDC 2015: Roland Kammerer | DRBD9: Managing High-Available Storage in Many-N...
OSDC 2015: Roland Kammerer | DRBD9: Managing High-Available Storage in Many-N...
 
MySQL X protocol - Talking to MySQL Directly over the Wire
MySQL X protocol - Talking to MySQL Directly over the WireMySQL X protocol - Talking to MySQL Directly over the Wire
MySQL X protocol - Talking to MySQL Directly over the Wire
 
Layer 7 Firewall on Mikrotik
Layer 7 Firewall on MikrotikLayer 7 Firewall on Mikrotik
Layer 7 Firewall on Mikrotik
 
Best practices for optimizing Red Hat platforms for large scale datacenter de...
Best practices for optimizing Red Hat platforms for large scale datacenter de...Best practices for optimizing Red Hat platforms for large scale datacenter de...
Best practices for optimizing Red Hat platforms for large scale datacenter de...
 
From NAT to NAT Traversal
From NAT to NAT TraversalFrom NAT to NAT Traversal
From NAT to NAT Traversal
 
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
03_clere-HTTP2 HTTP3 the State of the Art in Our Servers.pdf
 
Kubernetes Networking
Kubernetes NetworkingKubernetes Networking
Kubernetes Networking
 
MTCNA Intro to routerOS
MTCNA Intro to routerOSMTCNA Intro to routerOS
MTCNA Intro to routerOS
 
Presentation 12c grid_upgrade
Presentation 12c grid_upgradePresentation 12c grid_upgrade
Presentation 12c grid_upgrade
 

Más de Gluster.org

nfusr: a new userspace NFS client based on libnfs - Shreyas Siravara
nfusr: a new userspace NFS client based on libnfs - Shreyas Siravaranfusr: a new userspace NFS client based on libnfs - Shreyas Siravara
nfusr: a new userspace NFS client based on libnfs - Shreyas Siravara
Gluster.org
 
Facebook’s upstream approach to GlusterFS - David Hasson
Facebook’s upstream approach to GlusterFS  - David HassonFacebook’s upstream approach to GlusterFS  - David Hasson
Facebook’s upstream approach to GlusterFS - David Hasson
Gluster.org
 

Más de Gluster.org (20)

Automating Gluster @ Facebook - Shreyas Siravara
Automating Gluster @ Facebook - Shreyas SiravaraAutomating Gluster @ Facebook - Shreyas Siravara
Automating Gluster @ Facebook - Shreyas Siravara
 
nfusr: a new userspace NFS client based on libnfs - Shreyas Siravara
nfusr: a new userspace NFS client based on libnfs - Shreyas Siravaranfusr: a new userspace NFS client based on libnfs - Shreyas Siravara
nfusr: a new userspace NFS client based on libnfs - Shreyas Siravara
 
Facebook’s upstream approach to GlusterFS - David Hasson
Facebook’s upstream approach to GlusterFS  - David HassonFacebook’s upstream approach to GlusterFS  - David Hasson
Facebook’s upstream approach to GlusterFS - David Hasson
 
Throttling Traffic at Facebook Scale
Throttling Traffic at Facebook ScaleThrottling Traffic at Facebook Scale
Throttling Traffic at Facebook Scale
 
GlusterFS w/ Tiered XFS
GlusterFS w/ Tiered XFS  GlusterFS w/ Tiered XFS
GlusterFS w/ Tiered XFS
 
Gluster Metrics: why they are crucial for running stable deployments of all s...
Gluster Metrics: why they are crucial for running stable deployments of all s...Gluster Metrics: why they are crucial for running stable deployments of all s...
Gluster Metrics: why they are crucial for running stable deployments of all s...
 
Up and Running with Glusto & Glusto-Tests in 5 Minutes (or less)
Up and Running with Glusto & Glusto-Tests in 5 Minutes (or less)Up and Running with Glusto & Glusto-Tests in 5 Minutes (or less)
Up and Running with Glusto & Glusto-Tests in 5 Minutes (or less)
 
Data Reduction for Gluster with VDO
Data Reduction for Gluster with VDOData Reduction for Gluster with VDO
Data Reduction for Gluster with VDO
 
Releases: What are contributors responsible for
Releases: What are contributors responsible forReleases: What are contributors responsible for
Releases: What are contributors responsible for
 
RIO Distribution: Reconstructing the onion - Shyamsundar Ranganathan
RIO Distribution: Reconstructing the onion - Shyamsundar RanganathanRIO Distribution: Reconstructing the onion - Shyamsundar Ranganathan
RIO Distribution: Reconstructing the onion - Shyamsundar Ranganathan
 
Gluster and Kubernetes
Gluster and KubernetesGluster and Kubernetes
Gluster and Kubernetes
 
Native Clients, more the merrier with GFProxy!
Native Clients, more the merrier with GFProxy!Native Clients, more the merrier with GFProxy!
Native Clients, more the merrier with GFProxy!
 
Gluster: a SWOT Analysis
Gluster: a SWOT Analysis Gluster: a SWOT Analysis
Gluster: a SWOT Analysis
 
GlusterD-2.0: What's Happening? - Kaushal Madappa
GlusterD-2.0: What's Happening? - Kaushal MadappaGlusterD-2.0: What's Happening? - Kaushal Madappa
GlusterD-2.0: What's Happening? - Kaushal Madappa
 
Scalability and Performance of CNS 3.6
Scalability and Performance of CNS 3.6Scalability and Performance of CNS 3.6
Scalability and Performance of CNS 3.6
 
What Makes Us Fail
What Makes Us FailWhat Makes Us Fail
What Makes Us Fail
 
Gluster as Native Storage for Containers - past, present and future
Gluster as Native Storage for Containers - past, present and futureGluster as Native Storage for Containers - past, present and future
Gluster as Native Storage for Containers - past, present and future
 
Heketi Functionality into Glusterd2
Heketi Functionality into Glusterd2Heketi Functionality into Glusterd2
Heketi Functionality into Glusterd2
 
Architecture of the High Availability Solution for Ganesha and Samba with Kal...
Architecture of the High Availability Solution for Ganesha and Samba with Kal...Architecture of the High Availability Solution for Ganesha and Samba with Kal...
Architecture of the High Availability Solution for Ganesha and Samba with Kal...
 
Challenges with Gluster and Persistent Memory with Dan Lambright
Challenges with Gluster and Persistent Memory with Dan LambrightChallenges with Gluster and Persistent Memory with Dan Lambright
Challenges with Gluster and Persistent Memory with Dan Lambright
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Último (20)

AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 

Gluster wireshark niels_de_vos

  • 1. Debugging GlusterFS protocols with help from Wireshark Niels de Vos Software Maintenance Engineer Global Support Services Red Hat, Inc. Gluster Workshop Barcelona, November 2012
  • 2. Gluster & Wireshark | Niels de Vos8 November 2012 Agenda ● Some typical use-cases ● Different protocols used by Gluster ● Capturing the network traffic ● Browsing network traces with Wireshark ● Correlate the trace with the events or logs
  • 3. Gluster & Wireshark | Niels de Vos8 November 2012 Applications of Wireshark ● Troubleshooting (non)working environments ● Debugging during development ● Performance checking ● Auditing of network traffic
  • 4. Gluster & Wireshark | Niels de Vos8 November 2012 General protocol details ● All calls and replies are RPC based as defined in RFC 5531 “Remote Procedure Call Protocol Specification Version 2” ● Standard for programs, procedures and versions ● AUTH_FLAVOR (credentials) is Gluster specific ● The encoding of parameters and structures is done in the “External Data Representation Standard” (XDR, RFC 4506, 'man 3 xdr')
  • 5. Gluster & Wireshark | Niels de Vos8 November 2012 Overview of Gluster components ● gluster commandine ● glusterd management daemon ● glusterfsd for brick access ● glusterfs as a FUSE-client and NFS-server glusterd is the center of everything and talks to all components, each with their own protocol.
  • 6. Gluster & Wireshark | Niels de Vos8 November 2012 Used ports ● Everything is TCP ● Outgoing connections use a port < 1024 by default ● glusterd listens on port tcp/24007 (rdma/24008) ● glusterfsd (brick) listens on port >= 24009 ● The NFSv3 server (a glusterfs process) listens on ports 38465-38467 ● Registered in the standard portmapper (port 111) ● NLM (locking) uses port 38468
  • 7. Gluster & Wireshark | Niels de Vos8 November 2012 The Gluster CLI protocol ● Used between the client 'gluster' command and the service 'glusterd' ● Normally 'gluster' connects to 'localhost' ● Some common operations: ● CREATE_VOLUME, START_VOLUME, GET_VOLUME, ADD_BRICK
  • 8. Gluster & Wireshark | Niels de Vos8 November 2012 The GlusterD Management protocol ● Used for coordination between different glusterd instances ● Part of glusterd, using port 24007 ● Common operations: ● CLUSTER_(UN)LOCK, STAGE_OP, COMMIT_OP
  • 9. Gluster & Wireshark | Niels de Vos8 November 2012 The Gluster DUMP protocol ● Used for discovering the available RPC programs and versions of an other glusterd processes ● Part of glusterd, using port 24007 ● Only one operation: ● DUMP
  • 10. Gluster & Wireshark | Niels de Vos8 November 2012 The GlusterD Friend protocol ● Interactions about peer changes ● Part of glusterd, using port 24007 ● Some common operations: ● PROBE_QUERY, ADD, UPDATE
  • 11. Gluster & Wireshark | Niels de Vos8 November 2012 The Gluster Portmap protocol ● Handled by glusterd on port 24007 ● glusterfsd (brick) informs glusterd what port is used ● glusterfs (client) retrieves the port for a brick ● Common operations: ● PORTBYBRICK, SIGNIN, SIGNOUT
  • 12. Gluster & Wireshark | Niels de Vos8 November 2012 The GlusterFS Callback protocol ● Notifications to glusterd processes ● Handled by glusterd on port 24007 ● Only one operation used: ● FETCHSPEC
  • 13. Gluster & Wireshark | Niels de Vos8 November 2012 The GlusterFS Handshake protocol ● glusterfs (client) processes communicate with glusterfsd (brick) processes ● glusterfs (client) processes request the latest vol-file from glusterd ● Usage management and accounting ● Client identifies itself when using a brick ● Some common operations: ● GETSPEC, SETVOLUME, LOCK_VERSION
  • 14. Gluster & Wireshark | Niels de Vos8 November 2012 The GlusterFS protocol ● glusterfs (client) talks to glusterfsd (brick) ● Implements the actual filesystem procedures ● Some common operations: ● LOOKUP, CREATE, UNLINK, OPEN, RELEASE, READ, WRITE, READDIRP
  • 15. Gluster & Wireshark | Niels de Vos8 November 2012 Capturing network traffic ● Use tcpdump: # tcpdump -s 0 -i any -w /tmp/dump.pcap tcp and portrange 24007-24050 ● When capturing on a storage server: ● Change the portrange to match the specific bricks ● Add a filter for the client IP-address ● Use gzip to compress the .pcap file, Wireshark knows how to read .pcap.gz files ● Use editcap to trim big captures
  • 16. Gluster & Wireshark | Niels de Vos8 November 2012 Browsing packets in Wireshark ● Remove all (uninteresting) empty packets ● Filter: tcp.len > 0 ● Filter by protocol ● Right click on the protocol in the 'Packet Details' ● Select 'Apply as Silter' ● Click 'Selected'
  • 17. Gluster & Wireshark | Niels de Vos8 November 2012 Use Case: Adobe InDesign crashes ● Issue: Adobe InDesign crashes on occasion when editing files on a Samba share ● Error in the log: 0-data-client-1: remote operation failed: Operation not permitted 0-data-client-0: remote operation failed: Operation not permitted 0-glusterfs-fuse: 971574587: SETATTR() /dir/filename.ext => -1 (Operation not permitted) ● Diagnostics: ● Check file permissions, owner and group ● Compare with RPC Credentials of the SETATTR procedure
  • 18. Gluster & Wireshark | Niels de Vos8 November 2012 Use Case: Adobe InDesign crashes ● Result: ● Permissions on the file are too strict ● SETATTR should indeed be denied ● Solution: Force permissions through the Samba configuration and open a support case at Adobe to check the return value of the chmod(2) call. More details in the related article on the Red Hat Customer Portal, or on request.
  • 19. Gluster & Wireshark | Niels de Vos8 November 2012 What if decoding fails? ● Wireshark tries to detect protocols by well known port numbers. If STUN, SSL, TURNCHANNEL, PCEP or others are detected, disable these through the 'Analyze' and 'Enabled Protocols' menu. ● Some lesser used procedures are not decoded yet. A few will only show 'Data (.. bytes)' and no further details. ● It may be a bug in Wireshark or a change in the protocol.
  • 20. Thanks! Questions, comments etc. are welcome. Niels de Vos ndevos@redhat.com ndevos in #gluster