The branch, 1.2.39 has been updated
       via  0491fdec7b11b0e79750c92977c6cc776d5f88bf (commit)
       via  a3ad2d631ebbee1beb8c4ce6bc1d50e5e8dee68b (commit)
       via  4478fd041647029240703493d84290402fa05bdb (commit)
       via  374cc28b910334b6f989e7bdbc2e9c62ca735787 (commit)
      from  f053a6d2948a1933d38d6cdd4cae55349e71b7d4 (commit)

http://gitweb.samba.org/?p=ctdb.git;a=shortlog;h=1.2.39


- Log -----------------------------------------------------------------
commit 0491fdec7b11b0e79750c92977c6cc776d5f88bf
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Thu Oct 25 12:09:07 2012 +1100

    New version 1.2.39-5
    
    (Re-creating the tags for releases not tagged in git)
    
    Signed-off-by: Amitay Isaacs <ami...@gmail.com>

commit a3ad2d631ebbee1beb8c4ce6bc1d50e5e8dee68b
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Thu Oct 25 12:08:13 2012 +1100

    Revert "When adding ips to nodes, set up a deferred rebalance for the whole 
node to trigger after 60 seconds in case the normal ipreallocated is not 
sufficient to trigger rebalance."
    
    This reverts commit abd73b5494906c915c3379852524495957a1bf50.

commit 4478fd041647029240703493d84290402fa05bdb
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Thu Oct 25 12:07:54 2012 +1100

    Revert "Add a tunable variable to control how long we defer after a ctdb 
addip until we force a rebalance and try to failback addresses onto this node"
    
    This reverts commit e86e0e8547593eb8ea2d5c65892de81eac694783.

commit 374cc28b910334b6f989e7bdbc2e9c62ca735787
Author: Amitay Isaacs <ami...@gmail.com>
Date:   Thu Oct 25 11:57:14 2012 +1100

    New version 1.2.39-4
    
    (Re-creating the tags for releases not tagged in git)
    
    Signed-off-by: Amitay Isaacs <ami...@gmail.com>

-----------------------------------------------------------------------

Summary of changes:
 include/ctdb_private.h     |    2 -
 include/ctdb_protocol.h    |    5 ----
 packaging/RPM/ctdb.spec.in |    6 ++++-
 server/ctdb_recoverd.c     |   56 --------------------------------------------
 server/ctdb_takeover.c     |   40 -------------------------------
 server/ctdb_tunables.c     |    3 +-
 tools/ctdb.c               |   45 ++---------------------------------
 7 files changed, 9 insertions(+), 148 deletions(-)


Changeset truncated at 500 lines:

diff --git a/include/ctdb_private.h b/include/ctdb_private.h
index b490b4d..e3a9a15 100644
--- a/include/ctdb_private.h
+++ b/include/ctdb_private.h
@@ -122,7 +122,6 @@ struct ctdb_tunable {
        uint32_t vacuum_fast_path_count;
        uint32_t lcp2_public_ip_assignment;
        uint32_t allow_client_db_attach;
-       uint32_t deferred_rebalance_on_node_add;
 };
 
 /*
@@ -1443,7 +1442,6 @@ bool lcp2_failback(struct ctdb_context *ctdb,
                   struct ctdb_public_ip_list *all_ips,
                   uint32_t *lcp2_imbalances,
                   bool *newly_healthy);
-void lcp2_forcerebalance(struct ctdb_context *ctdb, uint32_t pnn);
 void ctdb_takeover_run_core(struct ctdb_context *ctdb,
                            struct ctdb_node_map *nodemap,
                            struct ctdb_public_ip_list **all_ips_p);
diff --git a/include/ctdb_protocol.h b/include/ctdb_protocol.h
index 1a116c1..0422afe 100644
--- a/include/ctdb_protocol.h
+++ b/include/ctdb_protocol.h
@@ -127,11 +127,6 @@ struct ctdb_call_info {
  */
 #define CTDB_SRVID_TAKEOVER_RUN 0xFB00000000000000LL
 
