1
0
mirror of https://github.com/samba-team/samba.git synced 2024-12-22 13:34:15 +03:00

ctdb-daemon: Switch to using ETIMEDOUT instead of ETIME

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13520

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
This commit is contained in:
Amitay Isaacs 2018-07-10 18:18:33 +10:00 committed by Martin Schwenke
parent c8756ec17b
commit b886a95eca
5 changed files with 9 additions and 9 deletions

View File

@ -1638,7 +1638,7 @@ static void async_callback(struct ctdb_client_control_state *state)
}
data->fail_count++;
if (state->state == CTDB_CONTROL_TIMEOUT) {
res = -ETIME;
res = -ETIMEDOUT;
} else {
res = -1;
}

View File

@ -134,7 +134,7 @@ static void ctdb_health_callback(struct ctdb_context *ctdb, int status, void *p)
goto after_change_status;
}
if (status == ETIME) {
if (status == ETIMEDOUT) {
ctdb->monitor->event_script_timeouts++;
if (ctdb->monitor->event_script_timeouts >=

View File

@ -1048,7 +1048,7 @@ static void ctdb_end_recovery_callback(struct ctdb_context *ctdb, int status, vo
if (status != 0) {
DEBUG(DEBUG_ERR,(__location__ " recovered event script failed (status %d)\n", status));
if (status == -ETIME) {
if (status == -ETIMEDOUT) {
ctdb_ban_self(ctdb);
}
}

View File

@ -466,7 +466,7 @@ static void ctdb_do_takeip_callback(struct ctdb_context *ctdb, int status,
TDB_DATA data;
if (status != 0) {
if (status == -ETIME) {
if (status == -ETIMEDOUT) {
ctdb_ban_self(ctdb);
}
DEBUG(DEBUG_ERR,(__location__ " Failed to takeover IP %s on interface %s\n",
@ -587,7 +587,7 @@ static void ctdb_do_updateip_callback(struct ctdb_context *ctdb, int status,
talloc_get_type(private_data, struct ctdb_do_updateip_state);
if (status != 0) {
if (status == -ETIME) {
if (status == -ETIMEDOUT) {
ctdb_ban_self(ctdb);
}
DEBUG(DEBUG_ERR,
@ -886,7 +886,7 @@ static void release_ip_callback(struct ctdb_context *ctdb, int status,
struct release_ip_callback_state *state =
talloc_get_type(private_data, struct release_ip_callback_state);
if (status == -ETIME) {
if (status == -ETIMEDOUT) {
ctdb_ban_self(ctdb);
}
@ -2270,7 +2270,7 @@ static void ctdb_ipreallocated_callback(struct ctdb_context *ctdb,
DEBUG(DEBUG_ERR,
(" \"ipreallocated\" event script failed (status %d)\n",
status));
if (status == -ETIME) {
if (status == -ETIMEDOUT) {
ctdb_ban_self(ctdb);
}
}

View File

@ -562,7 +562,7 @@ static void ctdb_event_script_run_done(int result, void *private_data)
struct ctdb_event_script_run_state *state = talloc_get_type_abort(
private_data, struct ctdb_event_script_run_state);
if (result == ETIME) {
if (result == ETIMEDOUT) {
switch (state->event) {
case CTDB_EVENT_START_RECOVERY:
case CTDB_EVENT_RECOVERED:
@ -716,7 +716,7 @@ int ctdb_event_script_args(struct ctdb_context *ctdb, enum ctdb_event call,
tevent_loop_once(ctdb->ev);
}
if (state.status == ETIME) {
if (state.status == ETIMEDOUT) {
/* Don't ban self if CTDB is starting up or shutting down */
if (call != CTDB_EVENT_INIT && call != CTDB_EVENT_SHUTDOWN) {
DEBUG(DEBUG_ERR,