ctdb-daemon: Remove obsolete IPv4 only controls
authorAmitay Isaacs <amitay@gmail.com>
Mon, 23 Mar 2015 06:06:31 +0000 (17:06 +1100)
committerJeremy Allison <jra@samba.org>
Mon, 11 May 2015 23:32:11 +0000 (01:32 +0200)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Jeremy Allison <jra@samba.org>
ctdb/client/ctdb_client.c
ctdb/include/ctdb_private.h
ctdb/server/ctdb_control.c
ctdb/server/ctdb_recover.c
ctdb/server/ctdb_takeover.c

index 7526362cba338f4f09aef9258a94696e986864fc..5bf3a68855eedabe0ca87c5be5c687f3dd72a67f 100644 (file)
@@ -1522,13 +1522,9 @@ int ctdb_ctrl_getnodemap(struct ctdb_context *ctdb,
        TDB_DATA outdata;
        int32_t res;
 
-       ret = ctdb_control(ctdb, destnode, 0, 
-                          CTDB_CONTROL_GET_NODEMAP, 0, tdb_null, 
+       ret = ctdb_control(ctdb, destnode, 0,
+                          CTDB_CONTROL_GET_NODEMAP, 0, tdb_null,
                           mem_ctx, &outdata, &res, &timeout, NULL);
-       if (ret == 0 && res == -1 && outdata.dsize == 0) {
-               DEBUG(DEBUG_ERR,(__location__ " ctdb_control for getnodes failed, falling back to ipv4-only control\n"));
-               return ctdb_ctrl_getnodemapv4(ctdb, timeout, destnode, mem_ctx, nodemap);
-       }
        if (ret != 0 || res != 0 || outdata.dsize == 0) {
                DEBUG(DEBUG_ERR,(__location__ " ctdb_control for getnodes failed ret:%d res:%d\n", ret, res));
                return -1;
@@ -1536,7 +1532,6 @@ int ctdb_ctrl_getnodemap(struct ctdb_context *ctdb,
 
        *nodemap = (struct ctdb_node_map *)talloc_memdup(mem_ctx, outdata.dptr, outdata.dsize);
        talloc_free(outdata.dptr);
-                   
        return 0;
 }
 
@@ -1565,45 +1560,6 @@ int ctdb_ctrl_getnodesfile(struct ctdb_context *ctdb,
        return 0;
 }
 
-/*
-  old style ipv4-only get a list of nodes (vnn and flags ) from a remote node
- */
-int ctdb_ctrl_getnodemapv4(struct ctdb_context *ctdb, 
-               struct timeval timeout, uint32_t destnode, 
-               TALLOC_CTX *mem_ctx, struct ctdb_node_map **nodemap)
-{
-       int ret, i, len;
-       TDB_DATA outdata;
-       struct ctdb_node_mapv4 *nodemapv4;
-       int32_t res;
-
-       ret = ctdb_control(ctdb, destnode, 0, 
-                          CTDB_CONTROL_GET_NODEMAPv4, 0, tdb_null, 
-                          mem_ctx, &outdata, &res, &timeout, NULL);
-       if (ret != 0 || res != 0 || outdata.dsize == 0) {
-               DEBUG(DEBUG_ERR,(__location__ " ctdb_control for getnodesv4 failed ret:%d res:%d\n", ret, res));
-               return -1;
-       }
-
-       nodemapv4 = (struct ctdb_node_mapv4 *)outdata.dptr;
-
-       len = offsetof(struct ctdb_node_map, nodes) + nodemapv4->num*sizeof(struct ctdb_node_and_flags);
-       (*nodemap) = talloc_zero_size(mem_ctx, len);
-       CTDB_NO_MEMORY(ctdb, (*nodemap));
-
-       (*nodemap)->num = nodemapv4->num;
-       for (i=0; i<nodemapv4->num; i++) {
-               (*nodemap)->nodes[i].pnn     = nodemapv4->nodes[i].pnn;
-               (*nodemap)->nodes[i].flags   = nodemapv4->nodes[i].flags;
-               (*nodemap)->nodes[i].addr.ip = nodemapv4->nodes[i].sin;
-               (*nodemap)->nodes[i].addr.sa.sa_family = AF_INET;
-       }
-               
-       talloc_free(outdata.dptr);
-                   
-       return 0;
-}
-
 /*
   drop the transport, reload the nodes file and restart the transport
  */
@@ -2620,77 +2576,51 @@ int ctdb_ctrl_disable_monmode(struct ctdb_context *ctdb, struct timeval timeout,
 
 
 
-/* 
+/*
   sent to a node to make it take over an ip address
 */
-int ctdb_ctrl_takeover_ip(struct ctdb_context *ctdb, struct timeval timeout, 
+int ctdb_ctrl_takeover_ip(struct ctdb_context *ctdb, struct timeval timeout,
                          uint32_t destnode, struct ctdb_public_ip *ip)
 {
        TDB_DATA data;
-       struct ctdb_public_ipv4 ipv4;
        int ret;
        int32_t res;
 
-       if (ip->addr.sa.sa_family == AF_INET) {
-               ipv4.pnn = ip->pnn;
-               ipv4.sin = ip->addr.ip;
-
-               data.dsize = sizeof(ipv4);
-               data.dptr  = (uint8_t *)&ipv4;
-
-               ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_TAKEOVER_IPv4, 0, data, NULL,
-                          NULL, &res, &timeout, NULL);
-       } else {
-               data.dsize = sizeof(*ip);
-               data.dptr  = (uint8_t *)ip;
-
-               ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_TAKEOVER_IP, 0, data, NULL,
-                          NULL, &res, &timeout, NULL);
-       }
+       data.dsize = sizeof(*ip);
+       data.dptr  = (uint8_t *)ip;
 
+       ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_TAKEOVER_IP, 0,
+                          data, NULL, NULL, &res, &timeout, NULL);
        if (ret != 0 || res != 0) {
                DEBUG(DEBUG_ERR,(__location__ " ctdb_control for takeover_ip failed\n"));
                return -1;
        }
 
-       return 0;       
+       return 0;
 }
 
 
-/* 
+/*
   sent to a node to make it release an ip address
 */
-int ctdb_ctrl_release_ip(struct ctdb_context *ctdb, struct timeval timeout, 
+int ctdb_ctrl_release_ip(struct ctdb_context *ctdb, struct timeval timeout,
                         uint32_t destnode, struct ctdb_public_ip *ip)
 {
        TDB_DATA data;
-       struct ctdb_public_ipv4 ipv4;
        int ret;
        int32_t res;
 
-       if (ip->addr.sa.sa_family == AF_INET) {
-               ipv4.pnn = ip->pnn;
-               ipv4.sin = ip->addr.ip;
-
-               data.dsize = sizeof(ipv4);
-               data.dptr  = (uint8_t *)&ipv4;
-
-               ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_RELEASE_IPv4, 0, data, NULL,
-                                  NULL, &res, &timeout, NULL);
-       } else {
-               data.dsize = sizeof(*ip);
-               data.dptr  = (uint8_t *)ip;
-
-               ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_RELEASE_IP, 0, data, NULL,
-                                  NULL, &res, &timeout, NULL);
-       }
+       data.dsize = sizeof(*ip);
+       data.dptr  = (uint8_t *)ip;
 
+       ret = ctdb_control(ctdb, destnode, 0, CTDB_CONTROL_RELEASE_IP, 0,
+                          data, NULL, NULL, &res, &timeout, NULL);
        if (ret != 0 || res != 0) {
                DEBUG(DEBUG_ERR,(__location__ " ctdb_control for release_ip failed\n"));
                return -1;
        }
 
-       return 0;       
+       return 0;
 }
 
 
@@ -2830,21 +2760,19 @@ int ctdb_ctrl_get_public_ips_flags(struct ctdb_context *ctdb,
        TDB_DATA outdata;
        int32_t res;
 
-       ret = ctdb_control(ctdb, destnode, 0, 
+       ret = ctdb_control(ctdb, destnode, 0,
                           CTDB_CONTROL_GET_PUBLIC_IPS, flags, tdb_null,
                           mem_ctx, &outdata, &res, &timeout, NULL);
-       if (ret == 0 && res == -1) {
-               DEBUG(DEBUG_ERR,(__location__ " ctdb_control to get public ips failed, falling back to ipv4-only version\n"));
-               return ctdb_ctrl_get_public_ipsv4(ctdb, timeout, destnode, mem_ctx, ips);
-       }
        if (ret != 0 || res != 0) {
-         DEBUG(DEBUG_ERR,(__location__ " ctdb_control for getpublicips failed ret:%d res:%d\n", ret, res));
+               DEBUG(DEBUG_ERR,(__location__
+                                " ctdb_control for getpublicips failed ret:%d res:%d\n",
+                                ret, res));
                return -1;
        }
 
        *ips = (struct ctdb_all_public_ips *)talloc_memdup(mem_ctx, outdata.dptr, outdata.dsize);
        talloc_free(outdata.dptr);
-                   
+
        return 0;
 }
 
@@ -2858,39 +2786,6 @@ int ctdb_ctrl_get_public_ips(struct ctdb_context *ctdb,
                                              0, ips);
 }
 
-int ctdb_ctrl_get_public_ipsv4(struct ctdb_context *ctdb, 
-                       struct timeval timeout, uint32_t destnode, 
-                       TALLOC_CTX *mem_ctx, struct ctdb_all_public_ips **ips)
-{
-       int ret, i, len;
-       TDB_DATA outdata;
-       int32_t res;
-       struct ctdb_all_public_ipsv4 *ipsv4;
-
-       ret = ctdb_control(ctdb, destnode, 0, 
-                          CTDB_CONTROL_GET_PUBLIC_IPSv4, 0, tdb_null, 
-                          mem_ctx, &outdata, &res, &timeout, NULL);
-       if (ret != 0 || res != 0) {
-               DEBUG(DEBUG_ERR,(__location__ " ctdb_control for getpublicips failed\n"));
-               return -1;
-       }
-
-       ipsv4 = (struct ctdb_all_public_ipsv4 *)outdata.dptr;
-       len = offsetof(struct ctdb_all_public_ips, ips) +
-               ipsv4->num*sizeof(struct ctdb_public_ip);
-       *ips = talloc_zero_size(mem_ctx, len);
-       CTDB_NO_MEMORY(ctdb, *ips);
-       (*ips)->num = ipsv4->num;
-       for (i=0; i<ipsv4->num; i++) {
-               (*ips)->ips[i].pnn     = ipsv4->ips[i].pnn;
-               (*ips)->ips[i].addr.ip = ipsv4->ips[i].sin;
-       }
-
-       talloc_free(outdata.dptr);
-                   
-       return 0;
-}
-
 int ctdb_ctrl_get_public_ip_info(struct ctdb_context *ctdb,
                                 struct timeval timeout, uint32_t destnode,
                                 TALLOC_CTX *mem_ctx,
index 3391560421c61bf096d02d0a34dd16fe34f44b30..f34b5f27325e18537e4cf83a23da2d3770754752 100644 (file)
@@ -974,17 +974,6 @@ struct ctdb_control_list_tunable {
 };
 
 
-struct ctdb_node_and_flagsv4 {
-       uint32_t pnn;
-       uint32_t flags;
-       struct sockaddr_in sin;
-};
-
-struct ctdb_node_mapv4 {
-       uint32_t num;
-       struct ctdb_node_and_flagsv4 nodes[1];
-};
-
 struct ctdb_control_wipe_database {
        uint32_t db_id;
        uint32_t transaction_id;
@@ -1111,24 +1100,15 @@ int32_t ctdb_control_end_recovery(struct ctdb_context *ctdb,
                                 struct ctdb_req_control *c,
                                 bool *async_reply);
 
-struct ctdb_public_ipv4 {
-       uint32_t pnn;
-       struct sockaddr_in sin;
-};
-
 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, 
                         uint32_t destnode, struct ctdb_public_ip *ip);
 
-struct ctdb_all_public_ipsv4 {
-       uint32_t num;
-       struct ctdb_public_ipv4 ips[1];
-};
-
-int32_t ctdb_control_get_public_ipsv4(struct ctdb_context *ctdb, struct ctdb_req_control *c, TDB_DATA *outdata);
-int32_t ctdb_control_get_public_ips(struct ctdb_context *ctdb, struct ctdb_req_control *c, TDB_DATA *outdata);
-int ctdb_ctrl_get_public_ips(struct ctdb_context *ctdb, 
+int32_t ctdb_control_get_public_ips(struct ctdb_context *ctdb,
+                                   struct ctdb_req_control *c,
+                                   TDB_DATA *outdata);
+int ctdb_ctrl_get_public_ips(struct ctdb_context *ctdb,
                             struct timeval timeout,
                             uint32_t destnode,
                             TALLOC_CTX *mem_ctx,
@@ -1139,9 +1119,6 @@ int ctdb_ctrl_get_public_ips_flags(struct ctdb_context *ctdb,
                                   TALLOC_CTX *mem_ctx,
                                   uint32_t flags,
                                   struct ctdb_all_public_ips **ips);
-int ctdb_ctrl_get_public_ipsv4(struct ctdb_context *ctdb, 
-                       struct timeval timeout, uint32_t destnode, 
-                       TALLOC_CTX *mem_ctx, struct ctdb_all_public_ips **ips);
 
 struct ctdb_control_iface_info {
        char name[CTDB_IFACE_SIZE+2];
index f3f70a38de54ad25b09e56bf0b62669ca6d39190..9069087f1e14585e759fedaf348f10f4194732ff 100644 (file)
@@ -164,7 +164,7 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
                return ctdb_control_getdbmap(ctdb, opcode, indata, outdata);
 
        case CTDB_CONTROL_GET_NODEMAPv4:
-               return ctdb_control_getnodemapv4(ctdb, opcode, indata, outdata);
+               return control_not_implemented("GET_NODEMAPv4", "GET_NODEMAP");
 
        case CTDB_CONTROL_GET_NODEMAP:
                return ctdb_control_getnodemap(ctdb, opcode, indata, outdata);
@@ -351,16 +351,14 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
                return 0;
 
        case CTDB_CONTROL_TAKEOVER_IPv4:
-               CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_public_ipv4));
-               return ctdb_control_takeover_ipv4(ctdb, c, indata, async_reply);
+               return control_not_implemented("TAKEOVER_IPv4", "TAKEOVER_IP");
 
        case CTDB_CONTROL_TAKEOVER_IP:
                CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_public_ip));
                return ctdb_control_takeover_ip(ctdb, c, indata, async_reply);
 
        case CTDB_CONTROL_RELEASE_IPv4:
-               CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_public_ipv4));
-               return ctdb_control_release_ipv4(ctdb, c, indata, async_reply);
+               return control_not_implemented("RELEASE_IPv4", "RELEASE_IP");
 
        case CTDB_CONTROL_RELEASE_IP:
                CHECK_CONTROL_DATA_SIZE(sizeof(struct ctdb_public_ip));