-/* request recovery daemon to rebalance ips for a node.
-   input is uint32_t for the node id.
-*/
-#define CTDB_SRVID_REBALANCE_NODE 0xFB01000000000000LL
-
 /* A message id to ask the recovery daemon to temporarily disable the
    public ip checks
 */
diff --git a/packaging/RPM/ctdb.spec.in b/packaging/RPM/ctdb.spec.in
index 4f46827..12a9e0b 100644
--- a/packaging/RPM/ctdb.spec.in
+++ b/packaging/RPM/ctdb.spec.in
@@ -4,7 +4,7 @@ Summary: Clustered TDB
 Vendor: Samba Team
 Packager: Samba Team <sa...@samba.org>
 Version: 1.2.39
-Release: 3GITHASH
+Release: 5GITHASH
 Epoch: 0
 License: GNU GPL version 3
 Group: System Environment/Daemons
@@ -144,6 +144,10 @@ development libraries for ctdb
 %{_libdir}/libctdb.a
 
 %changelog
+* Mon Mar 5 2012 : version 1.2.39-5
+ - remove change for 35306
+* Wed Feb 29 2012 : version 1.2.39-4
+ - change default vacuuming timeout to 120 seconds
 * Tue Feb 28 2012 : version 1.2.39-3
  - fix for memory corruption S1034147
  - fix for imbalance after addip S1035305
diff --git a/server/ctdb_recoverd.c b/server/ctdb_recoverd.c
index d206d3d..4963c3f 100644
--- a/server/ctdb_recoverd.c
+++ b/server/ctdb_recoverd.c
@@ -65,7 +65,6 @@ struct ctdb_recoverd {
        struct ip_reallocate_list *reallocate_callers;
        TALLOC_CTX *ip_check_disable_ctx;
        struct ctdb_control_get_ifaces *ifaces;
-       TALLOC_CTX *deferred_rebalance_ctx;
 };
 
 #define CONTROL_TIMEOUT() timeval_current_ofs(ctdb->tunable.recover_timeout, 0)
@@ -1942,57 +1941,6 @@ static void reenable_ip_check(struct event_context *ev, 
struct timed_event *te,
 }
 
 
