ubik: Log sync site for SDISK_SendFile USYNC error 43/12943/2
authorAndrew Deason <adeason@dson.org>
Wed, 7 Mar 2018 17:32:43 +0000 (11:32 -0600)
committerBenjamin Kaduk <kaduk@mit.edu>
Fri, 9 Mar 2018 03:55:06 +0000 (22:55 -0500)
In SDISK_SendFile, we return a USYNC error if the caller is not the
sync site. Say who the sync site is when we do this, to possibly help
post-mortem debugging.

Change-Id: I62a3565fca20171be20481638c261c4659c68ab2
Reviewed-on: https://gerrit.openafs.org/12943
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>

src/ubik/remote.c

index 9f88aaf..2fca3b1 100644 (file)
@@ -482,9 +482,11 @@ SDISK_SendFile(struct rx_call *rxcall, afs_int32 file,
     otherHost = ubikGetPrimaryInterfaceAddr(rx_HostOf(tpeer));
     if (offset && offset != otherHost) {
        /* we *know* this is the wrong guy */
+        char sync_hoststr[16];
        ubik_print
-           ("Ubik: Refusing synchronization with server %s since it is not the sync-site.\n",
-            afs_inet_ntoa_r(otherHost, hoststr));
+           ("Ubik: Refusing synchronization with server %s since it is not the sync-site (%s).\n",
+            afs_inet_ntoa_r(otherHost, hoststr),
+            afs_inet_ntoa_r(offset, sync_hoststr));
        return USYNC;
     }