@@ -371,8 +369,8 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
                return ctdb_control_ipreallocated(ctdb, c, async_reply);
 
        case CTDB_CONTROL_GET_PUBLIC_IPSv4:
-               CHECK_CONTROL_DATA_SIZE(0);
-               return ctdb_control_get_public_ipsv4(ctdb, c, outdata);
+               return control_not_implemented("GET_PUBLIC_IPSv4",
+                                              "GET_PUBLIC_IPS");
 
        case CTDB_CONTROL_GET_PUBLIC_IPS:
                CHECK_CONTROL_DATA_SIZE(0);
index 427d98586487799548c4c4e8ac1a464b804914c3..23f793be64fffaa05a0d6c4e97ee1eeac8757c47 100644 (file)
@@ -135,37 +135,6 @@ ctdb_control_getnodemap(struct ctdb_context *ctdb, uint32_t opcode, TDB_DATA ind
        return 0;
 }
 
-/*
-   get an old style ipv4-only nodemap
-*/
-int 
-ctdb_control_getnodemapv4(struct ctdb_context *ctdb, uint32_t opcode, TDB_DATA indata, TDB_DATA *outdata)
-{
-       uint32_t i, num_nodes;
-       struct ctdb_node_mapv4 *node_map;
-
-       CHECK_CONTROL_DATA_SIZE(0);
-
-       num_nodes = ctdb->num_nodes;
-
-       outdata->dsize = offsetof(struct ctdb_node_mapv4, nodes) + num_nodes*sizeof(struct ctdb_node_and_flagsv4);
-       outdata->dptr  = (unsigned char *)talloc_zero_size(outdata, outdata->dsize);
-       if (!outdata->dptr) {
-               DEBUG(DEBUG_ALERT, (__location__ " Failed to allocate nodemap array\n"));
-               exit(1);
-       }
-
-       node_map = (struct ctdb_node_mapv4 *)outdata->dptr;
-       node_map->num = num_nodes;
-       for (i=0; i<num_nodes; i++) {
-               node_map->nodes[i].sin   = ctdb->nodes[i]->address.ip;
-               node_map->nodes[i].pnn   = ctdb->nodes[i]->pnn;
-               node_map->nodes[i].flags = ctdb->nodes[i]->flags;
-       }
-
-       return 0;
-}
-
 /*
   reload the nodes file
 */