-static void ctdb_rebalance_timeout(struct event_context *ev, struct 
timed_event *te, 
-                                 struct timeval t, void *p)
-{
-       struct ctdb_recoverd *rec = talloc_get_type(p, struct ctdb_recoverd);
-       struct ctdb_context *ctdb = rec->ctdb;
-       int ret;
-
-       DEBUG(DEBUG_NOTICE,("Rebalance all nodes that have had ip assignment 
changes.\n"));
-
-       ret = ctdb_takeover_run(ctdb, rec->nodemap);
-       if (ret != 0) {
-               DEBUG(DEBUG_ERR, (__location__ " Unable to setup public 
takeover addresses. ctdb_takeover_run() failed.\n"));
-               rec->need_takeover_run = true;
-       }
-
-       talloc_free(rec->deferred_rebalance_ctx);
-       rec->deferred_rebalance_ctx = NULL;
-}
-
-       
-static void recd_node_rebalance_handler(struct ctdb_context *ctdb, uint64_t 
srvid, 
-                            TDB_DATA data, void *private_data)
-{
-       uint32_t pnn;
-       struct ctdb_recoverd *rec = talloc_get_type(private_data, struct 
ctdb_recoverd);
-
-       if (data.dsize != sizeof(uint32_t)) {
-               DEBUG(DEBUG_ERR,(__location__ " Incorrect size of node 
rebalance message. Was %zd but expected %zd bytes\n", data.dsize, 
sizeof(uint32_t)));
-               return;
-       }
-
-       if (ctdb->tunable.deferred_rebalance_on_node_add == 0) {
-               return;
-       }
-
-       pnn = *(uint32_t *)&data.dptr[0];
-
-       lcp2_forcerebalance(ctdb, pnn);
-       DEBUG(DEBUG_NOTICE,("Received message to perform node rebalancing for 
node %d\n", pnn));
-
-       if (rec->deferred_rebalance_ctx != NULL) {
-               talloc_free(rec->deferred_rebalance_ctx);
-       }
-       rec->deferred_rebalance_ctx = talloc_new(rec);
-       event_add_timed(ctdb->ev, rec->deferred_rebalance_ctx, 
-                       
timeval_current_ofs(ctdb->tunable.deferred_rebalance_on_node_add, 0),
-                       ctdb_rebalance_timeout, rec);
-}
-
-
-
 static void recd_update_ip_handler(struct ctdb_context *ctdb, uint64_t srvid, 
                             TDB_DATA data, void *private_data)
 {
@@ -3529,10 +3477,6 @@ static void monitor_cluster(struct ctdb_context *ctdb)
        /* register a message port for updating the recovery daemons node 
assignment for an ip */
        ctdb_client_set_message_handler(ctdb, CTDB_SRVID_RECD_UPDATE_IP, 
recd_update_ip_handler, rec);
 
-       /* register a message port for forcing a rebalance of a node next
-          reallocation */
-       ctdb_client_set_message_handler(ctdb, CTDB_SRVID_REBALANCE_NODE, 
recd_node_rebalance_handler, rec);
-
        for (;;) {
                TALLOC_CTX *mem_ctx = talloc_new(ctdb);
                struct timeval start;
diff --git a/server/ctdb_takeover.c b/server/ctdb_takeover.c
index 3dc1e46..9cbafaf 100644
--- a/server/ctdb_takeover.c
+++ b/server/ctdb_takeover.c
@@ -1475,32 +1475,6 @@ bool basic_failback(struct ctdb_context *ctdb,
        return false;
 }
 
-struct ctdb_rebalancenodes {
-       struct ctdb_rebalancenodes *next;
-       uint32_t pnn;
-};
-static struct ctdb_rebalancenodes *force_rebalance_list = NULL;
-
-
-/* set this flag to force the node to be rebalanced even if it just didnt
-   become healthy again.
-*/
-void lcp2_forcerebalance(struct ctdb_context *ctdb, uint32_t pnn)
-{
-       struct ctdb_rebalancenodes *rebalance;
-
-       for (rebalance = force_rebalance_list; rebalance; rebalance = 
rebalance->next) {
-               if (rebalance->pnn == pnn) {
-                       return;
-               }
-       }
-
-       rebalance = talloc(ctdb, struct ctdb_rebalancenodes);
-       rebalance->pnn = pnn;
-       rebalance->next = force_rebalance_list;
-       force_rebalance_list = rebalance;
-}
-
 /* Do necessary LCP2 initialisation.  Bury it in a function here so
  * that we can unit test it.
  * Not static, so we can easily link it into a unit test.
@@ -1533,20 +1507,6 @@ void lcp2_init(struct ctdb_context * tmp_ctx,
                        (*newly_healthy)[tmp_ip->pnn] = false;
                }
        }
-
-       /* 3rd step: if a node is forced to re-balance then
-          we allow failback onto the node */
-       while (force_rebalance_list != NULL) {
-               struct ctdb_rebalancenodes *next = force_rebalance_list->next;
-
-               if (force_rebalance_list->pnn <= nodemap->num) {
-                       (*newly_healthy)[force_rebalance_list->pnn] = true;
-               }
-
-               DEBUG(DEBUG_ERR,("During ipreallocation, forced rebalance of 
node %d\n", force_rebalance_list->pnn));
-               talloc_free(force_rebalance_list);
-               force_rebalance_list = next;
-       }
 }
 
 /* Allocate any unassigned addresses using the LCP2 algorithm to find
diff --git a/server/ctdb_tunables.c b/server/ctdb_tunables.c
index 62a4dd4..092c30f 100644
--- a/server/ctdb_tunables.c
+++ b/server/ctdb_tunables.c
@@ -69,8 +69,7 @@ static const struct {
        { "AllowUnhealthyDBRead", 0,  offsetof(struct ctdb_tunable, 
allow_unhealthy_db_read) },
        { "StatHistoryInterval",  1,  offsetof(struct ctdb_tunable, 
stat_history_interval) },
        { "DeferredAttachTO",  120,  offsetof(struct ctdb_tunable, 
deferred_attach_timeout) },
-       { "AllowClientDBAttach", 1, offsetof(struct ctdb_tunable, 
allow_client_db_attach) },
-       { "DeferredRebalanceOnNodeAdd", 300, offsetof(struct ctdb_tunable, 
deferred_rebalance_on_node_add) }
+       { "AllowClientDBAttach", 1, offsetof(struct ctdb_tunable, 
allow_client_db_attach) }
 };
 
 /*
diff --git a/tools/ctdb.c b/tools/ctdb.c
index eefda39..d49bc8f 100644
--- a/tools/ctdb.c
+++ b/tools/ctdb.c
@@ -1325,44 +1325,6 @@ static int control_moveip(struct ctdb_context *ctdb, int 
argc, const char **argv
        return 0;
 }
 
-static int rebalance_node(struct ctdb_context *ctdb, uint32_t pnn)
-{
-       uint32_t recmaster;
-       TDB_DATA data;
-
-       if (ctdb_ctrl_getrecmaster(ctdb, ctdb, TIMELIMIT(), pnn, &recmaster) != 
0) {
-               DEBUG(DEBUG_ERR, ("Unable to get recmaster from node %u\n", 
pnn));
-               return -1;
-       }
-
-       data.dptr  = (uint8_t *)&pnn;
-       data.dsize = sizeof(uint32_t);
-       if (ctdb_client_send_message(ctdb, recmaster, 
CTDB_SRVID_REBALANCE_NODE, data) != 0) {
-               DEBUG(DEBUG_ERR,("Failed to send message to force node 
reallocation\n"));
-               return -1;
-       }
-
-       return 0;
-}
-
-
-/*
-  rebalance a node by setting it to allow failback and triggering a
-  takeover run
- */
-static int control_rebalancenode(struct ctdb_context *ctdb, int argc, const 
char **argv)
-{
-       switch (options.pnn) {
-       case CTDB_BROADCAST_ALL:
-       case CTDB_CURRENT_NODE:
-               DEBUG(DEBUG_ERR,("You must specify a node number with -n <pnn> 
for the node to rebalance\n"));
-               return -1;
-       }
-
-       return rebalance_node(ctdb, options.pnn);
-}
-
-
 static int rebalance_ip(struct ctdb_context *ctdb, ctdb_sock_addr *addr)
 {
        struct ctdb_public_ip ip;
@@ -1801,12 +1763,12 @@ static int control_addip(struct ctdb_context *ctdb, int 
argc, const char **argv)
                return ret;
        }
 
-       if (rebalance_node(ctdb, options.pnn) != 0) {
-               DEBUG(DEBUG_ERR,("Error when trying to rebalance node\n"));
+       if (rebalance_ip(ctdb, &addr) != 0) {
+               DEBUG(DEBUG_ERR,("Error when trying to reassign ip\n"));
                return -1;
        }
 
-               talloc_free(tmp_ctx);
+       talloc_free(tmp_ctx);
        return 0;
 }
 
@@ -5058,7 +5020,6 @@ static const struct {
        { "readkey",         control_readkey,           true,   false,  "read 
the content off a database key", "<tdb-file> <key>" },
        { "writekey",        control_writekey,          true,   false,  "write 
to a database key", "<tdb-file> <key> <value>" },
        { "checktcpport",    control_chktcpport,        false,  true,  "check 
if a service is bound to a specific tcp port or not", "<port>" },
-       { "rebalancenode",     control_rebalancenode,   false,  false, "release 
a node by allowing it to takeover ips", "<pnn>"},
 };
 
 /*


-- 
CTDB repository

Reply via email to