ubik: Log sync site for SDISK_SendFile USYNC error 28/13028/2
authorAndrew Deason <adeason@dson.org>
Wed, 7 Mar 2018 17:32:43 +0000 (11:32 -0600)
committerStephan Wiesand <stephan.wiesand@desy.de>
Fri, 4 May 2018 08:42:17 +0000 (04:42 -0400)
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.

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>
(cherry picked from commit c44f6f7a8052bdd1fb021e07bb6ae142b61e6b5b)

Reviewed-on: https://gerrit.openafs.org/12948
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 72b2da46bb0f997d70cca3cca7abc4a135d3d500)

Change-Id: I393ae8d880fd3dfa48ee0a908a68d2b433160f2e
Reviewed-on: https://gerrit.openafs.org/13028
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Andrew Deason <adeason@sinenomine.net>
Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>

src/ubik/remote.c

index 039c3d1..7ec4d16 100644 (file)
@@ -523,9 +523,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;
     }