[SCM] CTDB repository - branch 1.2 updated - ctdb-1.0.114-324-g3468afe
Ronnie Sahlberg
sahlberg at samba.org
Thu Sep 9 00:36:37 MDT 2010
The branch, 1.2 has been updated
via 3468afea3b49926870d76865df5a03f91e8411af (commit)
via 0b0cdc93eace016fa6f789e81c5fd8abea246df4 (commit)
from 510a545ce0d1b10b83bb2ffa265ff573d36839f2 (commit)
http://gitweb.samba.org/?p=sahlberg/ctdb.git;a=shortlog;h=1.2
- Log -----------------------------------------------------------------
commit 3468afea3b49926870d76865df5a03f91e8411af
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Thu Sep 9 16:34:00 2010 +1000
new version 1.2.5
- Suppress some VSFTPD warnings
- Make sure all STATD directories exist before we dereference them
- AIX socket fix
- Fix for a crash when we write a debug message after a memory allocation
fail. Fix the message and call ctdb_fatal() properly
- Move the state directory off /etc/ctdb and to /var/ctdb
- Natgw changes to allow "slave only" natgw members
- Fix "ctdb listnodes" so it works again.
commit 0b0cdc93eace016fa6f789e81c5fd8abea246df4
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Thu Sep 9 07:35:10 2010 +1000
Dont try to read the nodemap from the daemon for "ctdb listnodes"
Always read it from the /etc/ctdb/nodes file
-----------------------------------------------------------------------
Summary of changes:
packaging/RPM/ctdb.spec.in | 11 +++++++-
tools/ctdb.c | 63 +++++++++++++------------------------------
2 files changed, 29 insertions(+), 45 deletions(-)
Changeset truncated at 500 lines:
diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in
index bf798ff..09c4a9e 100644
--- a/packaging/RPM/ctdb.spec.in
+++ b/packaging/RPM/ctdb.spec.in
@@ -3,7 +3,7 @@ Name: ctdb
Summary: Clustered TDB
Vendor: Samba Team
Packager: Samba Team <samba at samba.org>
-Version: 1.2.4
+Version: 1.2.5
Release: 1GITHASH
Epoch: 0
License: GNU GPL version 3
@@ -142,6 +142,15 @@ development libraries for ctdb
%{_libdir}/libctdb.a
%changelog
+* Thu Sep 9 2010 : Version 1.2.5
+ - Suppress some VSFTPD warnings
+ - Make sure all STATD directories exist before we dereference them
+ - AIX socket fix
+ - Fix for a crash when we write a debug message after a memory allocation
+ fail. Fix the message and call ctdb_fatal() properly
+ - Move the state directory off /etc/ctdb and to /var/ctdb
+ - Natgw changes to allow "slave only" natgw members
+ - Fix "ctdb listnodes" so it works again.
* Mon Aug 30 2010 : Version 1.2.4
- fix a bug in the ipreallocate eventscript handling
- remove a debug logentry
diff --git a/tools/ctdb.c b/tools/ctdb.c
index 389dfdb..4564510 100644
--- a/tools/ctdb.c
+++ b/tools/ctdb.c
@@ -4541,60 +4541,35 @@ static int control_msglisten(struct ctdb_context *ctdb, int argc, const char **a
/*
list all nodes in the cluster
- if the daemon is running, we read the data from the daemon.
- if the daemon is not running we parse the nodes file directly
+ we parse the nodes file directly
*/
static int control_listnodes(struct ctdb_context *ctdb, int argc, const char **argv)
{
- int i, ret;
- struct ctdb_node_map *nodemap=NULL;
+ TALLOC_CTX *mem_ctx = talloc_new(NULL);
+ struct pnn_node *pnn_nodes;
+ struct pnn_node *pnn_node;
- if (ctdb != NULL) {
- ret = ctdb_ctrl_getnodemap(ctdb, TIMELIMIT(), options.pnn, ctdb, &nodemap);
- if (ret != 0) {
- DEBUG(DEBUG_ERR, ("Unable to get nodemap from node %u\n", options.pnn));
- return ret;
- }
+ pnn_nodes = read_nodes_file(mem_ctx);
+ if (pnn_nodes == NULL) {
+ DEBUG(DEBUG_ERR,("Failed to read nodes file\n"));
+ talloc_free(mem_ctx);
+ return -1;
+ }
- for(i=0;i<nodemap->num;i++){
- if (nodemap->nodes[i].flags & NODE_FLAGS_DELETED) {
- continue;
- }
- if (options.machinereadable){
- printf(":%d:%s:\n", nodemap->nodes[i].pnn, ctdb_addr_to_str(&nodemap->nodes[i].addr));
- } else {
- printf("%s\n", ctdb_addr_to_str(&nodemap->nodes[i].addr));
- }
- }
- } else {
- TALLOC_CTX *mem_ctx = talloc_new(NULL);
- struct pnn_node *pnn_nodes;
- struct pnn_node *pnn_node;
-
- pnn_nodes = read_nodes_file(mem_ctx);
- if (pnn_nodes == NULL) {
- DEBUG(DEBUG_ERR,("Failed to read nodes file\n"));
+ for(pnn_node=pnn_nodes;pnn_node;pnn_node=pnn_node->next) {
+ ctdb_sock_addr addr;
+ if (parse_ip(pnn_node->addr, NULL, 63999, &addr) == 0) {
+ DEBUG(DEBUG_ERR,("Wrongly formed ip address '%s' in nodes file\n", pnn_node->addr));
talloc_free(mem_ctx);
return -1;
}
-
- for(pnn_node=pnn_nodes;pnn_node;pnn_node=pnn_node->next) {
- ctdb_sock_addr addr;
-
- if (parse_ip(pnn_node->addr, NULL, 63999, &addr) == 0) {
- DEBUG(DEBUG_ERR,("Wrongly formed ip address '%s' in nodes file\n", pnn_node->addr));
- talloc_free(mem_ctx);
- return -1;
- }
-
- if (options.machinereadable){
- printf(":%d:%s:\n", pnn_node->pnn, pnn_node->addr);
- } else {
- printf("%s\n", pnn_node->addr);
- }
+ if (options.machinereadable){
+ printf(":%d:%s:\n", pnn_node->pnn, pnn_node->addr);
+ } else {
+ printf("%s\n", pnn_node->addr);
}
- talloc_free(mem_ctx);
}
+ talloc_free(mem_ctx);
return 0;
}
--
CTDB repository
More information about the samba-cvs
mailing list