[SCM] Samba Shared Repository - branch master updated
Amitay Isaacs
amitay at samba.org
Thu Sep 14 16:43:02 UTC 2017
The branch, master has been updated
via a808c02 ctdb-protocol: Drop marshalling for monitor controls
via 28eda77 ctdb-client: Drop client code for monitor controls
via 98f5f11 ctdb-client: Drop old client code for monitor controls
via b119104 ctdb-daemon: Remove unused function ctdb_stop_monitoring()
via 64225c6 ctdb-daemon: Drop monitoring mode
via 690e3e1 ctdb-tests: Drop implementation of monitor controls
via b00e360 ctdb-daemon: Drop implementation of monitor controls
via 74f29a4 ctdb-daemon: Mark monitoring controls obsolete
via 4b01621 ctdb-docs: Drop mention of unimplemented commands
via 53ae91a ctdb-tools: Drop monitoring-related ctdb commands
via 19318d2 ctdb-daemon: Don't explicitly stop monitoring during shutdown
via 4656b08 ctdb-daemon: Don't explicitly disable monitoring around recovery
via 173aa68 ctdb-daemon: Don't explicitly disable monitoring when stopping a node
via 12cf664 ctdb-daemon: Skip monitoring when not in RUNNING runstate
via 873db69 ctdb-daemon: Skip monitoring when node is inactive
via 5a782a2 ctdb-tests: Drop unused monitoring status support
via a878171 ctdb-client: Initialize ctdb_ltdb_header completely for empty record
via 77c17b0 ctdb-daemon: Free up record data if a call request is deferred
from f0a90a1 libcli: SMB2: NetApps negotiate SMB3_11 but also set the SMB2_CAP_ENCRYPTION flag.
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit a808c0200197a4648caba88a550c8d63f3c8fe63
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Sep 4 14:54:47 2017 +1000
ctdb-protocol: Drop marshalling for monitor controls
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
Autobuild-User(master): Amitay Isaacs <amitay at samba.org>
Autobuild-Date(master): Thu Sep 14 18:42:28 CEST 2017 on sn-devel-144
commit 28eda778465272e6d0afa4d03da70d3c9e0d9472
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Sep 4 14:51:38 2017 +1000
ctdb-client: Drop client code for monitor controls
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 98f5f1122be9252f10e81c81e134599fd49575a1
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Sep 4 14:51:02 2017 +1000
ctdb-client: Drop old client code for monitor controls
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit b119104267635d96b1f99a2e98d35438841585bf
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Sep 11 10:54:03 2017 +1000
ctdb-daemon: Remove unused function ctdb_stop_monitoring()
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 64225c63dd982b34154c2e2b4a92e610c29183bd
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Sep 4 14:44:16 2017 +1000
ctdb-daemon: Drop monitoring mode
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 690e3e13f22e1dd11d9a1d25659ff549f4aa8488
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Sep 4 14:43:41 2017 +1000
ctdb-tests: Drop implementation of monitor controls
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit b00e3605151b739c4cac8f81af7b081dee2c7df7
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Sep 4 14:33:17 2017 +1000
ctdb-daemon: Drop implementation of monitor controls
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 74f29a48dbbb980f7e22783e80cee03feb2c18de
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Sep 4 14:22:44 2017 +1000
ctdb-daemon: Mark monitoring controls obsolete
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 4b01621912b75b3bf5cfe1473f94a6b8aff5ddbf
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Sep 4 14:19:10 2017 +1000
ctdb-docs: Drop mention of unimplemented commands
Some of these are only in a comment but git grep finds them.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 53ae91a4f74c7a623077fa88e8f1a3a7fa55a5aa
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Sep 4 14:18:49 2017 +1000
ctdb-tools: Drop monitoring-related ctdb commands
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 19318d28354190a9cfafa1696e41c90351f85af9
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Sep 11 10:48:50 2017 +1000
ctdb-daemon: Don't explicitly stop monitoring during shutdown
Monitoring is skipped when not in run state RUNNING, so remove the
dependency on the monitoring code.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 4656b0816abfcf3848715ad6f58f9093e2613aea
Author: Martin Schwenke <martin at meltin.net>
Date: Fri Sep 1 12:12:45 2017 +1000
ctdb-daemon: Don't explicitly disable monitoring around recovery
Monitoring can fail during recovery due to databases (e.g. registry)
being unavailable. This has been avoided by explicitly disabling
monitoring around recovery via the START_RECOVERY and END_RECOVERY
controls. With this approach only there is still a window between
enabling recovery mode and START_RECOVERY when monitoring could be
attempted. However, explicitly disabling monitoring is unnecessary
because monitoring is not done when a node is in recovery.
So remove the explicit disable/enable of monitoring and rely on
monitoring being skipped when recovery mode is active.
The only possible change of behaviour with this change is that there
is now a window between setting recovery mode to normal and the
END_RECOVERY control where monitoring is enabled. However, at this
point databases would be available and the "recovered" event will
cancel any in-progress monitoring.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 173aa683d5af2c32588375045448a7c1a242904c
Author: Martin Schwenke <martin at meltin.net>
Date: Tue Jul 7 20:41:05 2015 +1000
ctdb-daemon: Don't explicitly disable monitoring when stopping a node
Monitoring is now avoided for inactive nodes anyway.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 12cf6640e4a1e3b6fd733ee9a81ebb2dafa71559
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Sep 4 14:39:01 2017 +1000
ctdb-daemon: Skip monitoring when not in RUNNING runstate
Monitoring does not need to be done in other states.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 873db694c9c89016bda0b633802b8eb47a06a0ab
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Jul 6 15:37:23 2015 +1000
ctdb-daemon: Skip monitoring when node is inactive
This is currently handled by explicitly disabling monitoring in
various places. However, those places shouldn't need to know about
monitoring but it is OK for monitoring to know about global node
states.
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit 5a782a24a786d7c744d3ff69036b9734e416a982
Author: Martin Schwenke <martin at meltin.net>
Date: Mon Sep 4 15:33:54 2017 +1000
ctdb-tests: Drop unused monitoring status support
Signed-off-by: Martin Schwenke <martin at meltin.net>
Reviewed-by: Amitay Isaacs <amitay at gmail.com>
commit a878171cb432673f635a75cce0b72c92bb0d3ec7
Author: Amitay Isaacs <amitay at gmail.com>
Date: Mon Sep 11 14:05:17 2017 +1000
ctdb-client: Initialize ctdb_ltdb_header completely for empty record
ctdb_ltdb_fetch() only fills in relevant portion of ctdb_ltdb_header
if the record does not exist. This can result in uninitialized writes
to ctdb_rec_buffer.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
commit 77c17b03cfc4734142fd86ba3cdd9663e75f34e3
Author: Amitay Isaacs <amitay at gmail.com>
Date: Mon Sep 11 15:59:19 2017 +1000
ctdb-daemon: Free up record data if a call request is deferred
BUG: https://bugzilla.samba.org/show_bug.cgi?id=13029
If a call request for a key (migration request) is in flight, then all
the subsequent call requests for the same key are deferred. In that case,
the data corresponding to key read from the local tdb is useless and there
is no need to keep it around. Once the deferred call is reprocessed,
the data corresponding to that key will be fetched again.
Signed-off-by: Amitay Isaacs <amitay at gmail.com>
Reviewed-by: Martin Schwenke <martin at meltin.net>
-----------------------------------------------------------------------
Summary of changes:
ctdb/client/client_control_sync.c | 85 ------------------------------
ctdb/client/client_db.c | 6 +--
ctdb/client/client_sync.h | 13 -----
ctdb/client/ctdb_client.c | 65 -----------------------
ctdb/doc/ctdb.1.xml | 12 +----
ctdb/include/ctdb_client.h | 18 -------
ctdb/include/ctdb_private.h | 7 ---
ctdb/protocol/protocol.h | 9 ++--
ctdb/protocol/protocol_api.h | 10 ----
ctdb/protocol/protocol_client.c | 58 --------------------
ctdb/server/ctdb_control.c | 19 +++----
ctdb/server/ctdb_daemon.c | 2 +-
ctdb/server/ctdb_monitor.c | 58 +-------------------
ctdb/server/ctdb_recover.c | 8 ---
ctdb/tests/scripts/integration.bash | 4 --
ctdb/tests/src/fake_ctdbd.c | 69 ------------------------
ctdb/tests/tool/ctdb.disablemonitor.001.sh | 26 ---------
ctdb/tests/tool/ctdb.enablemonitor.001.sh | 32 -----------
ctdb/tests/tool/ctdb.getmonmode.001.sh | 15 ------
ctdb/tools/ctdb.c | 64 ----------------------
20 files changed, 17 insertions(+), 563 deletions(-)
delete mode 100755 ctdb/tests/tool/ctdb.disablemonitor.001.sh
delete mode 100755 ctdb/tests/tool/ctdb.enablemonitor.001.sh
delete mode 100755 ctdb/tests/tool/ctdb.getmonmode.001.sh
Changeset truncated at 500 lines:
diff --git a/ctdb/client/client_control_sync.c b/ctdb/client/client_control_sync.c
index fd31823..343d15d 100644
--- a/ctdb/client/client_control_sync.c
+++ b/ctdb/client/client_control_sync.c
@@ -817,35 +817,6 @@ int ctdb_ctrl_shutdown(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
return 0;
}
-int ctdb_ctrl_get_monmode(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout,
- int *mon_mode)
-{
- struct ctdb_req_control request;
- struct ctdb_reply_control *reply;
- int ret;
-
- ctdb_req_control_get_monmode(&request);
- ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout,
- &request, &reply);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control GET_MONMODE failed to node %u, ret=%d\n",
- destnode, ret));
- return ret;
- }
-
- ret = ctdb_reply_control_get_monmode(reply, mon_mode);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control GET_MONMODE failed, ret=%d\n", ret));
- return ret;
- }
-
- return 0;
-}
-
int ctdb_ctrl_tcp_add(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct ctdb_client_context *client,
int destnode, struct timeval timeout,
@@ -1322,62 +1293,6 @@ int ctdb_ctrl_reload_nodes_file(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
return 0;
}
-int ctdb_ctrl_enable_monitor(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout)
-{
- struct ctdb_req_control request;
- struct ctdb_reply_control *reply;
- int ret;
-
- ctdb_req_control_enable_monitor(&request);
- ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout,
- &request, &reply);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control ENABLE_MONITOR failed to node %u, ret=%d\n",
- destnode, ret));
- return ret;
- }
-
- ret = ctdb_reply_control_enable_monitor(reply);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control ENABLE_MONITOR failed, ret=%d\n", ret));
- return ret;
- }
-
- return 0;
-}
-
-int ctdb_ctrl_disable_monitor(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout)
-{
- struct ctdb_req_control request;
- struct ctdb_reply_control *reply;
- int ret;
-
- ctdb_req_control_disable_monitor(&request);
- ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout,
- &request, &reply);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control DISABLE_MONITOR failed to node %u, ret=%d\n",
- destnode, ret));
- return ret;
- }
-
- ret = ctdb_reply_control_disable_monitor(reply);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,
- ("Control DISABLE_MONITOR failed, ret=%d\n", ret));
- return ret;
- }
-
- return 0;
-}
-
int ctdb_ctrl_add_public_ip(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct ctdb_client_context *client,
int destnode, struct timeval timeout,
diff --git a/ctdb/client/client_db.c b/ctdb/client/client_db.c
index e3eaf7d..e86830e 100644
--- a/ctdb/client/client_db.c
+++ b/ctdb/client/client_db.c
@@ -1116,9 +1116,9 @@ int ctdb_ltdb_fetch(struct ctdb_db_context *db, TDB_DATA key,
return EIO;
}
- header->rsn = 0;
- header->dmaster = CTDB_UNKNOWN_PNN;
- header->flags = 0;
+ *header = (struct ctdb_ltdb_header) {
+ .dmaster = CTDB_UNKNOWN_PNN,
+ };
if (data != NULL) {
*data = tdb_null;
diff --git a/ctdb/client/client_sync.h b/ctdb/client/client_sync.h
index ceda00f..99a886a 100644
--- a/ctdb/client/client_sync.h
+++ b/ctdb/client/client_sync.h
@@ -157,11 +157,6 @@ int ctdb_ctrl_shutdown(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct ctdb_client_context *client,
int destnode, struct timeval timeout);
-int ctdb_ctrl_get_monmode(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout,
- int *mon_mode);
-
int ctdb_ctrl_tcp_add(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct ctdb_client_context *client,
int destnode, struct timeval timeout,
@@ -245,14 +240,6 @@ int ctdb_ctrl_reload_nodes_file(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct ctdb_client_context *client,
int destnode, struct timeval timeout);
-int ctdb_ctrl_enable_monitor(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout);
-
-int ctdb_ctrl_disable_monitor(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
- struct ctdb_client_context *client,
- int destnode, struct timeval timeout);
-
int ctdb_ctrl_add_public_ip(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
struct ctdb_client_context *client,
int destnode, struct timeval timeout,
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c
index 2cff09e..d399cb5 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -2438,71 +2438,6 @@ int ctdb_ctrl_getpnn(struct ctdb_context *ctdb, struct timeval timeout, uint32_t
return res;
}
-/*
- get the monitoring mode of a remote node
- */
-int ctdb_ctrl_getmonmode(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode, uint32_t *monmode)
-{
- int ret;
- int32_t res;
-
- ret = ctdb_control(ctdb, destnode, 0,
- CTDB_CONTROL_GET_MONMODE, 0, tdb_null,
- NULL, NULL, &res, &timeout, NULL);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,(__location__ " ctdb_control for getmonmode failed\n"));
- return -1;
- }
-
- *monmode = res;
-
- return 0;
-}
-
-
-/*
- set the monitoring mode of a remote node to active
- */
-int ctdb_ctrl_enable_monmode(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode)
-{
- int ret;
-
-
- ret = ctdb_control(ctdb, destnode, 0,
- CTDB_CONTROL_ENABLE_MONITOR, 0, tdb_null,
- NULL, NULL,NULL, &timeout, NULL);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,(__location__ " ctdb_control for enable_monitor failed\n"));
- return -1;
- }
-
-
-
- return 0;
-}
-
-/*
- set the monitoring mode of a remote node to disable
- */
-int ctdb_ctrl_disable_monmode(struct ctdb_context *ctdb, struct timeval timeout, uint32_t destnode)
-{
- int ret;
-
-
- ret = ctdb_control(ctdb, destnode, 0,
- CTDB_CONTROL_DISABLE_MONITOR, 0, tdb_null,
- NULL, NULL, NULL, &timeout, NULL);
- if (ret != 0) {
- DEBUG(DEBUG_ERR,(__location__ " ctdb_control for disable_monitor failed\n"));
- return -1;
- }
-
-
-
- return 0;
-}
-
-
/*
sent to a node to make it take over an ip address
diff --git a/ctdb/doc/ctdb.1.xml b/ctdb/doc/ctdb.1.xml
index dbcbd32..c1d8107 100644
--- a/ctdb/doc/ctdb.1.xml
+++ b/ctdb/doc/ctdb.1.xml
@@ -1757,15 +1757,6 @@ HEALTH: NO-HEALTHY-NODES - ERROR - Backup of corrupted TDB in '/usr/local/var/li
</refsect2>
<refsect2>
- <title>getmonmode</title>
- <para>
- This command prints the monitoring mode of a node. This
- indicates when CTDB is monitoring services on the node. The
- monitoring mode is either ENABLED or DISABLED.
- </para>
- </refsect2>
-
- <refsect2>
<title>attach <parameter>DBNAME</parameter> [persistent|replicated]</title>
<para>
Create a new CTDB database called DBNAME and attach to it on
@@ -1836,9 +1827,8 @@ HEALTH: NO-HEALTHY-NODES - ERROR - Backup of corrupted TDB in '/usr/local/var/li
</refsect1>
- <!-- UNDOCUMENTED: showban stats disablemonitor enablemonitor
+ <!-- UNDOCUMENTED: stats
isnotrecmaster addtickle deltickle
- msglisten msgsend
tfetch tstore readkey writekey
checktcpport getdbseqnum ipiface
-->
diff --git a/ctdb/include/ctdb_client.h b/ctdb/include/ctdb_client.h
index 1397895..d9040fb 100644
--- a/ctdb/include/ctdb_client.h
+++ b/ctdb/include/ctdb_client.h
@@ -317,24 +317,6 @@ int ctdb_ctrl_freeze(struct ctdb_context *ctdb, struct timeval timeout,
int ctdb_ctrl_getpnn(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode);
-/*
- get the monitoring mode of a remote node
- */
-int ctdb_ctrl_getmonmode(struct ctdb_context *ctdb, struct timeval timeout,
- uint32_t destnode, uint32_t *monmode);
-
-/*
- set the monitoring mode of a remote node to active
- */
-int ctdb_ctrl_enable_monmode(struct ctdb_context *ctdb,
- struct timeval timeout, uint32_t destnode);
-
-/*
- set the monitoring mode of a remote node to disabled
- */
-int ctdb_ctrl_disable_monmode(struct ctdb_context *ctdb,
- struct timeval timeout, uint32_t destnode);
-
int ctdb_ctrl_takeover_ip(struct ctdb_context *ctdb, struct timeval timeout,
uint32_t destnode, struct ctdb_public_ip *ip);
int ctdb_ctrl_release_ip(struct ctdb_context *ctdb, struct timeval timeout,
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index f5966cd..b38e225 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -747,17 +747,10 @@ int32_t ctdb_control_get_db_statistics(struct ctdb_context *ctdb,
int ctdb_set_notification_script(struct ctdb_context *ctdb, const char *script);
void ctdb_run_notification_script(struct ctdb_context *ctdb, const char *event);
-void ctdb_disable_monitoring(struct ctdb_context *ctdb);
-void ctdb_enable_monitoring(struct ctdb_context *ctdb);
-void ctdb_stop_monitoring(struct ctdb_context *ctdb);
-
void ctdb_wait_for_first_recovery(struct ctdb_context *ctdb);
int32_t ctdb_control_modflags(struct ctdb_context *ctdb, TDB_DATA indata);
-int32_t ctdb_monitoring_mode(struct ctdb_context *ctdb);
-bool ctdb_stopped_monitoring(struct ctdb_context *ctdb);
-
/* from ctdb_persistent.c */
void ctdb_persistent_finish_trans3_commits(struct ctdb_context *ctdb);
diff --git a/ctdb/protocol/protocol.h b/ctdb/protocol/protocol.h
index c61b972..266fc4b 100644
--- a/ctdb/protocol/protocol.h
+++ b/ctdb/protocol/protocol.h
@@ -259,7 +259,7 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS = 0,
CTDB_CONTROL_THAW = 34, /* obsolete */
CTDB_CONTROL_GET_PNN = 35,
CTDB_CONTROL_SHUTDOWN = 36,
- CTDB_CONTROL_GET_MONMODE = 37,
+ CTDB_CONTROL_GET_MONMODE = 37, /* obsolete */
/* #38 removed */
/* #39 removed */
/* #40 removed */
@@ -297,8 +297,8 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS = 0,
CTDB_CONTROL_RELOAD_NODES_FILE = 72,
/* #73 removed */
CTDB_CONTROL_TRY_DELETE_RECORDS = 74,
- CTDB_CONTROL_ENABLE_MONITOR = 75,
- CTDB_CONTROL_DISABLE_MONITOR = 76,
+ CTDB_CONTROL_ENABLE_MONITOR = 75, /* obsolete */
+ CTDB_CONTROL_DISABLE_MONITOR = 76, /* obsolete */
CTDB_CONTROL_ADD_PUBLIC_IP = 77,
CTDB_CONTROL_DEL_PUBLIC_IP = 78,
CTDB_CONTROL_RUN_EVENTSCRIPTS = 79, /* obsolete */
@@ -371,9 +371,6 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS = 0,
CTDB_CONTROL_DB_ATTACH_REPLICATED = 150,
};
-#define CTDB_MONITORING_ENABLED 0
-#define CTDB_MONITORING_DISABLED 1
-
#define MAX_COUNT_BUCKETS 16
#define MAX_HOT_KEYS 10
diff --git a/ctdb/protocol/protocol_api.h b/ctdb/protocol/protocol_api.h
index 83ebd48..d165ba2 100644
--- a/ctdb/protocol/protocol_api.h
+++ b/ctdb/protocol/protocol_api.h
@@ -299,10 +299,6 @@ int ctdb_reply_control_get_pnn(struct ctdb_reply_control *reply,
void ctdb_req_control_shutdown(struct ctdb_req_control *request);
int ctdb_reply_control_shutdown(struct ctdb_reply_control *reply);
-void ctdb_req_control_get_monmode(struct ctdb_req_control *request);
-int ctdb_reply_control_get_monmode(struct ctdb_reply_control *reply,
- int *mon_mode);
-
void ctdb_req_control_tcp_client(struct ctdb_req_control *request,
struct ctdb_connection *conn);
int ctdb_reply_control_tcp_client(struct ctdb_reply_control *reply);
@@ -388,12 +384,6 @@ int ctdb_reply_control_try_delete_records(struct ctdb_reply_control *reply,
TALLOC_CTX *mem_ctx,
struct ctdb_rec_buffer **recbuf);
-void ctdb_req_control_enable_monitor(struct ctdb_req_control *request);
-int ctdb_reply_control_enable_monitor(struct ctdb_reply_control *reply);
-
-void ctdb_req_control_disable_monitor(struct ctdb_req_control *request);
-int ctdb_reply_control_disable_monitor(struct ctdb_reply_control *reply);
-
void ctdb_req_control_add_public_ip(struct ctdb_req_control *request,
struct ctdb_addr_info *addr_info);
int ctdb_reply_control_add_public_ip(struct ctdb_reply_control *reply);
diff --git a/ctdb/protocol/protocol_client.c b/ctdb/protocol/protocol_client.c
index dbe13d0..d750260 100644
--- a/ctdb/protocol/protocol_client.c
+++ b/ctdb/protocol/protocol_client.c
@@ -720,31 +720,6 @@ int ctdb_reply_control_shutdown(struct ctdb_reply_control *reply)
/* CTDB_CONTROL_GET_MONMODE */
-void ctdb_req_control_get_monmode(struct ctdb_req_control *request)
-{
- request->opcode = CTDB_CONTROL_GET_MONMODE;
- request->pad = 0;
- request->srvid = 0;
- request->client_id = 0;
- request->flags = 0;
-
- request->rdata.opcode = CTDB_CONTROL_GET_MONMODE;
-}
-
-int ctdb_reply_control_get_monmode(struct ctdb_reply_control *reply,
- int *mon_mode)
-{
- if (reply->rdata.opcode != CTDB_CONTROL_GET_MONMODE) {
- return EPROTO;
- }
-
- if (reply->status >= 0) {
- *mon_mode = reply->status;
- reply->status = 0;
- }
- return reply->status;
-}
-
/* CTDB_CONTROL_TCP_CLIENT */
void ctdb_req_control_tcp_client(struct ctdb_req_control *request,
@@ -1196,41 +1171,8 @@ int ctdb_reply_control_try_delete_records(struct ctdb_reply_control *reply,
}
/* CTDB_CONTROL_ENABLE_MONITOR */
-
-void ctdb_req_control_enable_monitor(struct ctdb_req_control *request)
-{
- request->opcode = CTDB_CONTROL_ENABLE_MONITOR;
- request->pad = 0;
- request->srvid = 0;
- request->client_id = 0;
- request->flags = 0;
-
- request->rdata.opcode = CTDB_CONTROL_ENABLE_MONITOR;
-}
-
-int ctdb_reply_control_enable_monitor(struct ctdb_reply_control *reply)
-{
- return ctdb_reply_control_generic(reply, CTDB_CONTROL_ENABLE_MONITOR);
-}
-
/* CTDB_CONTROL_DISABLE_MONITOR */
-void ctdb_req_control_disable_monitor(struct ctdb_req_control *request)
-{
- request->opcode = CTDB_CONTROL_DISABLE_MONITOR;
- request->pad = 0;
- request->srvid = 0;
- request->client_id = 0;
- request->flags = 0;
-
- request->rdata.opcode = CTDB_CONTROL_DISABLE_MONITOR;
-}
-
-int ctdb_reply_control_disable_monitor(struct ctdb_reply_control *reply)
-{
- return ctdb_reply_control_generic(reply, CTDB_CONTROL_DISABLE_MONITOR);
-}
-
/* CTDB_CONTROL_ADD_PUBLIC_IP */
void ctdb_req_control_add_public_ip(struct ctdb_req_control *request,
diff --git a/ctdb/server/ctdb_control.c b/ctdb/server/ctdb_control.c
index 6e9bbeb..9f74011 100644
--- a/ctdb/server/ctdb_control.c
+++ b/ctdb/server/ctdb_control.c
@@ -332,22 +332,17 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
CHECK_CONTROL_DATA_SIZE(sizeof(uint32_t));
return ctdb_control_set_recmode(ctdb, c, indata, async_reply, errormsg);
- case CTDB_CONTROL_GET_MONMODE:
- CHECK_CONTROL_DATA_SIZE(0);
- return ctdb_monitoring_mode(ctdb);
-
- case CTDB_CONTROL_ENABLE_MONITOR:
- CHECK_CONTROL_DATA_SIZE(0);
- ctdb_enable_monitoring(ctdb);
- return 0;
+ case CTDB_CONTROL_GET_MONMODE:
+ return control_not_implemented("GET_MONMODE", NULL);
+
+ case CTDB_CONTROL_ENABLE_MONITOR:
+ return control_not_implemented("ENABLE_MONITOR", NULL);
case CTDB_CONTROL_RUN_EVENTSCRIPTS:
return control_not_implemented("RUN_EVENTSCRIPTS", NULL);
- case CTDB_CONTROL_DISABLE_MONITOR:
- CHECK_CONTROL_DATA_SIZE(0);
- ctdb_disable_monitoring(ctdb);
- return 0;
+ case CTDB_CONTROL_DISABLE_MONITOR:
+ return control_not_implemented("DISABLE_MONITOR", NULL);
case CTDB_CONTROL_SHUTDOWN:
DEBUG(DEBUG_NOTICE,("Received SHUTDOWN command.\n"));
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 7fceed0..6a95470 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -646,6 +646,7 @@ static void daemon_request_call_from_client(struct ctdb_client *client,
DEBUG(DEBUG_ERR,(__location__ " ctdb_ltdb_unlock() failed with error %d\n", ret));
}
CTDB_DECREMENT_STAT(ctdb, pending_calls);
+ talloc_free(data.dptr);
return;
}
}
@@ -1799,7 +1800,6 @@ void ctdb_shutdown_sequence(struct ctdb_context *ctdb, int exit_code)
ctdb_set_runstate(ctdb, CTDB_RUNSTATE_SHUTDOWN);
ctdb_stop_recoverd(ctdb);
ctdb_stop_keepalive(ctdb);
- ctdb_stop_monitoring(ctdb);
--
Samba Shared Repository
More information about the samba-cvs
mailing list