From 539b0d759755145eb20c5fd2938d47aac7049480 Mon Sep 17 00:00:00 2001 From: Jeffrey Altman Date: Wed, 11 Feb 2015 01:25:04 -0500 Subject: [PATCH] ubik: DISK_UpdateInterfaceAddr == server restart If a DISK_UpdateInterfaceAddr RPC is received the server that sent it restarted. Force the urecovery code to verify the server state. Change-Id: I465863dc3a52d844b56d576bd55229435556cfd6 Reviewed-on: http://gerrit.openafs.org/11738 Tested-by: BuildBot Reviewed-by: Daria Brashear Reviewed-by: Jeffrey Hutzelman Reviewed-by: Chas Williams - CONTRACTOR Reviewed-by: Jeffrey Altman (cherry picked from commit 30667a5d7b86b29f9aafe2b490d89b8e01bfc541) Reviewed-on: http://gerrit.openafs.org/11774 Reviewed-by: Benjamin Kaduk Reviewed-by: Chas Williams <3chas3@gmail.com> Reviewed-by: Stephan Wiesand --- src/ubik/remote.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ubik/remote.c b/src/ubik/remote.c index 11bf375faa..4723cf0672 100644 --- a/src/ubik/remote.c +++ b/src/ubik/remote.c @@ -724,6 +724,15 @@ SDISK_UpdateInterfaceAddr(struct rx_call *rxcall, for (i = 0; i < UBIK_MAX_INTERFACE_ADDR && ts->addr[i]; i++) ubik_print("... %s\n", afs_inet_ntoa_r(ts->addr[i], hoststr)); + /* + * The most likely cause of a DISK_UpdateInterfaceAddr RPC + * is because the server was restarted. Reset its state + * so that no DISK_Begin RPCs will be issued until the + * known database version is current. + */ + ts->beaconSinceDown = 0; + ts->currentDB = 0; + urecovery_LostServer(); return 0; }