#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)
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;
}
}
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;
}
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)));
}
}
}
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;
}
#include "common/logging.h"
#include "common/common.h"
+#include "protocol/protocol_api.h"
+
#include "server/ipalloc_private.h"
/* Basic non-deterministic rebalancing algorithm.
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;
}