[SCM] CTDB repository - branch master updated - ctdb-1.10-223-ga1b3661
Ronnie Sahlberg
sahlberg at samba.org
Tue Jul 19 23:54:38 MDT 2011
The branch, master has been updated
via a1b3661973489f0111e7975fec422fb99a25f0c8 (commit)
via 8e30dffad5b1385818b2d7350d6c3767a220d745 (commit)
via aa8114a625a637277561a66c80bdece3c27e9e20 (commit)
via 6f51d4a75f8a9f2cdb8ecde946ed31809ab5a415 (commit)
via 114d5034ff4880848588caf493382a537a1469ae (commit)
from 3f698e69a56305c5ec27b8d119bf2d57d5cd2ec6 (commit)
http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit a1b3661973489f0111e7975fec422fb99a25f0c8
Merge: 8e30dffad5b1385818b2d7350d6c3767a220d745 3f698e69a56305c5ec27b8d119bf2d57d5cd2ec6
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Wed Jul 20 15:53:11 2011 +1000
Merge branch 'master' of ssh://git.samba.org/data/git/ctdb
commit 8e30dffad5b1385818b2d7350d6c3767a220d745
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Sat Jul 9 07:14:32 2011 +1000
Add a text about "ban" "unban" not being permanent and htat recovery daemon can auto unban nodes. Suggest using "stop" / "continue" instead.
commit aa8114a625a637277561a66c80bdece3c27e9e20
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Tue Aug 3 13:34:27 2010 +1000
When trying to re-balance the ip assignment and shuffle ips from
nodes with many addresses to nodes with few addresses,
loop up to num_ips+5 times instead of only 5 times.
When we have very many public ips per node, we might need to loop more than
5 times or else we will exit without reaching optimal balance.
commit 6f51d4a75f8a9f2cdb8ecde946ed31809ab5a415
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Tue Jul 5 06:29:00 2011 +1000
Add log output to wipedb and backupdb
CQ S1025379
commit 114d5034ff4880848588caf493382a537a1469ae
Author: Ronnie Sahlberg <ronniesahlberg at gmail.com>
Date: Tue Jun 28 15:39:38 2011 +1000
change the name for the key for the record where we stoire the public address config from public-addresses... to public_addresses...
CQ1019030
-----------------------------------------------------------------------
Summary of changes:
config/events.d/00.ctdb | 2 +-
doc/ctdb.1.xml | 3 +++
server/ctdb_takeover.c | 14 ++++++++++----
tools/ctdb.c | 5 +++++
4 files changed, 19 insertions(+), 5 deletions(-)
Changeset truncated at 500 lines:
diff --git a/config/events.d/00.ctdb b/config/events.d/00.ctdb
index 61f2031..4f97185 100755
--- a/config/events.d/00.ctdb
+++ b/config/events.d/00.ctdb
@@ -14,7 +14,7 @@ loadconfig
update_config_from_tdb() {
# Pull optional ctdb configuration data out of config.tdb
- PUBLICADDRESSESKEY='public-addresses:node#'`ctdb -t 1 xpnn|sed -e "s/.*://"`
+ PUBLICADDRESSESKEY='public_addresses:node#'`ctdb -t 1 xpnn|sed -e "s/.*://"`
rm -f $CTDB_VARDIR/state/public_addresses
ctdb pfetch config.tdb $PUBLICADDRESSESKEY $CTDB_VARDIR/state/public_addresses 2>/dev/null
[ "$?" = "0" ] && [ `stat --format="%s" /etc/ctdb/state/public_addresses` != "0" ] && [ ! -z "$CTDB_PUBLIC_ADDRESSES" ] && {
diff --git a/doc/ctdb.1.xml b/doc/ctdb.1.xml
index 27a0bb6..a88ecc7 100644
--- a/doc/ctdb.1.xml
+++ b/doc/ctdb.1.xml
@@ -1245,6 +1245,9 @@ HEALTH: NO-HEALTHY-NODES - ERROR - Backup of corrupted TDB in '/var/ctdb/persist
Nodes are automatically banned if they are the cause of too many
cluster recoveries.
</para>
+ <para>
+ This is primarily a testing command. Note that the recovery daemon controls the overall ban state and it may automatically unban nodes at will. Meaning that a node that has been banned by the administrator can and ofter are unbanned before the admin specifid timeout triggers. If wanting to "drop" a node out from the cluster for mainentance or other reasons, use the "stop" / "continue" commands instad of "ban" / "unban".
+ </para>
</refsect2>
<refsect2><title>unban</title>
diff --git a/server/ctdb_takeover.c b/server/ctdb_takeover.c
index c824434..ddbc77f 100644
--- a/server/ctdb_takeover.c
+++ b/server/ctdb_takeover.c
@@ -1260,7 +1260,7 @@ create_merged_ip_list(struct ctdb_context *ctdb)
*/
int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap)
{
- int i, num_healthy, retries;
+ int i, num_healthy, retries, num_ips;
struct ctdb_public_ip ip;
struct ctdb_public_ipv4 ipv4;
uint32_t mask, *nodes;
@@ -1312,6 +1312,12 @@ int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap)
*/
all_ips = create_merged_ip_list(ctdb);
+ /* Count how many ips we have */
+ num_ips = 0;
+ for (tmp_ip=all_ips;tmp_ip;tmp_ip=tmp_ip->next) {
+ num_ips++;
+ }
+
/* If we want deterministic ip allocations, i.e. that the ip addresses
will always be allocated the same way for a specific set of
available/unavailable nodes.
@@ -1445,11 +1451,11 @@ try_again:
/* if the spread between the smallest and largest coverage by
a node is >=2 we steal one of the ips from the node with
most coverage to even things out a bit.
- try to do this at most 5 times since we dont want to spend
- too much time balancing the ip coverage.
+ try to do this a limited number of times since we dont
+ want to spend too much time balancing the ip coverage.
*/
if ( (maxnum > minnum+1)
- && (retries < 5) ){
+ && (retries < (num_ips + 5)) ){
struct ctdb_public_ip_list *tmp;
/* mark one of maxnode's vnn's as unassigned and try
diff --git a/tools/ctdb.c b/tools/ctdb.c
index cd40e38..3898231 100644
--- a/tools/ctdb.c
+++ b/tools/ctdb.c
@@ -4203,6 +4203,9 @@ done:
DEBUG(DEBUG_ERR,("close failed: %s\n", strerror(errno)));
}
}
+
+ DEBUG(DEBUG_ERR,("Database acked up to %s\n", argv[1]));
+
talloc_free(tmp_ctx);
return status;
}
@@ -4646,6 +4649,8 @@ static int control_wipedb(struct ctdb_context *ctdb, int argc,
return -1;
}
+ DEBUG(DEBUG_ERR, ("Database wiped.\n"));
+
talloc_free(tmp_ctx);
return 0;
}
--
CTDB repository
More information about the samba-cvs
mailing list