summaryrefslogtreecommitdiffstats
path: root/ctdb/tools/ctdb.c
diff options
context:
space:
mode:
authorRonnie Sahlberg <ronniesahlberg@gmail.com>2009-07-17 09:45:05 +1000
committerRonnie Sahlberg <ronniesahlberg@gmail.com>2009-07-17 09:45:05 +1000
commit9c6aa4e4207841efc36d8b588d434a45e2e08733 (patch)
tree38937301ca3ac3ba32d699a07abbc6241a3020f1 /ctdb/tools/ctdb.c
parent5ce69e2fa379964ae1a50ba4a013b1a5480f8fba (diff)
downloadsamba-9c6aa4e4207841efc36d8b588d434a45e2e08733.tar.gz
samba-9c6aa4e4207841efc36d8b588d434a45e2e08733.tar.xz
samba-9c6aa4e4207841efc36d8b588d434a45e2e08733.zip
update the eventscript to ensure that stopped nodes can not become the natgw master
also verify that we actually do have a natgw master available if this is configured and make the node unhealthy if not. (This used to be ctdb commit 7f273ee769d671d8c8be87c9187302fb77e814f3)
Diffstat (limited to 'ctdb/tools/ctdb.c')
-rw-r--r--ctdb/tools/ctdb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/ctdb/tools/ctdb.c b/ctdb/tools/ctdb.c
index d1ff759351..e0e728f4f9 100644
--- a/ctdb/tools/ctdb.c
+++ b/ctdb/tools/ctdb.c
@@ -682,7 +682,7 @@ static int control_natgwlist(struct ctdb_context *ctdb, int argc, const char **a
*/
for(i=0;i<nodemap->num;i++){
if (!(nodemap->nodes[i].flags & (NODE_FLAGS_DISCONNECTED|NODE_FLAGS_STOPPED|NODE_FLAGS_DELETED))) {
- printf("%d\n", nodemap->nodes[i].pnn);
+ printf("%d %s\n", nodemap->nodes[i].pnn,ctdb_addr_to_str(&nodemap->nodes[i].addr));
break;
}
}
@@ -690,13 +690,13 @@ static int control_natgwlist(struct ctdb_context *ctdb, int argc, const char **a
if (i == nodemap->num) {
for(i=0;i<nodemap->num;i++){
if (!(nodemap->nodes[i].flags & (NODE_FLAGS_DISCONNECTED|NODE_FLAGS_DELETED))) {
- printf("%d\n", nodemap->nodes[i].pnn);
+ printf("%d %s\n", nodemap->nodes[i].pnn, ctdb_addr_to_str(&nodemap->nodes[i].addr));
break;
}
}
/* or if we still can not find any */
if (i == nodemap->num) {
- printf("-1\n");
+ printf("-1 0.0.0.0\n");
}
}