]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
vol: remove SYNC fatal_error processing
authorAndrew Deason <adeason@sinenomine.net>
Fri, 13 Jan 2012 18:43:16 +0000 (13:43 -0500)
committerDerrick Brashear <shadow@dementix.org>
Mon, 23 Jan 2012 15:28:03 +0000 (07:28 -0800)
Currently SYNC clients will "disable" themselves on certain error
patterns. For example, if the server end closes its file descriptor
too many times, or takes too long and then closes the fd, the SYNC
client will return an error and set fatal_error. On any subsequent
SYNC requests, the request will immediately fail without contacting
the server, often making SYNC client programs effectively useless
until they are restarted.

There isn't really any reason to cause future requests to fail.
Transient problems in the fileserver can easily make this situation
possible (e.g. a fileserver can crash but still take several minutes
to close the SYNC fd while the core is written to disk), and so while
we may return an error for a specific problematic request, future
requests may be fine.

So, just remove everything related to fatal_error, so future SYNC
requests can continue to be attempted. Adjust some log messages to
reflect the new behavior.

Change-Id: I4b8bfe53f591a9e8541cd5a98c909208df5bcbac
Reviewed-on: http://gerrit.openafs.org/6548
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/vol/daemon_com.c
src/vol/daemon_com.h
src/vol/fssync-client.c
src/vol/salvsync-client.c

index be35ca792540936b3ad4982cc00792420ad90aa3..0ae1e2b628c7b764987d12be3d38f356075c08a5 100644 (file)
@@ -255,16 +255,11 @@ SYNC_ask(SYNC_client_state * state, SYNC_command * com, SYNC_response * res)
     int tries;
     afs_uint32 now, timeout, code=SYNC_OK;
 
-    if (state->fatal_error) {
-       return SYNC_COM_ERROR;
-    }
-
     if (state->fd == OSI_NULLSOCKET) {
        SYNC_connect(state);
     }
 
     if (state->fd == OSI_NULLSOCKET) {
-       state->fatal_error = 1;
        return SYNC_COM_ERROR;
     }
 
@@ -300,10 +295,9 @@ SYNC_ask(SYNC_client_state * state, SYNC_command * com, SYNC_response * res)
     }
 
     if (code == SYNC_COM_ERROR) {
-       Log("SYNC_ask: fatal protocol error on circuit '%s'; disabling sync "
-           "protocol until next server restart\n",
-           state->proto_name);
-       state->fatal_error = 1;
+       Log("SYNC_ask: too many / too latent fatal protocol errors on circuit "
+           "'%s'; giving up (tries %d timeout %d)\n",
+           state->proto_name, tries, timeout);
     }
 
     return code;
index 249c270da8af7982446101c0e4ddd94a312c80a7..dabaf3b578e0423f95992c0129a29130258b7a4a 100644 (file)
@@ -144,7 +144,6 @@ typedef struct SYNC_client_state {
     int retry_limit;            /**< max number of times for SYNC_ask to retry */
     afs_int32 hard_timeout;     /**< upper limit on time to keep trying */
     char * proto_name;          /**< sync protocol associated with this conn */
-    byte fatal_error;           /**< nonzero if fatal error on this client conn */
     afs_uint32 pkt_seq;         /**< packet xmit sequence counter */
     afs_uint32 com_seq;         /**< command xmit sequence counter */
 } SYNC_client_state;
index 048cf5945d2f1daf8fb4f7b0ffe2cb6f3d3f7901..d605797b17eb9a5c356c0dced32cc5ead03ab9c1 100644 (file)
@@ -117,7 +117,7 @@ FSYNC_askfs(SYNC_command * com, SYNC_response * res)
        break;
     case SYNC_COM_ERROR:
     case SYNC_BAD_COMMAND:
-       Log("FSYNC_askfs: fatal FSSYNC protocol error; volume management functionality disabled until next fileserver restart\n");
+       Log("FSYNC_askfs: internal FSSYNC protocol error %d\n", code);
        break;
     case SYNC_DENIED:
        Log("FSYNC_askfs: FSSYNC request denied for reason=%d\n", res->hdr.reason);
index 27433752df78c9004652a2f16c8529b00b3bc2ca..da60056e1b16c8cf915c1126dfdce72a566c6732 100644 (file)
@@ -97,7 +97,7 @@ SALVSYNC_askSalv(SYNC_command * com, SYNC_response * res)
       break;
     case SYNC_COM_ERROR:
     case SYNC_BAD_COMMAND:
-       Log("SALVSYNC_askSalv: fatal SALVSYNC protocol error; online salvager functionality disabled until next fileserver restart\n");
+       Log("SALVSYNC_askSalv: internal SALVSYNC protocol error %d\n", code);
        break;
     case SYNC_DENIED:
        Log("SALVSYNC_askSalv: SALVSYNC request denied for reason=%d\n", res->hdr.reason);