The branch, master has been updated via 5cdc04669db8c2ddbbff5af82307a16e8d807b83 (commit) via cb8dd896914d4e44ad7b8bb000176a7c78f394ae (commit) via c17dafc79bec25bbb796478c33f503503d382a20 (commit) via 75dea671f68ac6649095357c36b3697a927721e9 (commit) via 65b94d280731df3245b26d69f39acfaf5bccf0d8 (commit) via 9a2c4c3ed09ac9ea781d06999d11e5c3b5b4a97a (commit) via 945f04f06a425fd3940a2e4b832c63223a3f26b3 (commit) via a73f316cb9cec877dc0bc3f7baa21be1b1454273 (commit) from 841a2d9635341baa1a6dd9ec558fc7cadb4e3af4 (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 5cdc04669db8c2ddbbff5af82307a16e8d807b83 Author: Ronnie Sahlberg <ronniesahlb...@gmail.com> Date: Tue Jun 30 12:17:05 2009 +1000 dont try sending a keepalive if the transport is down commit cb8dd896914d4e44ad7b8bb000176a7c78f394ae Author: Ronnie Sahlberg <ronniesahlb...@gmail.com> Date: Tue Jun 30 12:16:13 2009 +1000 Dont even try allocating and sending a CALL packet if the transport is down commit c17dafc79bec25bbb796478c33f503503d382a20 Author: Ronnie Sahlberg <ronniesahlb...@gmail.com> Date: Tue Jun 30 12:14:58 2009 +1000 failing a dmaster send due to the transport being down is fatal commit 75dea671f68ac6649095357c36b3697a927721e9 Author: Ronnie Sahlberg <ronniesahlb...@gmail.com> Date: Tue Jun 30 12:13:15 2009 +1000 if we fail a dmaster migration due to the transport being down, then that is a fatal condition. commit 65b94d280731df3245b26d69f39acfaf5bccf0d8 Author: Ronnie Sahlberg <ronniesahlb...@gmail.com> Date: Tue Jun 30 12:10:27 2009 +1000 dont try to send error packets if the transport is down commit 9a2c4c3ed09ac9ea781d06999d11e5c3b5b4a97a Author: Ronnie Sahlberg <ronniesahlb...@gmail.com> Date: Tue Jun 30 12:09:28 2009 +1000 dont even try to send a message from the main daemon if the transport is down commit 945f04f06a425fd3940a2e4b832c63223a3f26b3 Author: Ronnie Sahlberg <ronniesahlb...@gmail.com> Date: Tue Jun 30 12:03:12 2009 +1000 Dont try to allocate and send packets if the transport is down commit a73f316cb9cec877dc0bc3f7baa21be1b1454273 Author: Ronnie Sahlberg <ronniesahlb...@gmail.com> Date: Tue Jun 30 11:55:42 2009 +1000 dont even try to allocate a packet if the transport is down since it will fail ----------------------------------------------------------------------- Summary of changes: server/ctdb_call.c | 33 ++++++++++++++++++++++++++++++++- server/ctdb_control.c | 5 +++++ server/ctdb_daemon.c | 5 +++++ 3 files changed, 42 insertions(+), 1 deletions(-) Changeset truncated at 500 lines: diff --git a/server/ctdb_call.c b/server/ctdb_call.c index ca6fba7..b666a9e 100644 --- a/server/ctdb_call.c +++ b/server/ctdb_call.c @@ -69,6 +69,11 @@ static void ctdb_send_error(struct ctdb_context *ctdb, char *msg; int msglen, len; + if (ctdb->methods == NULL) { + DEBUG(DEBUG_ERR,(__location__ " Failed to send error. Transport is DOWN\n")); + return; + } + va_start(ap, fmt); msg = talloc_vasprintf(ctdb, fmt, ap); if (msg == NULL) { @@ -141,7 +146,12 @@ static void ctdb_send_dmaster_reply(struct ctdb_db_context *ctdb_db, header->dmaster = new_dmaster; ret = ctdb_ltdb_store(ctdb_db, key, header, data); if (ret != 0) { - ctdb_fatal(ctdb, "ctdb_req_dmaster unable to update dmaster"); + ctdb_fatal(ctdb, "ctdb_send_dmaster_reply unable to update dmaster"); + return; + } + + if (ctdb->methods == NULL) { + ctdb_fatal(ctdb, "ctdb_send_dmaster_reply cant update dmaster sicne transport is down"); return; } @@ -186,6 +196,11 @@ static void ctdb_call_send_dmaster(struct ctdb_db_context *ctdb_db, int len; uint32_t lmaster = ctdb_lmaster(ctdb, key); + if (ctdb->methods == NULL) { + ctdb_fatal(ctdb, "Failed ctdb_call_send_dmaster since transport is down"); + return; + } + if (lmaster == ctdb->pnn) { ctdb_send_dmaster_reply(ctdb_db, header, *key, *data, c->hdr.srcnode, c->hdr.reqid); @@ -367,6 +382,12 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr) struct ctdb_call *call; struct ctdb_db_context *ctdb_db; + if (ctdb->methods == NULL) { + DEBUG(DEBUG_ERR,(__location__ " Failed ctdb_request_call. Transport is DOWN\n")); + return; + } + + ctdb_db = find_ctdb_db(ctdb, c->db_id); if (!ctdb_db) { ctdb_send_error(ctdb, hdr, -1, @@ -663,6 +684,11 @@ struct ctdb_call_state *ctdb_daemon_call_send_remote(struct ctdb_db_context *ctd struct ctdb_call_state *state; struct ctdb_context *ctdb = ctdb_db->ctdb; + if (ctdb->methods == NULL) { + DEBUG(DEBUG_ERR,(__location__ " Failed send packet. Transport is down\n")); + return NULL; + } + state = talloc_zero(ctdb_db, struct ctdb_call_state); CTDB_NO_MEMORY_NULL(ctdb, state); state->call = talloc(state, struct ctdb_call); @@ -742,6 +768,11 @@ void ctdb_send_keepalive(struct ctdb_context *ctdb, uint32_t destnode) { struct ctdb_req_keepalive *r; + if (ctdb->methods == NULL) { + DEBUG(DEBUG_ERR,(__location__ " Failed to send keepalive. Transport is DOWN\n")); + return; + } + r = ctdb_transport_allocate(ctdb, ctdb, CTDB_REQ_KEEPALIVE, sizeof(struct ctdb_req_keepalive), struct ctdb_req_keepalive); diff --git a/server/ctdb_control.c b/server/ctdb_control.c index 4b2498f..8d45543 100644 --- a/server/ctdb_control.c +++ b/server/ctdb_control.c @@ -607,6 +607,11 @@ int ctdb_daemon_send_control(struct ctdb_context *ctdb, uint32_t destnode, struct ctdb_control_state *state; size_t len; + if (ctdb->methods == NULL) { + DEBUG(DEBUG_ERR,(__location__ " Failed to send control. Transport is DOWN\n")); + return -1; + } + if (((destnode == CTDB_BROADCAST_VNNMAP) || (destnode == CTDB_BROADCAST_ALL) || (destnode == CTDB_BROADCAST_CONNECTED)) && diff --git a/server/ctdb_daemon.c b/server/ctdb_daemon.c index 861c90c..1a94cfc 100644 --- a/server/ctdb_daemon.c +++ b/server/ctdb_daemon.c @@ -1000,6 +1000,11 @@ int ctdb_daemon_send_message(struct ctdb_context *ctdb, uint32_t pnn, struct ctdb_req_message *r; int len; + if (ctdb->methods == NULL) { + DEBUG(DEBUG_ERR,(__location__ " Failed to send message. Transport is DOWN\n")); + return -1; + } + /* see if this is a message to ourselves */ if (pnn == ctdb->pnn) { return ctdb_local_message(ctdb, srvid, data); -- CTDB repository