index 31e1b827ccaead881a08f7b685e319ec4f226b8c..b09abd3a16bae8fe16db6b2285c19903ccea55f2 100644 (file)
@@ -813,24 +813,6 @@ int32_t ctdb_control_takeover_ip(struct ctdb_context *ctdb,
        return 0;
 }
 
-/*
-  takeover an ip address old v4 style
- */
-int32_t ctdb_control_takeover_ipv4(struct ctdb_context *ctdb, 
-                               struct ctdb_req_control *c,
-                               TDB_DATA indata, 
-                               bool *async_reply)
-{
-       TDB_DATA data;
-       
-       data.dsize = sizeof(struct ctdb_public_ip);
-       data.dptr  = (uint8_t *)talloc_zero(c, struct ctdb_public_ip);
-       CTDB_NO_MEMORY(ctdb, data.dptr);
-       
-       memcpy(data.dptr, indata.dptr, indata.dsize);
-       return ctdb_control_takeover_ip(ctdb, c, data, async_reply);
-}
-
 /*
   kill any clients that are registered with a IP that is being released
  */
@@ -1049,25 +1031,6 @@ int32_t ctdb_control_release_ip(struct ctdb_context *ctdb,
        return 0;
 }
 
-/*
-  release an ip address old v4 style
- */
-int32_t ctdb_control_release_ipv4(struct ctdb_context *ctdb, 
-                               struct ctdb_req_control *c,
-                               TDB_DATA indata, 
-                               bool *async_reply)
-{
-       TDB_DATA data;
-       
-       data.dsize = sizeof(struct ctdb_public_ip);
-       data.dptr  = (uint8_t *)talloc_zero(c, struct ctdb_public_ip);
-       CTDB_NO_MEMORY(ctdb, data.dptr);
-       
-       memcpy(data.dptr, indata.dptr, indata.dsize);
-       return ctdb_control_release_ip(ctdb, c, data, async_reply);
-}
-
-
 static int ctdb_add_public_address(struct ctdb_context *ctdb,
                                   ctdb_sock_addr *addr,
                                   unsigned mask, const char *ifaces,
@@ -2609,7 +2572,6 @@ int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap,
 {
        int i, j, ret;
        struct ctdb_public_ip ip;
-       struct ctdb_public_ipv4 ipv4;
        uint32_t *nodes;
        struct ctdb_public_ip_list *all_ips, *tmp_ip;
        TDB_DATA data;
@@ -2695,36 +2657,22 @@ int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap,
                                */
                                continue;
                        }
-                       if (tmp_ip->addr.sa.sa_family == AF_INET) {
-                               ipv4.pnn = tmp_ip->pnn;
-                               ipv4.sin = tmp_ip->addr.ip;
-
-                               timeout = TAKEOVER_TIMEOUT();
-                               data.dsize = sizeof(ipv4);
-                               data.dptr  = (uint8_t *)&ipv4;
-                               state = ctdb_control_send(ctdb, nodemap->nodes[i].pnn,
-                                               0, CTDB_CONTROL_RELEASE_IPv4, 0,
-                                               data, async_data,
-                                               &timeout, NULL);
-                       } else {
-                               ip.pnn  = tmp_ip->pnn;
-                               ip.addr = tmp_ip->addr;
-
-                               timeout = TAKEOVER_TIMEOUT();
-                               data.dsize = sizeof(ip);
-                               data.dptr  = (uint8_t *)&ip;
-                               state = ctdb_control_send(ctdb, nodemap->nodes[i].pnn,
-                                               0, CTDB_CONTROL_RELEASE_IP, 0,
-                                               data, async_data,
-                                               &timeout, NULL);
-                       }
+                       ip.pnn  = tmp_ip->pnn;
+                       ip.addr = tmp_ip->addr;
 
+                       timeout = TAKEOVER_TIMEOUT();
+                       data.dsize = sizeof(ip);
+                       data.dptr  = (uint8_t *)&ip;
+                       state = ctdb_control_send(ctdb, nodemap->nodes[i].pnn,
+                                                 0, CTDB_CONTROL_RELEASE_IP, 0,
+                                                 data, async_data,
+                                                 &timeout, NULL);
                        if (state == NULL) {
                                DEBUG(DEBUG_ERR,(__location__ " Failed to call async control CTDB_CONTROL_RELEASE_IP to node %u\n", nodemap->nodes[i].pnn));
                                talloc_free(tmp_ctx);
                                return -1;
                        }
-               
+
                        ctdb_client_async_add(async_data, state);
                }
        }
