Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Feb 1995 21:36:41 -0500 (EST)
From:      Wankle Rotary Engine <wpaul@skynet.ctr.columbia.edu>
To:        seb@erix.ericsson.se (Sebastian Strollo)
Cc:        freebsd-hackers@FreeBSD.org
Subject:   Re: ypbind
Message-ID:  <199502230236.VAA02405@skynet.ctr.columbia.edu>
In-Reply-To: <9502221745.AA06750@scotch.eua.ericsson.se> from "Sebastian Strollo" at Feb 22, 95 06:45:12 pm

next in thread | previous in thread | raw e-mail | index | archive | help
They say this Sebastian Strollo person was kidding when he wrote:
> 
> Hi,
> Who is working on yp?

Since I was the last guy to hack on ypbind, and since I'm the one who
ported the Linux/GNU YP server stuff to FreeBSD, I guess I'm the lucky
guy. :)

> I have a problem: The machine on which the
> ypserv runs (a Sun) goes down for dumps every night, when it restarts
> ypserv comes up on another port. Now the code in ypbind isn't
> detecting this. I have a fix, but I am not sure it is the right thing
> to do, so it would be nice if whoever is working on this could drop me
> a note.

I'd be interested in seeing your fix, but I'd also like to know what
version of ypbind you're using. A quick way to tell is if you get
'server not responding/server OK' syslog messages when the Sun
YP server goes down; ypbind didn't do this until a couple weeks
ago. Another quick way is to check the RCS Id tag at the top of 
ypbind.c: if it says it was last modified by 'wpaul,' then you have
the latest one, otherwise you have the one from 2.0-RELEASE. 

So far, I haven't had much of a chance to really stress test ypbind's
ability to recover from downed servers. This is mainly because the
YP servers I'm testing with are the ones in active use on the CTR
network here at Columbia, and I can't crash one of them just for
the sake of testing FreeBSD. :) However, I might be able to rig up
another FreeBSD box as a YP server to test this scenario, so all hope
is not lost.

There were basically two things that I fixed when I tinkered with
ypbind:

- After binding to a server, ypbind was supposed to try 'pinging' the
  server every 60 seconds to see if it was still alive. The algorithm
  governing this behavior was broken: the 60-second timeout only
  worked once. After that, ypbind would send broadcasts every 5
  seconds come hell or high water.

  The new version behaves correctly: once bound, it 'pings' every 60 
  seconds an if it doesn't get a response from the server within 30 
  seconds, it goes back to broadcasting every 5 seconds until it finds a 
  new server.

- When 'pinging' the server, it shouldn't be neccessary to broadcast
  all over the place: we already have the IP of our server, so it should
  be enough to send packets just to the server instead of broadcasting, 
  since the broadcasts might be picked up by other servers in different 
  YP domains. Technically this isn't a problem, but it's un-neighborly. :)
 
> (Also while digging in this I found an old article that describes a
> patch for lib/libc/rpc/udp_clnt.c by Casper H.S. Dik that picks up
> ICMP dst unreachable messages and delivers them to the RPC layer, this
> much improves on timeouts when you are trying to do RPC to a port that
> isn't there anymore. Is anyone interested in this?)

Sure! Send the whole mess to wpaul@freebsd.org and I'll have a look
at it. Also let me know what ypbind you have so I know what I'm up
against. :)

> /Sebastian

-Bill

-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~T~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-Bill Paul            (212) 854-6020 | System Manager
Work:         wpaul@ctr.columbia.edu | Center for Telecommunications Research
Home:  wpaul@skynet.ctr.columbia.edu | Columbia University, New York City
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The Møøse Illuminati: ignore it and be confused, or join it and be confusing!
~~~~~~~~ FreeBSD 2.1.0-Development #0: Tue Feb  7 01:49:07 EST 1995 ~~~~~~~~~



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199502230236.VAA02405>