mirror of
https://git.openafs.org/openafs.git
synced 2025-01-31 13:38:01 +00:00
vol: remove SYNC fatal_error processing
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. Reviewed-on: http://gerrit.openafs.org/6548 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org> (cherry picked from commit 40bf6dee2409197f7494c3d09bf2dea7c248d185) Change-Id: I0f7a1792afd1ace3beabe238107d0a5069ccbb44 Reviewed-on: http://gerrit.openafs.org/6609 Tested-by: BuildBot <buildbot@rampaginggeek.com> Reviewed-by: Derrick Brashear <shadow@dementix.org>
This commit is contained in:
parent
339438c847
commit
428400fb83
@ -275,16 +275,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;
|
||||
}
|
||||
|
||||
@ -320,10 +315,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;
|
||||
|
@ -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;
|
||||
|
@ -132,7 +132,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);
|
||||
|
@ -108,7 +108,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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user