@@ -2752,35 +2700,21 @@ int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap,
                        continue;
                }
 
-               if (tmp_ip->addr.sa.sa_family == AF_INET) {
-                       ipv4.pnn = tmp_ip->pnn;
-                       ipv4.sin = tmp_ip->addr.ip;
+               ip.pnn  = tmp_ip->pnn;
+               ip.addr = tmp_ip->addr;
 
-                       timeout = TAKEOVER_TIMEOUT();
-                       data.dsize = sizeof(ipv4);
-                       data.dptr  = (uint8_t *)&ipv4;
-                       state = ctdb_control_send(ctdb, tmp_ip->pnn,
-                                       0, CTDB_CONTROL_TAKEOVER_IPv4, 0,
-                                       data, async_data,
-                                       &timeout, NULL);
-               } else {
-                       ip.pnn  = tmp_ip->pnn;
-                       ip.addr = tmp_ip->addr;
-
-                       timeout = TAKEOVER_TIMEOUT();
-                       data.dsize = sizeof(ip);
-                       data.dptr  = (uint8_t *)&ip;
-                       state = ctdb_control_send(ctdb, tmp_ip->pnn,
-                                       0, CTDB_CONTROL_TAKEOVER_IP, 0,
-                                       data, async_data,
-                                       &timeout, NULL);
-               }
+               timeout = TAKEOVER_TIMEOUT();
+               data.dsize = sizeof(ip);
+               data.dptr  = (uint8_t *)&ip;
+               state = ctdb_control_send(ctdb, tmp_ip->pnn,
+                                         0, CTDB_CONTROL_TAKEOVER_IP, 0,
+                                         data, async_data, &timeout, NULL);
                if (state == NULL) {
                        DEBUG(DEBUG_ERR,(__location__ " Failed to call async control CTDB_CONTROL_TAKEOVER_IP to node %u\n", tmp_ip->pnn));
                        talloc_free(tmp_ctx);
                        return -1;
                }
