The branch, master has been updated
       via  6bbf7d8 ctdb: NAT gateway capability and control to set it are 
obsolete
       via  07e878a ctdb-protocol: Drop protocol support for setting NAT gatway 
capability
       via  f71f198 ctdb-client: Drop support for updating NAT gateway 
capability
      from  6f3cc47 selftest: mark samba3.blackbox.dfree_quota as flakey

https://git.samba.org/?p=samba.git;a=shortlog;h=master


- Log -----------------------------------------------------------------
commit 6bbf7d8f09ed37bfa88550ca59e94b0988524d22
Author: Martin Schwenke <mar...@meltin.net>
Date:   Tue Jan 5 16:02:09 2016 +1100

    ctdb: NAT gateway capability and control to set it are obsolete
    
    Signed-off-by: Martin Schwenke <mar...@meltin.net>
    Reviewed-by: Amitay Isaacs <ami...@gmail.com>
    
    Autobuild-User(master): Amitay Isaacs <ami...@samba.org>
    Autobuild-Date(master): Wed Jan 27 18:35:24 CET 2016 on sn-devel-144

commit 07e878ab74d841ba03ca1985bcaf32a175ae291c
Author: Martin Schwenke <mar...@meltin.net>
Date:   Tue Jan 5 16:00:57 2016 +1100

    ctdb-protocol: Drop protocol support for setting NAT gatway capability
    
    This is no longer used.
    
    Signed-off-by: Martin Schwenke <mar...@meltin.net>
    Reviewed-by: Amitay Isaacs <ami...@gmail.com>

commit f71f198a4a8b37bcae2417cec683145177251916
Author: Martin Schwenke <mar...@meltin.net>
Date:   Tue Jan 5 15:59:43 2016 +1100

    ctdb-client: Drop support for updating NAT gateway capability
    
    This is no longer used.
    
    Signed-off-by: Martin Schwenke <mar...@meltin.net>
    Reviewed-by: Amitay Isaacs <ami...@gmail.com>

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

Summary of changes:
 ctdb/client/client.h                  |  5 -----
 ctdb/client/client_control_sync.c     | 29 -----------------------------
 ctdb/client/ctdb_client.c             | 23 -----------------------
 ctdb/include/ctdb_client.h            |  3 ---
 ctdb/protocol/protocol.h              |  5 ++---
 ctdb/protocol/protocol_api.h          |  4 ----
 ctdb/protocol/protocol_client.c       | 20 --------------------
 ctdb/protocol/protocol_control.c      | 16 ----------------
 ctdb/server/ctdb_control.c            | 14 ++------------
 ctdb/tests/src/protocol_client_test.c | 14 --------------
 10 files changed, 4 insertions(+), 129 deletions(-)


Changeset truncated at 500 lines:

diff --git a/ctdb/client/client.h b/ctdb/client/client.h
index bce0c6b..f2f8d6b 100644
--- a/ctdb/client/client.h
+++ b/ctdb/client/client.h
@@ -517,11 +517,6 @@ int ctdb_ctrl_continue_node(TALLOC_CTX *mem_ctx, struct 
tevent_context *ev,
                            struct ctdb_client_context *client,
                            int destnode, struct timeval timeout);
 
