Bug 916390 - NLM acquires lock before confirming callback path to client
Summary: NLM acquires lock before confirming callback path to client
Keywords:
Status: CLOSED EOL
Alias: None
Product: GlusterFS
Classification: Community
Component: nfs
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anand Subramanian
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-28 00:16 UTC by Anand Avati
Modified: 2016-01-04 04:40 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-10-22 15:46:38 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Anand Avati 2013-02-28 00:16:12 UTC
NLM of Gluster fails "out of the box" with RHEL and Fedora clients in the locks test -- because of the presence of firewall. Currently all blocking locks are unconditionally replied as "blocked" and grant notification is performed via callback connection to the client. Because of this even the simplest of the lock tests fail in out-of-box config of both RHEL and Fedora which have firewalls enabled by default. There are at least two changes required for better behavior.

1. Attempt a blocking NLM request in non-blocking lk(F_SETLK) first and check if lock can be obtained without any waits. If success, return success for the original RPC request and get done with. If the nonblocking lk(F_SETLK) fails, only then reply "blocked" to the original RPC request and perform lk(F_SETLKW) fop (and asynchronously notify grant via callback connection)

2. Confirm reachability of NLM client via callback channel before initiating lk(F_SETLKW). For this a simple ping RPC can be performed (or even NLMv4 TEST procedure). This offers protection against the situation where an a lock attempt from a client which has a firewall unintentionlly configured, can get granted asynchronously but never get notified at the client. Now the client can never unlock, and no other client can acquire the lock either, resulting in a deadlock.

Comment 2 Kaleb KEITHLEY 2015-10-22 15:46:38 UTC
because of the large number of bugs filed against mainline version\ is ambiguous and about to be removed as a choice.

If you believe this is still a bug, please change the status back to NEW and choose the appropriate, applicable version for it.


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