-               
+
                ctdb_client_async_add(async_data, state);
        }
        if (ctdb_client_async_wait(ctdb, async_data) != 0) {
@@ -3283,47 +3217,6 @@ int32_t ctdb_control_get_public_ips(struct ctdb_context *ctdb,
 }
 
 
-/*
-  get list of public IPs, old ipv4 style.  only returns ipv4 addresses
- */
-int32_t ctdb_control_get_public_ipsv4(struct ctdb_context *ctdb, 
-                                   struct ctdb_req_control *c, TDB_DATA *outdata)
-{
-       int i, num, len;
-       struct ctdb_all_public_ipsv4 *ips;
-       struct ctdb_vnn *vnn;
-
-       /* count how many public ip structures we have */
-       num = 0;
-       for (vnn=ctdb->vnn;vnn;vnn=vnn->next) {
-               if (vnn->public_address.sa.sa_family != AF_INET) {
-                       continue;
-               }
-               num++;
-       }
-
-       len = offsetof(struct ctdb_all_public_ipsv4, ips) + 
-               num*sizeof(struct ctdb_public_ipv4);
-       ips = talloc_zero_size(outdata, len);
-       CTDB_NO_MEMORY(ctdb, ips);
-
-       outdata->dsize = len;
-       outdata->dptr  = (uint8_t *)ips;
-
-       ips->num = num;
-       i = 0;
-       for (vnn=ctdb->vnn;vnn;vnn=vnn->next) {
-               if (vnn->public_address.sa.sa_family != AF_INET) {
-                       continue;
-               }
-               ips->ips[i].pnn = vnn->pnn;
-               ips->ips[i].sin = vnn->public_address.ip;
-               i++;
-       }
-
-       return 0;
-}
-
 int32_t ctdb_control_get_public_ip_info(struct ctdb_context *ctdb,
                                        struct ctdb_req_control *c,
                                        TDB_DATA indata,