-int ctdb_ctrl_set_natgwstate(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
-                            struct ctdb_client_context *client,
-                            int destnode, struct timeval timeout,
-                            uint32_t natgw_role);
-
 int ctdb_ctrl_set_lmasterrole(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
                              struct ctdb_client_context *client,
                              int destnode, struct timeval timeout,
diff --git a/ctdb/client/client_control_sync.c 
b/ctdb/client/client_control_sync.c
index de52b47..7c3cda2 100644
--- a/ctdb/client/client_control_sync.c
+++ b/ctdb/client/client_control_sync.c
@@ -2022,35 +2022,6 @@ int ctdb_ctrl_continue_node(TALLOC_CTX *mem_ctx, struct 
tevent_context *ev,
        return 0;
 }
 
-int ctdb_ctrl_set_natgwstate(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
-                            struct ctdb_client_context *client,
-                            int destnode, struct timeval timeout,
-                            uint32_t natgw_role)
-{
-       struct ctdb_req_control request;
-       struct ctdb_reply_control *reply;
-       int ret;
-
-       ctdb_req_control_set_natgwstate(&request, natgw_role);
-       ret = ctdb_client_control(mem_ctx, ev, client, destnode, timeout,
-                                 &request, &reply);
-       if (ret != 0) {
-               DEBUG(DEBUG_ERR,
-                     ("Control SET_NATGWSTATE failed to node %u, ret=%d\n",
-                      destnode, ret));
-               return ret;
-       }
-
-       ret = ctdb_reply_control_set_natgwstate(reply);
-       if (ret != 0) {
-               DEBUG(DEBUG_ERR,
-                     ("Control SET_NATGWSTATE failed, ret=%d\n", ret));
-               return ret;
-       }
-
-       return 0;
-}
-
 int ctdb_ctrl_set_lmasterrole(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 6615730..9f07472 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -4537,29 +4537,6 @@ int ctdb_ctrl_continue_node(struct ctdb_context *ctdb, 
struct timeval timeout, u
 }
 
 /*
-  set the natgw state for a node
- */
-int ctdb_ctrl_setnatgwstate(struct ctdb_context *ctdb, struct timeval timeout, 
uint32_t destnode, uint32_t natgwstate)
-{
-       int ret;
-       TDB_DATA data;
-       int32_t res;
-
-       data.dsize = sizeof(natgwstate);
-       data.dptr  = (uint8_t *)&natgwstate;
-
-       ret = ctdb_control(ctdb, destnode, 0, 
-                          CTDB_CONTROL_SET_NATGWSTATE, 0, data, 
-                          NULL, NULL, &res, &timeout, NULL);
-       if (ret != 0 || res != 0) {
-               DEBUG(DEBUG_ERR,(__location__ " ctdb_control for setnatgwstate 
failed\n"));
-               return -1;
-       }
-
-       return 0;
-}
-
-/*
   set the lmaster role for a node
  */
 int ctdb_ctrl_setlmasterrole(struct ctdb_context *ctdb, struct timeval 
timeout, uint32_t destnode, uint32_t lmasterrole)
diff --git a/ctdb/include/ctdb_client.h b/ctdb/include/ctdb_client.h
index e81d7bb..e1c8666 100644
--- a/ctdb/include/ctdb_client.h
+++ b/ctdb/include/ctdb_client.h
@@ -582,9 +582,6 @@ int ctdb_ctrl_stop_node(struct ctdb_context *ctdb, struct 
timeval timeout,
 int ctdb_ctrl_continue_node(struct ctdb_context *ctdb, struct timeval timeout,
                            uint32_t destnode);
 
-int ctdb_ctrl_setnatgwstate(struct ctdb_context *ctdb,
-                           struct timeval timeout, uint32_t destnode,
-                           uint32_t natgwstate);
 int ctdb_ctrl_setlmasterrole(struct ctdb_context *ctdb,
                             struct timeval timeout, uint32_t destnode,
                             uint32_t lmasterrole);
diff --git a/ctdb/protocol/protocol.h b/ctdb/protocol/protocol.h
index a2a0c45..a4685d6 100644
--- a/ctdb/protocol/protocol.h
+++ b/ctdb/protocol/protocol.h
@@ -313,7 +313,7 @@ enum ctdb_controls {CTDB_CONTROL_PROCESS_EXISTS          = 
0,
                    CTDB_CONTROL_SET_RECLOCK_FILE        = 100,
                    CTDB_CONTROL_STOP_NODE               = 101,
                    CTDB_CONTROL_CONTINUE_NODE           = 102,
-                   CTDB_CONTROL_SET_NATGWSTATE          = 103,
+                   CTDB_CONTROL_SET_NATGWSTATE          = 103, /* obsolete */
                    CTDB_CONTROL_SET_LMASTERROLE         = 104,
                    CTDB_CONTROL_SET_RECMASTERROLE       = 105,
                    CTDB_CONTROL_ENABLE_SCRIPT           = 107,
@@ -697,8 +697,7 @@ struct ctdb_public_ip_list {
 #define CTDB_CAP_LMASTER               0x00000002
 /* This capability is set if CTDB_LVS_PUBLIC_IP is set */
 #define CTDB_CAP_LVS                   0x00000004
-/* This capability is set if NATGW is enabled */
-#define CTDB_CAP_NATGW                 0x00000008
+#define CTDB_CAP_NATGW                 0x00000008 /* obsolete */
 
 /*
  * Node features
diff --git a/ctdb/protocol/protocol_api.h b/ctdb/protocol/protocol_api.h
index 6fb9cec..b97a0d9 100644
--- a/ctdb/protocol/protocol_api.h
+++ b/ctdb/protocol/protocol_api.h
@@ -468,10 +468,6 @@ int ctdb_reply_control_stop_node(struct ctdb_reply_control 
*reply);
 void ctdb_req_control_continue_node(struct ctdb_req_control *request);
 int ctdb_reply_control_continue_node(struct ctdb_reply_control *reply);
 
-void ctdb_req_control_set_natgwstate(struct ctdb_req_control *request,
-                                    uint32_t natgw_role);
-int ctdb_reply_control_set_natgwstate(struct ctdb_reply_control *reply);
-
 void ctdb_req_control_set_lmasterrole(struct ctdb_req_control *request,
                                      uint32_t lmaster_role);
 int ctdb_reply_control_set_lmasterrole(struct ctdb_reply_control *reply);
diff --git a/ctdb/protocol/protocol_client.c b/ctdb/protocol/protocol_client.c
index a4c19d9..7c983b8 100644
--- a/ctdb/protocol/protocol_client.c
+++ b/ctdb/protocol/protocol_client.c
@@ -1650,26 +1650,6 @@ int ctdb_reply_control_continue_node(struct 
ctdb_reply_control *reply)
        return ctdb_reply_control_generic(reply);
 }
 
-/* CTDB_CONTROL_SET_NATGWSTATE */
-
-void ctdb_req_control_set_natgwstate(struct ctdb_req_control *request,
-                                    uint32_t natgw_role)
-{
-       request->opcode = CTDB_CONTROL_SET_NATGWSTATE;
-       request->pad = 0;
-       request->srvid = 0;
-       request->client_id = 0;
-       request->flags = 0;
-
-       request->rdata.opcode = CTDB_CONTROL_SET_NATGWSTATE;
-       request->rdata.data.role = natgw_role;
-}
-
-int ctdb_reply_control_set_natgwstate(struct ctdb_reply_control *reply)
-{
-       return ctdb_reply_control_generic(reply);
-}
-
 /* CTDB_CONTROL_SET_LMASTERROLE */
 
 void ctdb_req_control_set_lmasterrole(struct ctdb_req_control *request,
diff --git a/ctdb/protocol/protocol_control.c b/ctdb/protocol/protocol_control.c
index 1c8364e..c211119 100644
--- a/ctdb/protocol/protocol_control.c
+++ b/ctdb/protocol/protocol_control.c
@@ -333,10 +333,6 @@ static size_t ctdb_req_control_data_len(struct 
ctdb_req_control_data *cd)
        case CTDB_CONTROL_CONTINUE_NODE:
                break;
 
-       case CTDB_CONTROL_SET_NATGWSTATE:
-               len = ctdb_uint32_len(cd->data.role);
-               break;
-
        case CTDB_CONTROL_SET_LMASTERROLE:
                len = ctdb_uint32_len(cd->data.role);
                break;
@@ -667,10 +663,6 @@ static void ctdb_req_control_data_push(struct 
ctdb_req_control_data *cd,
                ctdb_string_push(cd->data.reclock_file, buf);
                break;
 
-       case CTDB_CONTROL_SET_NATGWSTATE:
-               ctdb_uint32_push(cd->data.role, buf);
-               break;
-
        case CTDB_CONTROL_SET_LMASTERROLE:
                ctdb_uint32_push(cd->data.role, buf);
                break;
@@ -1023,11 +1015,6 @@ static int ctdb_req_control_data_pull(uint8_t *buf, 
size_t buflen,
                                       &cd->data.reclock_file);
                break;
 
-       case CTDB_CONTROL_SET_NATGWSTATE:
-               ret = ctdb_uint32_pull(buf, buflen, mem_ctx,
-                                    &cd->data.role);
-               break;
-
        case CTDB_CONTROL_SET_LMASTERROLE:
                ret = ctdb_uint32_pull(buf, buflen, mem_ctx,
                                     &cd->data.role);
@@ -1447,9 +1434,6 @@ static size_t ctdb_reply_control_data_len(struct 
ctdb_reply_control_data *cd)
        case CTDB_CONTROL_CONTINUE_NODE:
                break;
 
-       case CTDB_CONTROL_SET_NATGWSTATE:
-               break;
-
        case CTDB_CONTROL_SET_LMASTERROLE:
                break;
 
diff --git a/ctdb/server/ctdb_control.c b/ctdb/server/ctdb_control.c
index e6f8a0d..e388326 100644
--- a/ctdb/server/ctdb_control.c
+++ b/ctdb/server/ctdb_control.c
@@ -558,18 +558,8 @@ static int32_t ctdb_control_dispatch(struct ctdb_context 
*ctdb,
                CHECK_CONTROL_DATA_SIZE(0);
                return ctdb_control_continue_node(ctdb);
 
-       case CTDB_CONTROL_SET_NATGWSTATE: {
-               uint32_t natgwstate;
-
-               CHECK_CONTROL_DATA_SIZE(sizeof(uint32_t));              
-               natgwstate = *(uint32_t *)indata.dptr;
-               if (natgwstate == 0) {
-                       ctdb->capabilities &= ~CTDB_CAP_NATGW;
-               } else {
-                       ctdb->capabilities |= CTDB_CAP_NATGW;
-               }
-               return 0;
-       }
+       case CTDB_CONTROL_SET_NATGWSTATE:
+               return control_not_implemented("SET_NATGWSTATE", NULL);
 
        case CTDB_CONTROL_SET_LMASTERROLE: {
                uint32_t lmasterrole;
diff --git a/ctdb/tests/src/protocol_client_test.c 
b/ctdb/tests/src/protocol_client_test.c
index f5a3c35..4719eac 100644
--- a/ctdb/tests/src/protocol_client_test.c
+++ b/ctdb/tests/src/protocol_client_test.c
@@ -477,10 +477,6 @@ static void fill_ctdb_req_control_data(TALLOC_CTX *mem_ctx,
        case CTDB_CONTROL_CONTINUE_NODE:
                break;
 
-       case CTDB_CONTROL_SET_NATGWSTATE:
-               cd->data.role = rand_int(2);
-               break;
-
        case CTDB_CONTROL_SET_LMASTERROLE:
                cd->data.role = rand_int(2);
                break;
@@ -953,10 +949,6 @@ static void verify_ctdb_req_control_data(struct 
ctdb_req_control_data *cd,
        case CTDB_CONTROL_CONTINUE_NODE:
                break;
 
-       case CTDB_CONTROL_SET_NATGWSTATE:
-               assert(cd->data.role == cd2->data.role);
-               break;
-
        case CTDB_CONTROL_SET_LMASTERROLE:
                assert(cd->data.role == cd2->data.role);
                break;
@@ -1429,9 +1421,6 @@ static void fill_ctdb_reply_control_data(TALLOC_CTX 
*mem_ctx,
        case CTDB_CONTROL_CONTINUE_NODE:
                break;
 
-       case CTDB_CONTROL_SET_NATGWSTATE:
-               break;
-
        case CTDB_CONTROL_SET_LMASTERROLE:
                break;
 
@@ -1827,9 +1816,6 @@ static void verify_ctdb_reply_control_data(struct 
ctdb_reply_control_data *cd,
        case CTDB_CONTROL_CONTINUE_NODE:
                break;
 
-       case CTDB_CONTROL_SET_NATGWSTATE:
-               break;
-
        case CTDB_CONTROL_SET_LMASTERROLE:
                break;
 


-- 
Samba Shared Repository

Reply via email to