summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ctdb/protocol/protocol.h3
-rw-r--r--ctdb/protocol/protocol_api.h18
-rw-r--r--ctdb/protocol/protocol_client.c90
-rw-r--r--ctdb/protocol/protocol_control.c74
-rw-r--r--ctdb/tests/src/protocol_client_test.c64
5 files changed, 0 insertions, 249 deletions
diff --git a/ctdb/protocol/protocol.h b/ctdb/protocol/protocol.h
index 169602ca82c..eb321118f84 100644
--- a/ctdb/protocol/protocol.h
+++ b/ctdb/protocol/protocol.h
@@ -856,12 +856,10 @@ struct ctdb_req_control_data {
struct ctdb_client_id *cid;
struct ctdb_addr_info *addr_info;
struct ctdb_transdb *transdb;
- const char *event_str;
struct ctdb_public_ip *pubip;
enum ctdb_event event;
double reclock_latency;
uint32_t role;
- const char *script;
struct ctdb_ban_state *ban_state;
struct ctdb_notify_data *notify;
uint64_t srvid;
@@ -894,7 +892,6 @@ struct ctdb_reply_control_data {
uint32_t caps;
struct ctdb_public_ip_list *pubip_list;
struct ctdb_node_map *nodemap;
- struct ctdb_script_list *script_list;
const char *reclock_file;
struct ctdb_ban_state *ban_state;
uint64_t seqnum;
diff --git a/ctdb/protocol/protocol_api.h b/ctdb/protocol/protocol_api.h
index fd7372447da..1a1b83abe4e 100644
--- a/ctdb/protocol/protocol_api.h
+++ b/ctdb/protocol/protocol_api.h
@@ -397,10 +397,6 @@ void ctdb_req_control_del_public_ip(struct ctdb_req_control *request,
struct ctdb_addr_info *addr_info);
int ctdb_reply_control_del_public_ip(struct ctdb_reply_control *reply);
-void ctdb_req_control_run_eventscripts(struct ctdb_req_control *request,
- const char *event_str);
-int ctdb_reply_control_run_eventscripts(struct ctdb_reply_control *reply);
-
void ctdb_req_control_get_capabilities(struct ctdb_req_control *request);
int ctdb_reply_control_get_capabilities(struct ctdb_reply_control *reply,
uint32_t *caps);
@@ -426,12 +422,6 @@ int ctdb_reply_control_get_nodemap(struct ctdb_reply_control *reply,
TALLOC_CTX *mem_ctx,
struct ctdb_node_map **nodemap);
-void ctdb_req_control_get_event_script_status(struct ctdb_req_control *request,
- uint32_t event);
-int ctdb_reply_control_get_event_script_status(struct ctdb_reply_control *reply,
- TALLOC_CTX *mem_ctx,
- struct ctdb_script_list **script_list);
-
void ctdb_req_control_traverse_kill(struct ctdb_req_control *request,
struct ctdb_traverse_start *traverse);
int ctdb_reply_control_traverse_kill(struct ctdb_reply_control *reply);
@@ -459,14 +449,6 @@ void ctdb_req_control_set_recmasterrole(struct ctdb_req_control *request,
uint32_t recmaster_role);
int ctdb_reply_control_set_recmasterrole(struct ctdb_reply_control *reply);
-void ctdb_req_control_enable_script(struct ctdb_req_control *request,
- const char *script);
-int ctdb_reply_control_enable_script(struct ctdb_reply_control *reply);
-
-void ctdb_req_control_disable_script(struct ctdb_req_control *request,
- const char *script);
-int ctdb_reply_control_disable_script(struct ctdb_reply_control *reply);
-
void ctdb_req_control_set_ban_state(struct ctdb_req_control *request,
struct ctdb_ban_state *ban_state);
int ctdb_reply_control_set_ban_state(struct ctdb_reply_control *reply);
diff --git a/ctdb/protocol/protocol_client.c b/ctdb/protocol/protocol_client.c
index 6eb6ede42cf..63ccdabe5d1 100644
--- a/ctdb/protocol/protocol_client.c
+++ b/ctdb/protocol/protocol_client.c
@@ -1272,27 +1272,6 @@ int ctdb_reply_control_del_public_ip(struct ctdb_reply_control *reply)
return ctdb_reply_control_generic(reply, CTDB_CONTROL_DEL_PUBLIC_IP);
}
-/* CTDB_CONTROL_RUN_EVENTSCRIPTS */
-
-void ctdb_req_control_run_eventscripts(struct ctdb_req_control *request,
- const char *event_str)
-{
- request->opcode = CTDB_CONTROL_RUN_EVENTSCRIPTS;
- request->pad = 0;
- request->srvid = 0;
- request->client_id = 0;
- request->flags = 0;
-
- request->rdata.opcode = CTDB_CONTROL_RUN_EVENTSCRIPTS;
- request->rdata.data.event_str = event_str;
-}
-
-int ctdb_reply_control_run_eventscripts(struct ctdb_reply_control *reply)
-{
- return ctdb_reply_control_generic(reply,
- CTDB_CONTROL_RUN_EVENTSCRIPTS);
-}
-
/* CTDB_CONTROL_GET_CAPABILITIES */
void ctdb_req_control_get_capabilities(struct ctdb_req_control *request)
@@ -1432,35 +1411,6 @@ int ctdb_reply_control_get_nodemap(struct ctdb_reply_control *reply,
return reply->status;
}
-/* CTDB_CONTROL_GET_EVENT_SCRIPT_STATUS */
-
-void ctdb_req_control_get_event_script_status(struct ctdb_req_control *request,
- uint32_t event)
-{
- request->opcode = CTDB_CONTROL_GET_EVENT_SCRIPT_STATUS;
- request->pad = 0;
- request->srvid = 0;
- request->client_id = 0;
- request->flags = 0;
-
- request->rdata.opcode = CTDB_CONTROL_GET_EVENT_SCRIPT_STATUS;
- request->rdata.data.event = event;
-}
-
-int ctdb_reply_control_get_event_script_status(struct ctdb_reply_control *reply,
- TALLOC_CTX *mem_ctx,
- struct ctdb_script_list **slist)
-{
- if (reply->rdata.opcode != CTDB_CONTROL_GET_EVENT_SCRIPT_STATUS) {
- return EPROTO;
- }
-
- if (reply->status == 0) {
- *slist = talloc_steal(mem_ctx, reply->rdata.data.script_list);
- }
- return reply->status;
-}
-
/* CTDB_CONTROL_TRAVERSE_KILL */
void ctdb_req_control_traverse_kill(struct ctdb_req_control *request,
@@ -1607,46 +1557,6 @@ int ctdb_reply_control_set_recmasterrole(struct ctdb_reply_control *reply)
CTDB_CONTROL_SET_RECMASTERROLE);
}
-/* CTDB_CONTROL_ENABLE_SCRIPT */
-
-void ctdb_req_control_enable_script(struct ctdb_req_control *request,
- const char *script)
-{
- request->opcode = CTDB_CONTROL_ENABLE_SCRIPT;
- request->pad = 0;
- request->srvid = 0;
- request->client_id = 0;
- request->flags = 0;
-
- request->rdata.opcode = CTDB_CONTROL_ENABLE_SCRIPT;
- request->rdata.data.script = script;
-}
-
-int ctdb_reply_control_enable_script(struct ctdb_reply_control *reply)
-{
- return ctdb_reply_control_generic(reply, CTDB_CONTROL_ENABLE_SCRIPT);
-}
-
-/* CTDB_CONTROL_DISABLE_SCRIPT */
-
-void ctdb_req_control_disable_script(struct ctdb_req_control *request,
- const char *script)
-{
- request->opcode = CTDB_CONTROL_DISABLE_SCRIPT;
- request->pad = 0;
- request->srvid = 0;
- request->client_id = 0;
- request->flags = 0;
-
- request->rdata.opcode = CTDB_CONTROL_DISABLE_SCRIPT;
- request->rdata.data.script = script;
-}
-
-int ctdb_reply_control_disable_script(struct ctdb_reply_control *reply)
-{
- return ctdb_reply_control_generic(reply, CTDB_CONTROL_DISABLE_SCRIPT);
-}
-
/* CTDB_CONTROL_SET_BAN_STATE */
void ctdb_req_control_set_ban_state(struct ctdb_req_control *request,
diff --git a/ctdb/protocol/protocol_control.c b/ctdb/protocol/protocol_control.c
index a909fc65150..022d9ff351d 100644
--- a/ctdb/protocol/protocol_control.c
+++ b/ctdb/protocol/protocol_control.c
@@ -253,10 +253,6 @@ static size_t ctdb_req_control_data_len(struct ctdb_req_control_data *cd)
len = ctdb_addr_info_len(cd->data.addr_info);
break;
- case CTDB_CONTROL_RUN_EVENTSCRIPTS:
- len = ctdb_string_len(cd->data.event_str);
- break;
-
case CTDB_CONTROL_GET_CAPABILITIES:
break;
@@ -277,10 +273,6 @@ static size_t ctdb_req_control_data_len(struct ctdb_req_control_data *cd)
case CTDB_CONTROL_GET_NODEMAP:
break;
- case CTDB_CONTROL_GET_EVENT_SCRIPT_STATUS:
- len = ctdb_uint32_len(cd->data.event);
- break;
-
case CTDB_CONTROL_TRAVERSE_KILL:
len = ctdb_traverse_start_len(cd->data.traverse_start);
break;
@@ -306,14 +298,6 @@ static size_t ctdb_req_control_data_len(struct ctdb_req_control_data *cd)
len = ctdb_uint32_len(cd->data.role);
break;
- case CTDB_CONTROL_ENABLE_SCRIPT:
- len = ctdb_string_len(cd->data.script);
- break;
-
- case CTDB_CONTROL_DISABLE_SCRIPT:
- len = ctdb_string_len(cd->data.script);
- break;
-
case CTDB_CONTROL_SET_BAN_STATE:
len = ctdb_ban_state_len(cd->data.ban_state);
break;
@@ -574,10 +558,6 @@ static void ctdb_req_control_data_push(struct ctdb_req_control_data *cd,
ctdb_addr_info_push(cd->data.addr_info, buf);
break;
- case CTDB_CONTROL_RUN_EVENTSCRIPTS:
- ctdb_string_push(cd->data.event_str, buf);
- break;
-
case CTDB_CONTROL_RELEASE_IP:
ctdb_public_ip_push(cd->data.pubip, buf);
break;
@@ -586,10 +566,6 @@ static void ctdb_req_control_data_push(struct ctdb_req_control_data *cd,
ctdb_public_ip_push(cd->data.pubip, buf);
break;
- case CTDB_CONTROL_GET_EVENT_SCRIPT_STATUS:
- ctdb_uint32_push(cd->data.event, buf);
- break;
-
case CTDB_CONTROL_TRAVERSE_KILL:
ctdb_traverse_start_push(cd->data.traverse_start, buf);
break;
@@ -606,14 +582,6 @@ static void ctdb_req_control_data_push(struct ctdb_req_control_data *cd,
ctdb_uint32_push(cd->data.role, buf);
break;
- case CTDB_CONTROL_ENABLE_SCRIPT:
- ctdb_string_push(cd->data.script, buf);
- break;
-
- case CTDB_CONTROL_DISABLE_SCRIPT:
- ctdb_string_push(cd->data.script, buf);
- break;
-
case CTDB_CONTROL_SET_BAN_STATE:
ctdb_ban_state_push(cd->data.ban_state, buf);
break;
@@ -887,11 +855,6 @@ static int ctdb_req_control_data_pull(uint8_t *buf, size_t buflen,
&cd->data.addr_info);
break;
- case CTDB_CONTROL_RUN_EVENTSCRIPTS:
- ret = ctdb_string_pull(buf, buflen, mem_ctx,
- &cd->data.event_str);
- break;
-
case CTDB_CONTROL_RELEASE_IP:
ret = ctdb_public_ip_pull(buf, buflen, mem_ctx,
&cd->data.pubip);
@@ -902,11 +865,6 @@ static int ctdb_req_control_data_pull(uint8_t *buf, size_t buflen,
&cd->data.pubip);
break;
- case CTDB_CONTROL_GET_EVENT_SCRIPT_STATUS:
- ret = ctdb_uint32_pull(buf, buflen, mem_ctx,
- &cd->data.event);
- break;
-
case CTDB_CONTROL_TRAVERSE_KILL:
ret = ctdb_traverse_start_pull(buf, buflen, mem_ctx,
&cd->data.traverse_start);
@@ -927,16 +885,6 @@ static int ctdb_req_control_data_pull(uint8_t *buf, size_t buflen,
&cd->data.role);
break;
- case CTDB_CONTROL_ENABLE_SCRIPT:
- ret = ctdb_string_pull(buf, buflen, mem_ctx,
- &cd->data.script);
- break;
-
- case CTDB_CONTROL_DISABLE_SCRIPT:
- ret = ctdb_string_pull(buf, buflen, mem_ctx,
- &cd->data.script);
- break;
-
case CTDB_CONTROL_SET_BAN_STATE:
ret = ctdb_ban_state_pull(buf, buflen, mem_ctx,
&cd->data.ban_state);
@@ -1269,9 +1217,6 @@ static size_t ctdb_reply_control_data_len(struct ctdb_reply_control_data *cd)
case CTDB_CONTROL_DEL_PUBLIC_IP:
break;
- case CTDB_CONTROL_RUN_EVENTSCRIPTS:
- break;
-
case CTDB_CONTROL_GET_CAPABILITIES:
len = ctdb_uint32_len(cd->data.caps);
break;
@@ -1293,10 +1238,6 @@ static size_t ctdb_reply_control_data_len(struct ctdb_reply_control_data *cd)
len = ctdb_node_map_len(cd->data.nodemap);
break;
- case CTDB_CONTROL_GET_EVENT_SCRIPT_STATUS:
- len = ctdb_script_list_len(cd->data.script_list);
- break;
-
case CTDB_CONTROL_TRAVERSE_KILL:
break;
@@ -1319,12 +1260,6 @@ static size_t ctdb_reply_control_data_len(struct ctdb_reply_control_data *cd)
case CTDB_CONTROL_SET_RECMASTERROLE:
break;
- case CTDB_CONTROL_ENABLE_SCRIPT:
- break;
-
- case CTDB_CONTROL_DISABLE_SCRIPT:
- break;
-
case CTDB_CONTROL_SET_BAN_STATE:
break;
@@ -1539,10 +1474,6 @@ static void ctdb_reply_control_data_push(struct ctdb_reply_control_data *cd,
ctdb_node_map_push(cd->data.nodemap, buf);
break;
- case CTDB_CONTROL_GET_EVENT_SCRIPT_STATUS:
- ctdb_script_list_push(cd->data.script_list, buf);
- break;
-
case CTDB_CONTROL_GET_RECLOCK_FILE:
ctdb_string_push(cd->data.reclock_file, buf);
break;
@@ -1716,11 +1647,6 @@ static int ctdb_reply_control_data_pull(uint8_t *buf, size_t buflen,
&cd->data.nodemap);
break;
- case CTDB_CONTROL_GET_EVENT_SCRIPT_STATUS:
- ret = ctdb_script_list_pull(buf, buflen, mem_ctx,
- &cd->data.script_list);
- break;
-
case CTDB_CONTROL_GET_RECLOCK_FILE:
ret = ctdb_string_pull(buf, buflen, mem_ctx,
&cd->data.reclock_file);
diff --git a/ctdb/tests/src/protocol_client_test.c b/ctdb/tests/src/protocol_client_test.c
index 0b6ffbbf4cc..cf068f18593 100644
--- a/ctdb/tests/src/protocol_client_test.c
+++ b/ctdb/tests/src/protocol_client_test.c
@@ -376,11 +376,6 @@ static void fill_ctdb_req_control_data(TALLOC_CTX *mem_ctx,
fill_ctdb_addr_info(mem_ctx, cd->data.addr_info);
break;
- case CTDB_CONTROL_RUN_EVENTSCRIPTS:
- fill_ctdb_string(mem_ctx, &cd->data.event_str);
- assert(cd->data.event_str != NULL);
- break;
-
case CTDB_CONTROL_GET_CAPABILITIES:
break;
@@ -411,10 +406,6 @@ static void fill_ctdb_req_control_data(TALLOC_CTX *mem_ctx,
case CTDB_CONTROL_GET_NODEMAP:
break;
- case CTDB_CONTROL_GET_EVENT_SCRIPT_STATUS:
- cd->data.event = rand_int(CTDB_EVENT_MAX);
- break;
-
case CTDB_CONTROL_TRAVERSE_KILL:
cd->data.traverse_start = talloc(mem_ctx, struct ctdb_traverse_start);
assert(cd->data.traverse_start != NULL);
@@ -442,16 +433,6 @@ static void fill_ctdb_req_control_data(TALLOC_CTX *mem_ctx,
cd->data.role = rand_int(2);
break;
- case CTDB_CONTROL_ENABLE_SCRIPT:
- fill_ctdb_string(mem_ctx, &cd->data.script);
- assert(cd->data.script != NULL);
- break;
-
- case CTDB_CONTROL_DISABLE_SCRIPT:
- fill_ctdb_string(mem_ctx, &cd->data.script);
- assert(cd->data.script != NULL);
- break;
-
case CTDB_CONTROL_SET_BAN_STATE:
cd->data.ban_state = talloc(mem_ctx, struct ctdb_ban_state);
assert(cd->data.ban_state != NULL);
@@ -821,10 +802,6 @@ static void verify_ctdb_req_control_data(struct ctdb_req_control_data *cd,
verify_ctdb_addr_info(cd->data.addr_info, cd2->data.addr_info);
break;
- case CTDB_CONTROL_RUN_EVENTSCRIPTS:
- verify_ctdb_string(cd->data.event_str, cd2->data.event_str);
- break;
-
case CTDB_CONTROL_GET_CAPABILITIES:
break;
@@ -851,10 +828,6 @@ static void verify_ctdb_req_control_data(struct ctdb_req_control_data *cd,
case CTDB_CONTROL_GET_NODEMAP:
break;
- case CTDB_CONTROL_GET_EVENT_SCRIPT_STATUS:
- assert(cd->data.event == cd2->data.event);
- break;
-
case CTDB_CONTROL_TRAVERSE_KILL:
verify_ctdb_traverse_start(cd->data.traverse_start,
cd2->data.traverse_start);
@@ -881,14 +854,6 @@ static void verify_ctdb_req_control_data(struct ctdb_req_control_data *cd,
assert(cd->data.role == cd2->data.role);
break;
- case CTDB_CONTROL_ENABLE_SCRIPT:
- verify_ctdb_string(cd->data.script, cd2->data.script);
- break;
-
- case CTDB_CONTROL_DISABLE_SCRIPT:
- verify_ctdb_string(cd->data.script, cd2->data.script);
- break;
-
case CTDB_CONTROL_SET_BAN_STATE:
verify_ctdb_ban_state(cd->data.ban_state, cd2->data.ban_state);
break;
@@ -1262,9 +1227,6 @@ static void fill_ctdb_reply_control_data(TALLOC_CTX *mem_ctx,
case CTDB_CONTROL_DEL_PUBLIC_IP:
break;
- case CTDB_CONTROL_RUN_EVENTSCRIPTS:
- break;
-
case CTDB_CONTROL_GET_CAPABILITIES:
cd->data.caps = rand32();
break;
@@ -1296,12 +1258,6 @@ static void fill_ctdb_reply_control_data(TALLOC_CTX *mem_ctx,
fill_ctdb_node_map(mem_ctx, cd->data.nodemap);
break;
- case CTDB_CONTROL_GET_EVENT_SCRIPT_STATUS:
- cd->data.script_list = talloc(mem_ctx, struct ctdb_script_list);
- assert(cd->data.script_list != NULL);
- fill_ctdb_script_list(mem_ctx, cd->data.script_list);
- break;
-
case CTDB_CONTROL_TRAVERSE_KILL:
break;
@@ -1325,12 +1281,6 @@ static void fill_ctdb_reply_control_data(TALLOC_CTX *mem_ctx,
case CTDB_CONTROL_SET_RECMASTERROLE:
break;
- case CTDB_CONTROL_ENABLE_SCRIPT:
- break;
-
- case CTDB_CONTROL_DISABLE_SCRIPT:
- break;
-
case CTDB_CONTROL_SET_BAN_STATE:
break;
@@ -1638,9 +1588,6 @@ static void verify_ctdb_reply_control_data(struct ctdb_reply_control_data *cd,
case CTDB_CONTROL_DEL_PUBLIC_IP:
break;
- case CTDB_CONTROL_RUN_EVENTSCRIPTS:
- break;
-
case CTDB_CONTROL_GET_CAPABILITIES:
assert(cd->data.caps == cd2->data.caps);
break;
@@ -1663,11 +1610,6 @@ static void verify_ctdb_reply_control_data(struct ctdb_reply_control_data *cd,
verify_ctdb_node_map(cd->data.nodemap, cd2->data.nodemap);
break;
- case CTDB_CONTROL_GET_EVENT_SCRIPT_STATUS:
- verify_ctdb_script_list(cd->data.script_list,
- cd2->data.script_list);
- break;
-
case CTDB_CONTROL_TRAVERSE_KILL:
break;
@@ -1691,12 +1633,6 @@ static void verify_ctdb_reply_control_data(struct ctdb_reply_control_data *cd,
case CTDB_CONTROL_SET_RECMASTERROLE:
break;
- case CTDB_CONTROL_ENABLE_SCRIPT:
- break;
-
- case CTDB_CONTROL_DISABLE_SCRIPT:
- break;
-
case CTDB_CONTROL_SET_BAN_STATE:
break;