2 * Copyright 2000, International Business Machines Corporation and others.
5 * This software has been released under the terms of the IBM Public
6 * License. For details, see the LICENSE file in the top-level source
7 * directory or online at http://www.openafs.org/dl/license10.html
10 #include <afsconfig.h>
11 #include <afs/param.h>
15 #include <sys/types.h>
26 #include <netinet/in.h>
33 #include <afs/afsutil.h>
34 #include <afs/cellconfig.h>
36 #define UBIK_INTERNALS
41 * This module is responsible for determining when the system has
42 * recovered to the point that it can handle new transactions. It
43 * replays logs, polls to determine the current dbase after a crash,
44 * and distributes the new database to the others.
46 * The sync site associates a version number with each database. It
47 * broadcasts the version associated with its current dbase in every
48 * one of its beacon messages. When the sync site send a dbase to a
49 * server, it also sends the db's version. A non-sync site server can
50 * tell if it has the right dbase version by simply comparing the
51 * version from the beacon message \p uvote_dbVersion with the version
52 * associated with the database \p ubik_dbase->version. The sync site
53 * itself simply has one counter to keep track of all of this (again
54 * \p ubik_dbase->version).
56 * sync site: routine called when the sync site loses its quorum; this
57 * procedure is called "up" from the beacon package. It resyncs the
58 * dbase and nudges the recovery daemon to try to propagate out the
59 * changes. It also resets the recovery daemon's state, since
60 * recovery must potentially find a new dbase to propagate out. This
61 * routine should not do anything with variables used by non-sync site
66 * if this flag is set, then ubik will use only the primary address
67 * (the address specified in the CellServDB) to contact other
68 * ubik servers. Ubik recovery will not try opening connections
69 * to the alternate interface addresses.
71 int ubikPrimaryAddrOnly;
74 urecovery_ResetState(void)
77 #if !defined(AFS_PTHREAD_ENV)
78 /* No corresponding LWP_WaitProcess found anywhere for this -- klm */
79 LWP_NoYieldSignal(&urecovery_state);
87 * routine called when a non-sync site server goes down; restarts recovery
88 * process to send missing server the new db when it comes back up for
89 * non-sync site servers.
91 * \note This routine should not do anything with variables used by non-sync site servers.
94 urecovery_LostServer(struct ubik_server *ts)
96 ubeacon_ReinitServer(ts);
97 #if !defined(AFS_PTHREAD_ENV)
98 /* No corresponding LWP_WaitProcess found anywhere for this -- klm */
99 LWP_NoYieldSignal(&urecovery_state);
105 * return true iff we have a current database (called by both sync
106 * sites and non-sync sites) How do we determine this? If we're the
107 * sync site, we wait until recovery has finished fetching and
108 * re-labelling its dbase (it may still be trying to propagate it out
109 * to everyone else; that's THEIR problem). If we're not the sync
110 * site, then we must have a dbase labelled with the right version,
111 * and we must have a currently-good sync site.
114 urecovery_AllBetter(struct ubik_dbase *adbase, int areadAny)
118 ubik_dprint_25("allbetter checking\n");
123 if (ubik_dbase->version.epoch > 1)
124 rcode = 1; /* Happy with any good version of database */
127 /* Check if we're sync site and we've got the right data */
128 else if (ubeacon_AmSyncSite() && (urecovery_state & UBIK_RECHAVEDB)) {
132 /* next, check if we're aux site, and we've ever been sent the
133 * right data (note that if a dbase update fails, we won't think
134 * that the sync site is still the sync site, 'cause it won't talk
135 * to us until a timeout period has gone by. When we recover, we
136 * leave this clear until we get a new dbase */
137 else if ((uvote_GetSyncSite() && (vcmp(ubik_dbVersion, ubik_dbase->version) == 0))) { /* && order is important */
141 ubik_dprint_25("allbetter: returning %d\n", rcode);
146 * \brief abort all transactions on this database
149 urecovery_AbortAll(struct ubik_dbase *adbase)
151 struct ubik_trans *tt;
152 for (tt = adbase->activeTrans; tt; tt = tt->next) {
159 * \brief this routine aborts the current remote transaction, if any, if the tid is wrong
162 urecovery_CheckTid(struct ubik_tid *atid, int abortalways)
164 if (ubik_currentTrans) {
165 /* there is remote write trans, see if we match, see if this
166 * is a new transaction */
167 if (atid->epoch != ubik_currentTrans->tid.epoch
168 || atid->counter > ubik_currentTrans->tid.counter || abortalways) {
169 /* don't match, abort it */
170 /* If the thread is not waiting for lock - ok to end it */
171 if (ubik_currentTrans->locktype != LOCKWAIT) {
172 udisk_end(ubik_currentTrans);
174 ubik_currentTrans = (struct ubik_trans *)0;
183 * log format is defined here, and implicitly in disk.c
185 * 4 byte opcode, followed by parameters, each 4 bytes long. All integers
186 * are in logged in network standard byte order, in case we want to move logs
187 * from machine-to-machine someday.
189 * Begin transaction: opcode \n
190 * Commit transaction: opcode, version (8 bytes) \n
191 * Truncate file: opcode, file number, length \n
192 * Abort transaction: opcode \n
193 * Write data: opcode, file, position, length, <length> data bytes \n
195 * A very simple routine, it just replays the log. Note that this is a new-value only log, which
196 * implies that no uncommitted data is written to the dbase: one writes data to the log, including
197 * the commit record, then we allow data to be written through to the dbase. In our particular
198 * implementation, once a transaction is done, we write out the pages to the database, so that
199 * our buffer package doesn't have to know about stable and uncommitted data in the memory buffers:
200 * any changed data while there is an uncommitted write transaction can be zapped during an
201 * abort and the remaining dbase on the disk is exactly the right dbase, without having to read
205 ReplayLog(struct ubik_dbase *adbase)
208 afs_int32 code, tpos;
210 afs_int32 len, thisSize, tfile, filePos;
212 afs_int32 syncFile = -1;
213 afs_int32 data[1024];
215 /* read the lock twice, once to see whether we have a transaction to deal
216 * with that committed, (theoretically, we should support more than one
217 * trans in the log at once, but not yet), and once replaying the
221 /* for now, assume that all ops in log pertain to one transaction; see if there's a commit */
224 (*adbase->read) (adbase, LOGFILE, (char *)&opcode, tpos,
226 if (code != sizeof(afs_int32))
228 opcode = ntohl(opcode);
229 if (opcode == LOGNEW) {
230 /* handle begin trans */
231 tpos += sizeof(afs_int32);
232 } else if (opcode == LOGABORT)
234 else if (opcode == LOGEND) {
237 } else if (opcode == LOGTRUNCATE) {
240 (*adbase->read) (adbase, LOGFILE, (char *)buffer, tpos,
241 2 * sizeof(afs_int32));
242 if (code != 2 * sizeof(afs_int32))
243 break; /* premature eof or io error */
244 tpos += 2 * sizeof(afs_int32);
245 } else if (opcode == LOGDATA) {
248 (*adbase->read) (adbase, LOGFILE, (char *)buffer, tpos,
249 3 * sizeof(afs_int32));
250 if (code != 3 * sizeof(afs_int32))
252 /* otherwise, skip over the data bytes, too */
253 tpos += ntohl(buffer[2]) + 3 * sizeof(afs_int32);
255 ubik_print("corrupt log opcode (%d) at position %d\n", opcode,
257 break; /* corrupt log! */
261 /* actually do the replay; log should go all the way through the commit record, since
262 * we just read it above. */
268 (*adbase->read) (adbase, LOGFILE, (char *)&opcode, tpos,
270 if (code != sizeof(afs_int32))
272 opcode = ntohl(opcode);
273 if (opcode == LOGNEW) {
274 /* handle begin trans */
275 tpos += sizeof(afs_int32);
276 } else if (opcode == LOGABORT)
277 panic("log abort\n");
278 else if (opcode == LOGEND) {
279 struct ubik_version version;
282 (*adbase->read) (adbase, LOGFILE, (char *)buffer, tpos,
283 2 * sizeof(afs_int32));
284 if (code != 2 * sizeof(afs_int32))
286 version.epoch = ntohl(buffer[0]);
287 version.counter = ntohl(buffer[1]);
288 code = (*adbase->setlabel) (adbase, 0, &version);
291 ubik_print("Successfully replayed log for interrupted "
292 "transaction; db version is now %ld.%ld\n",
293 (long) version.epoch, (long) version.counter);
295 break; /* all done now */
296 } else if (opcode == LOGTRUNCATE) {
299 (*adbase->read) (adbase, LOGFILE, (char *)buffer, tpos,
300 2 * sizeof(afs_int32));
301 if (code != 2 * sizeof(afs_int32))
302 break; /* premature eof or io error */
303 tpos += 2 * sizeof(afs_int32);
305 (*adbase->truncate) (adbase, ntohl(buffer[0]),
309 } else if (opcode == LOGDATA) {
312 (*adbase->read) (adbase, LOGFILE, (char *)buffer, tpos,
313 3 * sizeof(afs_int32));
314 if (code != 3 * sizeof(afs_int32))
316 tpos += 3 * sizeof(afs_int32);
317 /* otherwise, skip over the data bytes, too */
318 len = ntohl(buffer[2]); /* total number of bytes to copy */
319 filePos = ntohl(buffer[1]);
320 tfile = ntohl(buffer[0]);
321 /* try to minimize file syncs */
322 if (syncFile != tfile) {
324 code = (*adbase->sync) (adbase, syncFile);
332 thisSize = (len > sizeof(data) ? sizeof(data) : len);
333 /* copy sizeof(data) buffer bytes at a time */
335 (*adbase->read) (adbase, LOGFILE, (char *)data, tpos,
337 if (code != thisSize)
340 (*adbase->write) (adbase, tfile, (char *)data, filePos,
342 if (code != thisSize)
349 ubik_print("corrupt log opcode (%d) at position %d\n",
351 break; /* corrupt log! */
356 code = (*adbase->sync) (adbase, syncFile);
360 ubik_print("Log read error on pass 2\n");
365 /* now truncate the log, we're done with it */
366 code = (*adbase->truncate) (adbase, LOGFILE, 0);
371 * Called at initialization to figure out version of the dbase we really have.
373 * This routine is called after replaying the log; it reads the restored labels.
376 InitializeDB(struct ubik_dbase *adbase)
380 code = (*adbase->getlabel) (adbase, 0, &adbase->version);
382 /* try setting the label to a new value */
383 adbase->version.epoch = 1; /* value for newly-initialized db */
384 adbase->version.counter = 1;
385 code = (*adbase->setlabel) (adbase, 0, &adbase->version);
387 /* failed, try to set it back */
388 adbase->version.epoch = 0;
389 adbase->version.counter = 0;
390 (*adbase->setlabel) (adbase, 0, &adbase->version);
392 #ifdef AFS_PTHREAD_ENV
393 CV_BROADCAST(&adbase->version_cond);
395 LWP_NoYieldSignal(&adbase->version);
402 * \brief initialize the local ubik_dbase
404 * We replay the logs and then read the resulting file to figure out what version we've really got.
407 urecovery_Initialize(struct ubik_dbase *adbase)
411 code = ReplayLog(adbase);
414 code = InitializeDB(adbase);
419 * \brief Main interaction loop for the recovery manager
421 * The recovery light-weight process only runs when you're the
422 * synchronization site. It performs the following tasks, if and only
423 * if the prerequisite tasks have been performed successfully (it
424 * keeps track of which ones have been performed in its bit map,
425 * \p urecovery_state).
427 * First, it is responsible for probing that all servers are up. This
428 * is the only operation that must be performed even if this is not
429 * yet the sync site, since otherwise this site may not notice that
430 * enough other machines are running to even elect this guy to be the
433 * After that, the recovery process does nothing until the beacon and
434 * voting modules manage to get this site elected sync site.
436 * After becoming sync site, recovery first attempts to find the best
437 * database available in the network (it must do this in order to
438 * ensure finding the latest committed data). After finding the right
439 * database, it must fetch this dbase to the sync site.
441 * After fetching the dbase, it relabels it with a new version number,
442 * to ensure that everyone recognizes this dbase as the most recent
445 * One the dbase has been relabelled, this machine can start handling
446 * requests. However, the recovery module still has one more task:
447 * propagating the dbase out to everyone who is up in the network.
450 urecovery_Interact(void *dummy)
452 afs_int32 code, tcode;
453 struct ubik_server *bestServer = NULL;
454 struct ubik_server *ts;
455 int dbok, doingRPC, now;
456 afs_int32 lastProbeTime;
457 /* if we're the sync site, the best db version we've found yet */
458 static struct ubik_version bestDBVersion;
459 struct ubik_version tversion;
461 int length, tlen, offset, file, nbytes;
462 struct rx_call *rxcall;
464 struct ubik_stat ubikstat;
465 struct in_addr inAddr;
471 /* otherwise, begin interaction */
475 /* Run through this loop every 4 seconds */
478 #ifdef AFS_PTHREAD_ENV
479 select(0, 0, 0, 0, &tv);
481 IOMGR_Select(0, 0, 0, 0, &tv);
484 ubik_dprint("recovery running in state %x\n", urecovery_state);
486 /* Every 30 seconds, check all the down servers and mark them
487 * as up if they respond. When a server comes up or found to
488 * not be current, then re-find the the best database and
491 if ((now = FT_ApproxTime()) > 30 + lastProbeTime) {
493 #ifdef AFS_PTHREAD_ENV
497 for (ts = ubik_servers, doingRPC = 0; ts; ts = ts->next) {
503 urecovery_state &= ~UBIK_RECFOUNDDB;
505 } else if (!ts->currentDB) {
506 urecovery_state &= ~UBIK_RECFOUNDDB;
510 #ifdef AFS_PTHREAD_ENV
515 now = FT_ApproxTime();
519 /* Mark whether we are the sync site */
520 if (!ubeacon_AmSyncSite()) {
521 urecovery_state &= ~UBIK_RECSYNCSITE;
522 continue; /* nothing to do */
524 urecovery_state |= UBIK_RECSYNCSITE;
526 /* If a server has just come up or if we have not found the
527 * most current database, then go find the most current db.
529 if (!(urecovery_state & UBIK_RECFOUNDDB)) {
530 bestServer = (struct ubik_server *)0;
531 bestDBVersion.epoch = 0;
532 bestDBVersion.counter = 0;
533 for (ts = ubik_servers; ts; ts = ts->next) {
535 continue; /* don't bother with these guys */
538 code = DISK_GetVersion(ts->disk_rxcid, &ts->version);
540 /* perhaps this is the best version */
541 if (vcmp(ts->version, bestDBVersion) > 0) {
542 /* new best version */
543 bestDBVersion = ts->version;
548 /* take into consideration our version. Remember if we,
549 * the sync site, have the best version. Also note that
550 * we may need to send the best version out.
552 if (vcmp(ubik_dbase->version, bestDBVersion) >= 0) {
553 bestDBVersion = ubik_dbase->version;
554 bestServer = (struct ubik_server *)0;
555 urecovery_state |= UBIK_RECHAVEDB;
557 /* Clear the flag only when we know we have to retrieve
558 * the db. Because urecovery_AllBetter() looks at it.
560 urecovery_state &= ~UBIK_RECHAVEDB;
562 urecovery_state |= UBIK_RECFOUNDDB;
563 urecovery_state &= ~UBIK_RECSENTDB;
565 if (!(urecovery_state & UBIK_RECFOUNDDB))
566 continue; /* not ready */
568 /* If we, the sync site, do not have the best db version, then
569 * go and get it from the server that does.
571 if ((urecovery_state & UBIK_RECHAVEDB) || !bestServer) {
572 urecovery_state |= UBIK_RECHAVEDB;
574 /* we don't have the best version; we should fetch it. */
576 urecovery_AbortAll(ubik_dbase);
578 /* Rx code to do the Bulk fetch */
581 rxcall = rx_NewCall(bestServer->disk_rxcid);
583 ubik_print("Ubik: Synchronize database with server %s\n",
584 afs_inet_ntoa_r(bestServer->addr[0], hoststr));
586 code = StartDISK_GetFile(rxcall, file);
588 ubik_dprint("StartDiskGetFile failed=%d\n", code);
591 nbytes = rx_Read(rxcall, (char *)&length, sizeof(afs_int32));
592 length = ntohl(length);
593 if (nbytes != sizeof(afs_int32)) {
594 ubik_dprint("Rx-read length error=%d\n", code = BULK_ERROR);
599 /* give invalid label during file transit */
601 code = (*ubik_dbase->setlabel) (ubik_dbase, file, &tversion);
603 ubik_dprint("setlabel io error=%d\n", code);
606 snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.TMP",
607 ubik_dbase->pathName, (file<0)?"SYS":"",
608 (file<0)?-file:file);
609 fd = open(pbuffer, O_CREAT | O_RDWR | O_TRUNC, 0600);
614 code = lseek(fd, HDRSIZE, 0);
615 if (code != HDRSIZE) {
622 tlen = (length > sizeof(tbuffer) ? sizeof(tbuffer) : length);
623 #ifndef AFS_PTHREAD_ENV
627 nbytes = rx_Read(rxcall, tbuffer, tlen);
628 if (nbytes != tlen) {
629 ubik_dprint("Rx-read bulk error=%d\n", code = BULK_ERROR);
634 nbytes = write(fd, tbuffer, tlen);
636 if (nbytes != tlen) {
647 code = EndDISK_GetFile(rxcall, &tversion);
649 tcode = rx_EndCall(rxcall, code);
653 /* we got a new file, set up its header */
654 urecovery_state |= UBIK_RECHAVEDB;
655 memcpy(&ubik_dbase->version, &tversion,
656 sizeof(struct ubik_version));
657 snprintf(tbuffer, sizeof(tbuffer), "%s.DB%s%d",
658 ubik_dbase->pathName, (file<0)?"SYS":"",
659 (file<0)?-file:file);
661 snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.OLD",
662 ubik_dbase->pathName, (file<0)?"SYS":"",
663 (file<0)?-file:file);
664 code = unlink(pbuffer);
666 code = rename(tbuffer, pbuffer);
667 snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.TMP",
668 ubik_dbase->pathName, (file<0)?"SYS":"",
669 (file<0)?-file:file);
672 code = rename(pbuffer, tbuffer);
674 (*ubik_dbase->open) (ubik_dbase, file);
675 /* after data is good, sync disk with correct label */
677 (*ubik_dbase->setlabel) (ubik_dbase, 0,
678 &ubik_dbase->version);
681 snprintf(pbuffer, sizeof(pbuffer), "%s.DB%s%d.OLD",
682 ubik_dbase->pathName, (file<0)?"SYS":"",
683 (file<0)?-file:file);
690 * We will effectively invalidate the old data forever now.
691 * Unclear if we *should* but we do.
693 ubik_dbase->version.epoch = 0;
694 ubik_dbase->version.counter = 0;
695 ubik_print("Ubik: Synchronize database failed (error = %d)\n",
698 ubik_print("Ubik: Synchronize database completed\n");
699 urecovery_state |= UBIK_RECHAVEDB;
701 udisk_Invalidate(ubik_dbase, 0); /* data has changed */
702 #ifdef AFS_PTHREAD_ENV
703 CV_BROADCAST(&ubik_dbase->version_cond);
705 LWP_NoYieldSignal(&ubik_dbase->version);
709 if (!(urecovery_state & UBIK_RECHAVEDB))
710 continue; /* not ready */
712 /* If the database was newly initialized, then when we establish quorum, write
713 * a new label. This allows urecovery_AllBetter() to allow access for reads.
714 * Setting it to 2 also allows another site to come along with a newer
715 * database and overwrite this one.
717 if (ubik_dbase->version.epoch == 1) {
719 urecovery_AbortAll(ubik_dbase);
721 ubik_dbase->version.epoch = ubik_epochTime;
722 ubik_dbase->version.counter = 1;
724 (*ubik_dbase->setlabel) (ubik_dbase, 0, &ubik_dbase->version);
725 udisk_Invalidate(ubik_dbase, 0); /* data may have changed */
726 #ifdef AFS_PTHREAD_ENV
727 CV_BROADCAST(&ubik_dbase->version_cond);
729 LWP_NoYieldSignal(&ubik_dbase->version);
734 /* Check the other sites and send the database to them if they
735 * do not have the current db.
737 if (!(urecovery_state & UBIK_RECSENTDB)) {
738 /* now propagate out new version to everyone else */
739 dbok = 1; /* start off assuming they all worked */
743 * Check if a write transaction is in progress. We can't send the
744 * db when a write is in progress here because the db would be
745 * obsolete as soon as it goes there. Also, ops after the begin
746 * trans would reach the recepient and wouldn't find a transaction
747 * pending there. Frankly, I don't think it's possible to get past
748 * the write-lock above if there is a write transaction in progress,
749 * but then, it won't hurt to check, will it?
751 if (ubik_dbase->flags & DBWRITING) {
756 while ((ubik_dbase->flags & DBWRITING) && (safety < 500)) {
758 /* sleep for a little while */
759 #ifdef AFS_PTHREAD_ENV
760 select(0, 0, 0, 0, &tv);
762 IOMGR_Select(0, 0, 0, 0, &tv);
770 for (ts = ubik_servers; ts; ts = ts->next) {
771 inAddr.s_addr = ts->addr[0];
773 ubik_dprint("recovery cannot send version to %s\n",
774 afs_inet_ntoa_r(inAddr.s_addr, hoststr));
778 ubik_dprint("recovery sending version to %s\n",
779 afs_inet_ntoa_r(inAddr.s_addr, hoststr));
780 if (vcmp(ts->version, ubik_dbase->version) != 0) {
781 ubik_dprint("recovery stating local database\n");
783 /* Rx code to do the Bulk Store */
784 code = (*ubik_dbase->stat) (ubik_dbase, 0, &ubikstat);
786 length = ubikstat.size;
788 rxcall = rx_NewCall(ts->disk_rxcid);
790 StartDISK_SendFile(rxcall, file, length,
791 &ubik_dbase->version);
793 ubik_dprint("StartDiskSendFile failed=%d\n",
800 sizeof(tbuffer) ? sizeof(tbuffer) : length);
802 (*ubik_dbase->read) (ubik_dbase, file,
803 tbuffer, offset, tlen);
804 if (nbytes != tlen) {
805 ubik_dprint("Local disk read error=%d\n",
809 nbytes = rx_Write(rxcall, tbuffer, tlen);
810 if (nbytes != tlen) {
811 ubik_dprint("Rx-write bulk error=%d\n", code =
818 code = EndDISK_SendFile(rxcall);
820 code = rx_EndCall(rxcall, code);
823 /* we set a new file, process its header */
824 ts->version = ubik_dbase->version;
829 /* mark file up to date */
835 urecovery_state |= UBIK_RECSENTDB;
842 * \brief send a Probe to all the network address of this server
844 * \return 0 if success, else return 1
847 DoProbe(struct ubik_server *server)
849 struct rx_connection *conns[UBIK_MAX_INTERFACE_ADDR];
850 struct rx_connection *connSuccess = 0;
851 int i, j, success_i = -1;
855 extern afs_int32 ubikSecIndex;
856 extern struct rx_securityClass *ubikSecClass;
858 for (i = 0; (addr = server->addr[i]) && (i < UBIK_MAX_INTERFACE_ADDR);
861 rx_NewConnection(addr, ubik_callPortal, DISK_SERVICE_ID,
862 ubikSecClass, ubikSecIndex);
864 /* user requirement to use only the primary interface */
865 if (ubikPrimaryAddrOnly) {
870 osi_Assert(i); /* at least one interface address for this server */
872 #ifdef AFS_PTHREAD_ENV
878 if (!multi_error) { /* first success */
885 #ifdef AFS_PTHREAD_ENV
889 if (success_i >= 0) {
890 addr = server->addr[success_i]; /* successful interface addr */
892 if (server->disk_rxcid) /* destroy existing conn */
893 rx_DestroyConnection(server->disk_rxcid);
894 if (server->vote_rxcid)
895 rx_DestroyConnection(server->vote_rxcid);
897 /* make new connections */
898 server->disk_rxcid = conns[success_i];
899 server->vote_rxcid = rx_NewConnection(addr, ubik_callPortal,
900 VOTE_SERVICE_ID, ubikSecClass,
903 connSuccess = conns[success_i];
904 strcpy(buffer, afs_inet_ntoa_r(server->addr[0], hoststr));
906 ubik_print("ubik:server %s is back up: will be contacted through %s\n",
907 buffer, afs_inet_ntoa_r(addr, hoststr));
910 /* Destroy all connections except the one on which we succeeded */
911 for (j = 0; j < i; j++)
912 if (conns[j] != connSuccess)
913 rx_DestroyConnection(conns[j]);
916 ubik_dprint("ubik:server %s still down\n",
917 afs_inet_ntoa_r(server->addr[0], hoststr));
920 return 0; /* success */
922 return 1; /* failure */