uint32_t timeout,
uint32_t *pnn_list,
int count);
+static int send_ipreallocated_control_to_nodes(TALLOC_CTX *mem_ctx,
+ struct ctdb_context *ctdb,
+ uint32_t *pnn_list,
+ int count);
/*
* Utility Functions
return ret;
}
- return 0;
+ return send_ipreallocated_control_to_nodes(mem_ctx,
+ ctdb,
+ connected_pnn,
+ connected_count);
}
static int control_moveip(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
return ret;
}
+static int send_ipreallocated_control_to_nodes(TALLOC_CTX *mem_ctx,
+ struct ctdb_context *ctdb,
+ uint32_t *pnn_list,
+ int count)
+{
+ struct ctdb_req_control request;
+ int ret;
+
+ ctdb_req_control_ipreallocated(&request);
+ ret = ctdb_client_control_multi(mem_ctx,
+ ctdb->ev,
+ ctdb->client,
+ pnn_list,
+ count,
+ TIMEOUT(),
+ &request,
+ NULL, /* perr_list */
+ NULL); /* preply */
+ if (ret != 0) {
+ fprintf(stderr, "Failed to send ipreallocated\n");
+ return ret;
+ }
+
+ return 0;
+}
+
static int control_reloadips(TALLOC_CTX *mem_ctx, struct ctdb_context *ctdb,
int argc, const char **argv)
{