Re: RPC service registration timeout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2008-04-04 at 14:54 -0400, Talpey, Thomas wrote:
> At 02:41 PM 4/4/2008, Chuck Lever wrote:
> >Use TCP instead of UDP to contact the local rpcbind daemon.  If  
> >rpcbind isn't listening, the connection is refused immediately, and  
> >the RPC client can tell without waiting for a timeout.
> 
> You can get a prompt error if you use UDP connected mode (call
> connect() on the UDP socket). Any ICMP port unreachable will
> flow back to an ECONNREFUSED error on the socket. This doesn't
> occur for unconnected UDP endpoints.

I hadn't realised that was a feature of connected UDP sockets, but
that's a good point.

> >We would have to create a new RPC_CLNT_CREATE_FOO flag that tells the  
> >client to fail an RPC immediately if the connection is refused (kind  
> >of like the old "one shot" flag).  This shouldn't be the default  
> >behavior.

> Sounds reasonable. But, a port unreachable error should generally
> be a "hard" indication, since it does come from the remote host,
> or a middlebox acting as its proxy. In other words, any reasonably
> small number of retries would all receive the same response. This is
> much like a TCP RST - not a transitory event. UDP errors such as
> host unreachable or network down (which come from the infrastructure
> not the server) should not of course be considered this way and
> retry is appropriate.
> 
> Bottom line, I think it might actually be a useful default. Why does
> the client currently retry ECONNREFUSED for port resolution?

The client currently doesn't retry in the case of a connection failing
for a soft RPC request. For hard RPC requests then it _must_ retry the
connection, but it does so using an exponential backoff rule.

Note that the NFSv4.1 channel bindings will probably force us to change
this...

Cheers
  Trond
-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@xxxxxxxxxx
www.netapp.com
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux