summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ctdb/server/ipalloc_common.c13
-rw-r--r--ctdb/server/ipalloc_nondeterministic.c5
2 files changed, 13 insertions, 5 deletions
diff --git a/ctdb/server/ipalloc_common.c b/ctdb/server/ipalloc_common.c
index 95d5ecf0c21..1a52ff3772f 100644
--- a/ctdb/server/ipalloc_common.c
+++ b/ctdb/server/ipalloc_common.c
@@ -32,6 +32,8 @@
#include "common/common.h"
#include "common/rb_tree.h"
+#include "protocol/protocol_api.h"
+
#include "server/ipalloc_private.h"
#define TAKEOVER_TIMEOUT() timeval_current_ofs(ctdb->tunable.takeover_timeout,0)
@@ -72,7 +74,7 @@ static bool can_node_host_ip(struct ipalloc_state *ipalloc_state,
public_ips = &ipalloc_state->available_public_ips[pnn];
for (i=0; i<public_ips->num; i++) {
- if (ctdb_same_ip(&ip->addr, &public_ips->ip[i].addr)) {
+ if (ctdb_sock_addr_same(&ip->addr, &public_ips->ip[i].addr)) {
/* yes, this node can serve this public ip */
return true;
}
@@ -125,7 +127,8 @@ int find_takeover_node(struct ipalloc_state *ipalloc_state,
}
if (pnn == -1) {
DEBUG(DEBUG_WARNING,(__location__ " Could not find node to take over public address '%s'\n",
- ctdb_addr_to_str(&ip->addr)));
+ ctdb_sock_addr_to_string(ipalloc_state,
+ &ip->addr)));
return -1;
}
@@ -175,7 +178,8 @@ void basic_allocate_unassigned(struct ipalloc_state *ipalloc_state)
if (find_takeover_node(ipalloc_state, t)) {
DEBUG(DEBUG_WARNING,
("Failed to find node to cover ip %s\n",
- ctdb_addr_to_str(&t->addr)));
+ ctdb_sock_addr_to_string(ipalloc_state,
+ &t->addr)));
}
}
}
@@ -195,7 +199,8 @@ void unassign_unsuitable_ips(struct ipalloc_state *ipalloc_state)
if (!can_node_host_ip(ipalloc_state, t->pnn, t) != 0) {
/* this node can not serve this ip. */
DEBUG(DEBUG_DEBUG,("Unassign IP: %s from %d\n",
- ctdb_addr_to_str(&(t->addr)),
+ ctdb_sock_addr_to_string(ipalloc_state,
+ &t->addr),
t->pnn));
t->pnn = -1;
}
diff --git a/ctdb/server/ipalloc_nondeterministic.c b/ctdb/server/ipalloc_nondeterministic.c
index 9951aaac91c..bb5f8faf9c8 100644
--- a/ctdb/server/ipalloc_nondeterministic.c
+++ b/ctdb/server/ipalloc_nondeterministic.c
@@ -28,6 +28,8 @@
#include "common/logging.h"
#include "common/common.h"
+#include "protocol/protocol_api.h"
+
#include "server/ipalloc_private.h"
/* Basic non-deterministic rebalancing algorithm.
@@ -92,7 +94,8 @@ try_again:
if (maxnode == -1) {
DEBUG(DEBUG_WARNING,
(__location__ " Could not find maxnode. May not be able to serve ip '%s'\n",
- ctdb_addr_to_str(&t->addr)));
+ ctdb_sock_addr_to_string(ipalloc_state,
+ &t->addr)));
continue;
}