The branch, master has been updated via 947bcc76ff0e90b613f20246be67ff014098a74d (commit) via e8f3431597bc9ec67387ea7e702d2d00f36007f0 (commit) via bc251ac7029c2689776a8c31b28ac1d233d52d4f (commit) via cb2c05d5d3f8908eecdad1ae6a1dc8efa1ffcb1e (commit) via 2ef839c95a48cd8a5f0ed385e92bdb89de71b4a2 (commit) via f4385712134ea783a0c79a687c5d4e6faa1cc4a7 (commit) via 4063aed8c6babf02726a1663375ea5d32c423e8c (commit) via 79ca87e53dc4c1c73c511680d28db644140a326c (commit) via 7dad1c34f94a433bbb5784cb7156b84bd2e8cd1b (commit) via 772052e071718f20a19d24d5e06a5a2ef87549f2 (commit) via 42ceac4d7f31470e9d626a1709de79658aebde7e (commit) via cbf79b2158ab21a58aef967e89f0bd60890a7972 (commit) via badf34692449bf658cef488c0da6c3eb90187555 (commit) from 9e08ab6c9f54f5a2c5790927e9aff107ca85a2cc (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 947bcc76ff0e90b613f20246be67ff014098a74d Merge: f4385712134ea783a0c79a687c5d4e6faa1cc4a7 e8f3431597bc9ec67387ea7e702d2d00f36007f0 Author: Ronnie Sahlberg <[EMAIL PROTECTED]> Date: Thu May 8 17:49:48 2008 +1000 Merge git://git.samba.org/tridge/ctdb commit e8f3431597bc9ec67387ea7e702d2d00f36007f0 Merge: cb2c05d5d3f8908eecdad1ae6a1dc8efa1ffcb1e bc251ac7029c2689776a8c31b28ac1d233d52d4f Author: Andrew Tridgell <[EMAIL PROTECTED]> Date: Thu May 8 17:15:41 2008 +1000 Merge commit 'sofs1/tridge' commit bc251ac7029c2689776a8c31b28ac1d233d52d4f Author: root <[EMAIL PROTECTED]> Date: Thu May 8 17:14:00 2008 +1000 listen_fd is auto-closed Closing it here just causes an epoll error, and may close a fd in use by another structure to be closed. This caused a infinite recovery loop commit cb2c05d5d3f8908eecdad1ae6a1dc8efa1ffcb1e Merge: 4063aed8c6babf02726a1663375ea5d32c423e8c 9e08ab6c9f54f5a2c5790927e9aff107ca85a2cc Author: Andrew Tridgell <[EMAIL PROTECTED]> Date: Thu May 8 16:58:34 2008 +1000 Merge branch 'master' of git://git.samba.org/sahlberg/ctdb commit 2ef839c95a48cd8a5f0ed385e92bdb89de71b4a2 Merge: badf34692449bf658cef488c0da6c3eb90187555 9e08ab6c9f54f5a2c5790927e9aff107ca85a2cc Author: root <[EMAIL PROTECTED]> Date: Thu May 8 16:46:23 2008 +1000 Merge commit 'ronnie-ctdb/master' into tridge commit f4385712134ea783a0c79a687c5d4e6faa1cc4a7 Author: Ronnie Sahlberg <[EMAIL PROTECTED]> Date: Thu May 8 06:52:53 2008 +1000 From Mathias Dietz Make the 60.nfs eventscript more forgiving when using non-us/english characters in sharenames commit 4063aed8c6babf02726a1663375ea5d32c423e8c Author: Ronnie Sahlberg <[EMAIL PROTECTED]> Date: Thu Apr 10 14:45:45 2008 +1000 Revert "- accept an optional set of tdb_flags from clients on open a database," This reverts commit 49330f97c78ca0669615297ac3d8498651831214. commit 79ca87e53dc4c1c73c511680d28db644140a326c Author: Ronnie Sahlberg <[EMAIL PROTECTED]> Date: Thu Apr 10 14:57:41 2008 +1000 Revert "Revert "- accept an optional set of tdb_flags from clients on open a database,"" This reverts commit 171d1d71ef9f2373620bd7da3adaecb405338603. commit 7dad1c34f94a433bbb5784cb7156b84bd2e8cd1b Author: Ronnie Sahlberg <[EMAIL PROTECTED]> Date: Thu Apr 10 15:59:51 2008 +1000 Revert "Revert "Revert "- accept an optional set of tdb_flags from clients on open a database,""" remove the transaction stuff and push so that the git tree will work This reverts commit 539bbdd9b0d0346b42e66ef2fcfb16f39bbe098b. commit 772052e071718f20a19d24d5e06a5a2ef87549f2 Author: Ronnie Sahlberg <[EMAIL PROTECTED]> Date: Tue Apr 15 18:24:48 2008 +1000 make ctdb eventrscipt accept the -n all argument to run the event script on all connected nodes commit 42ceac4d7f31470e9d626a1709de79658aebde7e Author: Ronnie Sahlberg <[EMAIL PROTECTED]> Date: Tue Apr 22 00:56:27 2008 +1000 when a node disgrees with us re who is recmaster make it mark that node as a lcuprit so it eventually gets banned commit cbf79b2158ab21a58aef967e89f0bd60890a7972 Author: Ronnie Sahlberg <[EMAIL PROTECTED]> Date: Wed Apr 23 00:55:57 2008 +1000 add support for -n all in "ctdb -n all ip" this collects all public addresses from all nodes and presents the public ips for the entire cluster commit badf34692449bf658cef488c0da6c3eb90187555 Author: Andrew Tridgell <[EMAIL PROTECTED]> Date: Tue Apr 22 16:48:25 2008 +0200 fixed permissions on configure.rpm ----------------------------------------------------------------------- Summary of changes: config/events.d/60.nfs | 2 +- tcp/tcp_init.c | 3 -- tools/ctdb.c | 78 ++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 79 insertions(+), 4 deletions(-) mode change 100644 => 100755 configure.rpm Changeset truncated at 500 lines: diff --git a/config/events.d/60.nfs b/config/events.d/60.nfs index c84e7be..182d250 100755 --- a/config/events.d/60.nfs +++ b/config/events.d/60.nfs @@ -96,7 +96,7 @@ case $cmd in ctdb_check_rpc "NFS" 100003 3 # and that its directories are available - nfs_dirs=$(grep -v '^#' < /etc/exports | awk {'print $1;'}) + nfs_dirs=$(exportfs | grep -v '^#' | awk {'print $1;'}) ctdb_check_directories "nfs" $nfs_dirs # check that lockd responds to rpc requests diff --git a/configure.rpm b/configure.rpm old mode 100644 new mode 100755 diff --git a/tcp/tcp_init.c b/tcp/tcp_init.c index 527373c..5c53caf 100644 --- a/tcp/tcp_init.c +++ b/tcp/tcp_init.c @@ -147,9 +147,6 @@ static const struct ctdb_methods ctdb_tcp_methods = { static int tcp_ctcp_destructor(struct ctdb_tcp *ctcp) { - if (ctcp->listen_fd) { - close(ctcp->listen_fd); - } ctcp->ctdb->private_data = NULL; ctcp->ctdb->methods = NULL; diff --git a/tools/ctdb.c b/tools/ctdb.c index 6f78b65..f6f0745 100644 --- a/tools/ctdb.c +++ b/tools/ctdb.c @@ -997,6 +997,84 @@ static int tickle_tcp(struct ctdb_context *ctdb, int argc, const char **argv) } +struct node_ip { + uint32_t pnn; + struct sockaddr_in sin; +}; + +void getips_store_callback(void *param, void *data) +{ + struct node_ip *node_ip = (struct node_ip *)data; + struct ctdb_all_public_ips *ips = param; + int i; + + i = ips->num++; + ips->ips[i].pnn = node_ip->pnn; + ips->ips[i].sin = node_ip->sin; +} + +void getips_count_callback(void *param, void *data) +{ + uint32_t *count = param; + + (*count)++; +} + +static int +control_get_all_public_ips(struct ctdb_context *ctdb, TALLOC_CTX *tmp_ctx, struct ctdb_all_public_ips **ips) +{ + struct ctdb_all_public_ips *tmp_ips; + struct ctdb_node_map *nodemap=NULL; + trbt_tree_t *tree; + int i, j, len, ret; + uint32_t count; + + ret = ctdb_ctrl_getnodemap(ctdb, TIMELIMIT(), CTDB_CURRENT_NODE, tmp_ctx, &nodemap); + if (ret != 0) { + DEBUG(DEBUG_ERR, ("Unable to get nodemap from node %u\n", options.pnn)); + return ret; + } + + tree = trbt_create(tmp_ctx, 0); + + for(i=0;i<nodemap->num;i++){ + if (nodemap->nodes[i].flags & NODE_FLAGS_DISCONNECTED) { + continue; + } + + /* read the public ip list from this node */ + ret = ctdb_ctrl_get_public_ips(ctdb, TIMELIMIT(), nodemap->nodes[i].pnn, tmp_ctx, &tmp_ips); + if (ret != 0) { + DEBUG(DEBUG_ERR, ("Unable to get public ip list from node %u\n", nodemap->nodes[i].pnn)); + return -1; + } + + for (j=0; j<tmp_ips->num;j++) { + struct node_ip *node_ip; + + node_ip = talloc(tmp_ctx, struct node_ip); + node_ip->pnn = tmp_ips->ips[j].pnn; + node_ip->sin = tmp_ips->ips[j].sin; + + trbt_insert32(tree, tmp_ips->ips[j].sin.sin_addr.s_addr, node_ip); + } + talloc_free(tmp_ips); + } + + /* traverse */ + count = 0; + trbt_traversearray32(tree, 1, getips_count_callback, &count); + + len = offsetof(struct ctdb_all_public_ips, ips) + + count*sizeof(struct ctdb_public_ip); + tmp_ips = talloc_zero_size(tmp_ctx, len); + trbt_traversearray32(tree, 1, getips_store_callback, tmp_ips); + + *ips = tmp_ips; + + return 0; +} + /* display public ip status */ -- CTDB repository