ctdb-scripts: Drop update of public address configuration from config.tdb
authorMartin Schwenke <martin@meltin.net>
Tue, 30 Dec 2014 05:17:19 +0000 (16:17 +1100)
committerAmitay Isaacs <amitay@samba.org>
Sun, 10 May 2015 01:22:13 +0000 (03:22 +0200)
This isn't used or documented anywhere.

2 differing points of view:

* This is a very good idea but it should probably be generalised to
  cover more configuration items.  This would end up like the Samba
  registry configuration and would use a tool to support setting
  configuration values.

* If people really want to update configuration while a node is down
  then they should fix the configuration before bringing up that node.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/events.d/00.ctdb

index d8096ee46c60d9c0d81d8c8a5f4eb1034abd6a62..5e8af4cbede3ca02c5f19e59003aaf8895c44aa6 100755 (executable)
@@ -100,27 +100,6 @@ EOF
     done
 }
 
-update_config_from_tdb() {
-
-    # Pull optional ctdb configuration data out of config.tdb
-    ctdb_get_pnn
-    _key="public_addresses:node#${pnn}"
-    _t="$service_state_dir/public_addresses"
-    rm -f "$_t"
-
-    if ctdb pfetch config.tdb "$_key" "$_t" 2>/dev/null && \
-       [ -s "$_t" -a -n "$CTDB_PUBLIC_ADDRESSES"] && \
-       ! cmp -s "$_t" "$CTDB_PUBLIC_ADDRESSES" ; then
-
-       echo "CTDB public address configuration has changed."
-       echo "Extracting new configuration from database."
-       diff "$_t" "$CTDB_PUBLIC_ADDRESSES"
-       cp "$_t" "$CTDB_PUBLIC_ADDRESSES"
-       echo "Restarting CTDB"
-       service ctdb restart &
-    fi
-}
-
 set_ctdb_variables ()
 {
     # set any tunables from the config file
@@ -211,7 +190,6 @@ case "$1" in
 
     startup)
        ctdb attach ctdb.tdb persistent
-       update_config_from_tdb &
        ;;
     monitor)
        monitor_system_memory