From owner-freebsd-hackers Wed Feb 22 18:39:31 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id SAA15310 for hackers-outgoing; Wed, 22 Feb 1995 18:39:31 -0800 Received: from skynet.ctr.columbia.edu (skynet.ctr.columbia.edu [128.59.64.70]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id SAA15302 for ; Wed, 22 Feb 1995 18:39:27 -0800 Received: (from wpaul@localhost) by skynet.ctr.columbia.edu (8.6.8/8.6.6) id VAA02405; Wed, 22 Feb 1995 21:36:44 -0500 From: Wankle Rotary Engine Message-Id: <199502230236.VAA02405@skynet.ctr.columbia.edu> Subject: Re: ypbind To: seb@erix.ericsson.se (Sebastian Strollo) Date: Wed, 22 Feb 1995 21:36:41 -0500 (EST) Cc: freebsd-hackers@FreeBSD.org In-Reply-To: <9502221745.AA06750@scotch.eua.ericsson.se> from "Sebastian Strollo" at Feb 22, 95 06:45:12 pm X-Mailer: ELM [version 2.4 PL23] Content-Type: text Content-Length: 3468 Sender: hackers-owner@FreeBSD.org Precedence: bulk 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 ~~~~~~~~~