[SCM] Samba Shared Repository - branch master updated
Christian Ambach
ambi at samba.org
Fri Aug 3 06:50:02 MDT 2012
The branch, master has been updated
via 764f2f9 s3-ctdb: return proper exit code
via 0a45e9c s3-ctdb: adjust a loglevel
via 6cfe6e9 s3-ctdb: Fix ctdb_serverids_exist for target nodes that died
via 6d83e35 s3-ctdb: Add debugs to ctdb_serverids_exist
from cff3ad4 lib/dbwrap: rewrite lock order check to ease debugging
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit 764f2f99e0a5df0112031bc6f13f8d752a6a302d
Author: Christian Ambach <ambi at samba.org>
Date: Fri Aug 3 12:42:41 2012 +0200
s3-ctdb: return proper exit code
do not loose the result from ctdbd_messaging_send_blob()
Autobuild-User(master): Christian Ambach <ambi at samba.org>
Autobuild-Date(master): Fri Aug 3 14:49:01 CEST 2012 on sn-devel-104
commit 0a45e9c4d2333192945eb7ba3100b78c1f1c07f0
Author: Christian Ambach <ambi at samba.org>
Date: Fri Aug 3 12:29:10 2012 +0200
s3-ctdb: adjust a loglevel
commit 6cfe6e92a1f962040a22f107086b19159bb7c605
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jul 16 16:18:19 2012 +0200
s3-ctdb: Fix ctdb_serverids_exist for target nodes that died
Signed-off-by: Christian Ambach <ambi at samba.org>
commit 6d83e35410eb852b36678277085726992dc32f98
Author: Volker Lendecke <vl at samba.org>
Date: Mon Jul 16 15:50:06 2012 +0200
s3-ctdb: Add debugs to ctdb_serverids_exist
Signed-off-by: Christian Ambach <ambi at samba.org>
-----------------------------------------------------------------------
Summary of changes:
source3/lib/ctdbd_conn.c | 54 ++++++++++++++++++++++++++++++++++------------
1 files changed, 40 insertions(+), 14 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/lib/ctdbd_conn.c b/source3/lib/ctdbd_conn.c
index 4bad3f0..84f26e0 100644
--- a/source3/lib/ctdbd_conn.c
+++ b/source3/lib/ctdbd_conn.c
@@ -760,7 +760,7 @@ NTSTATUS ctdbd_messaging_send(struct ctdbd_connection *conn,
status = ctdbd_messaging_send_blob(conn, dst_vnn, dst_srvid,
blob.data, blob.length);
TALLOC_FREE(blob.data);
- return NT_STATUS_OK;
+ return status;
}
NTSTATUS ctdbd_messaging_send_blob(struct ctdbd_connection *conn,
@@ -1055,6 +1055,7 @@ static bool ctdb_collect_vnns(TALLOC_CTX *mem_ctx,
vnn_indexes = talloc_array(mem_ctx, unsigned, num_pids);
if (vnn_indexes == NULL) {
+ DEBUG(1, ("talloc_array failed\n"));
goto fail;
}
@@ -1079,6 +1080,7 @@ static bool ctdb_collect_vnns(TALLOC_CTX *mem_ctx,
vnns = talloc_realloc(mem_ctx, vnns, struct ctdb_vnn_list,
num_vnns+1);
if (vnns == NULL) {
+ DEBUG(1, ("talloc_realloc failed\n"));
goto fail;
}
vnns[num_vnns].vnn = vnn;
@@ -1091,11 +1093,13 @@ static bool ctdb_collect_vnns(TALLOC_CTX *mem_ctx,
vnn->srvids = talloc_array(vnns, uint64_t, vnn->num_srvids);
if (vnn->srvids == NULL) {
+ DEBUG(1, ("talloc_array failed\n"));
goto fail;
}
vnn->pid_indexes = talloc_array(vnns, unsigned,
vnn->num_srvids);
if (vnn->pid_indexes == NULL) {
+ DEBUG(1, ("talloc_array failed\n"));
goto fail;
}
}
@@ -1130,6 +1134,7 @@ bool ctdb_serverids_exist(struct ctdbd_connection *conn,
if (!ctdb_collect_vnns(talloc_tos(), pids, num_pids,
&vnns, &num_vnns)) {
+ DEBUG(1, ("ctdb_collect_vnns failed\n"));
goto fail;
}
@@ -1166,16 +1171,16 @@ bool ctdb_serverids_exist(struct ctdbd_connection *conn,
data)),
data_blob_const(vnn->srvids, req.datalen));
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(10, ("ctdb_packet_send failed: %s\n",
- nt_errstr(status)));
+ DEBUG(1, ("ctdb_packet_send failed: %s\n",
+ nt_errstr(status)));
goto fail;
}
}
status = ctdb_packet_flush(conn->pkt);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(10, ("ctdb_packet_flush failed: %s\n",
- nt_errstr(status)));
+ DEBUG(1, ("ctdb_packet_flush failed: %s\n",
+ nt_errstr(status)));
goto fail;
}
@@ -1185,16 +1190,18 @@ bool ctdb_serverids_exist(struct ctdbd_connection *conn,
struct ctdb_reply_control *reply = NULL;
struct ctdb_vnn_list *vnn;
uint32_t reqid;
+ uint8_t *reply_data;
status = ctdb_read_req(conn, 0, talloc_tos(), (void *)&reply);
if (!NT_STATUS_IS_OK(status)) {
- DEBUG(10, ("ctdb_read_req failed: %s\n",
- nt_errstr(status)));
+ DEBUG(1, ("ctdb_read_req failed: %s\n",
+ nt_errstr(status)));
goto fail;
}
if (reply->hdr.operation != CTDB_REPLY_CONTROL) {
- DEBUG(10, ("Received invalid reply\n"));
+ DEBUG(1, ("Received invalid reply %u\n",
+ (unsigned)reply->hdr.operation));
goto fail;
}
@@ -1208,8 +1215,8 @@ bool ctdb_serverids_exist(struct ctdbd_connection *conn,
}
}
if (i == num_vnns) {
- DEBUG(10, ("Received unknown reqid number %u\n",
- (unsigned)reqid));
+ DEBUG(1, ("Received unknown reqid number %u\n",
+ (unsigned)reqid));
goto fail;
}
@@ -1221,9 +1228,26 @@ bool ctdb_serverids_exist(struct ctdbd_connection *conn,
(unsigned)vnn->vnn, vnn->num_srvids,
(unsigned)reply->datalen));
- if (reply->datalen < ((vnn->num_srvids+7)/8)) {
- DEBUG(10, ("Received short reply\n"));
- goto fail;
+ if (reply->datalen >= ((vnn->num_srvids+7)/8)) {
+ /*
+ * Got a real reply
+ */
+ reply_data = reply->data;
+ } else {
+ /*
+ * Got an error reply
+ */
+ DEBUG(5, ("Received short reply len %d, status %u, "
+ "errorlen %u\n",
+ (unsigned)reply->datalen,
+ (unsigned)reply->status,
+ (unsigned)reply->errorlen));
+ dump_data(5, reply->data, reply->errorlen);
+
+ /*
+ * This will trigger everything set to false
+ */
+ reply_data = NULL;
}
for (i=0; i<vnn->num_srvids; i++) {
@@ -1234,7 +1258,9 @@ bool ctdb_serverids_exist(struct ctdbd_connection *conn,
results[idx] = true;
continue;
}
- results[idx] = ((reply->data[i/8] & (1<<(i%8))) != 0);
+ results[idx] =
+ (reply_data != NULL) &&
+ ((reply_data[i/8] & (1<<(i%8))) != 0);
}
TALLOC_FREE(reply);
--
Samba Shared Repository
More information about the samba-cvs
mailing list