summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ctdb/client/ctdb_client.c12
-rw-r--r--ctdb/common/cmdline.c8
-rw-r--r--ctdb/include/ctdb_private.h2
-rw-r--r--ctdb/server/ctdb_call.c48
-rw-r--r--ctdb/server/ctdb_control.c4
-rw-r--r--ctdb/server/ctdb_daemon.c10
-rw-r--r--ctdb/server/ctdb_ltdb_server.c6
-rw-r--r--ctdb/server/ctdb_monitor.c14
-rw-r--r--ctdb/server/ctdb_recover.c2
-rw-r--r--ctdb/server/ctdb_recoverd.c14
-rw-r--r--ctdb/server/ctdb_server.c6
-rw-r--r--ctdb/server/ctdb_takeover.c4
-rw-r--r--ctdb/server/ctdb_traverse.c4
-rw-r--r--ctdb/server/ctdbd.c4
-rw-r--r--ctdb/tcp/tcp_connect.c6
15 files changed, 72 insertions, 72 deletions
diff --git a/ctdb/client/ctdb_client.c b/ctdb/client/ctdb_client.c
index cdec93d804b..05f5eb1e2de 100644
--- a/ctdb/client/ctdb_client.c
+++ b/ctdb/client/ctdb_client.c
@@ -55,7 +55,7 @@ struct ctdb_req_header *_ctdbd_allocate_pkt(struct ctdb_context *ctdb,
hdr->operation = operation;
hdr->ctdb_magic = CTDB_MAGIC;
hdr->ctdb_version = CTDB_VERSION;
- hdr->srcnode = ctdb->vnn;
+ hdr->srcnode = ctdb->pnn;
if (ctdb->vnn_map) {
hdr->generation = ctdb->vnn_map->generation;
}
@@ -109,7 +109,7 @@ int ctdb_call_local(struct ctdb_db_context *ctdb_db, struct ctdb_call *call,
/* we need to force the record to be written out if this was a remote access,
so that the lacount is updated */
- if (c->new_data == NULL && header->laccessor != ctdb->vnn) {
+ if (c->new_data == NULL && header->laccessor != ctdb->pnn) {
c->new_data = &c->record_data;
}
@@ -365,7 +365,7 @@ static struct ctdb_client_call_state *ctdb_client_call_local_send(struct ctdb_db
state->call = *call;
state->ctdb_db = ctdb_db;
- ret = ctdb_call_local(ctdb_db, &state->call, header, state, data, ctdb->vnn);
+ ret = ctdb_call_local(ctdb_db, &state->call, header, state, data, ctdb->pnn);
return state;
}
@@ -400,7 +400,7 @@ struct ctdb_client_call_state *ctdb_call_send(struct ctdb_db_context *ctdb_db,
ret = ctdb_ltdb_fetch(ctdb_db, call->key, &header, ctdb_db, &data);
- if (ret == 0 && header.dmaster == ctdb->vnn) {
+ if (ret == 0 && header.dmaster == ctdb->pnn) {
state = ctdb_client_call_local_send(ctdb_db, call, &header, &data);
talloc_free(data.dptr);
ctdb_ltdb_unlock(ctdb_db, call->key);
@@ -618,7 +618,7 @@ again:
DEBUG(4,("ctdb_fetch_lock: done local fetch\n"));
- if (ret != 0 || h->header.dmaster != ctdb_db->ctdb->vnn) {
+ if (ret != 0 || h->header.dmaster != ctdb_db->ctdb->pnn) {
ctdb_ltdb_unlock(ctdb_db, key);
ret = ctdb_client_force_migration(ctdb_db, key);
if (ret != 0) {
@@ -2478,6 +2478,6 @@ int ctdb_set_socketname(struct ctdb_context *ctdb, const char *socketname)
*/
uint32_t ctdb_get_vnn(struct ctdb_context *ctdb)
{
- return ctdb->vnn;
+ return ctdb->pnn;
}
diff --git a/ctdb/common/cmdline.c b/ctdb/common/cmdline.c
index fb5c76aeae5..8999c2a1f73 100644
--- a/ctdb/common/cmdline.c
+++ b/ctdb/common/cmdline.c
@@ -124,10 +124,10 @@ struct ctdb_context *ctdb_cmdline_client(struct event_context *ev)
return NULL;
}
- /* get our vnn */
- ctdb->vnn = ctdb_ctrl_getvnn(ctdb, timeval_current_ofs(3, 0), CTDB_CURRENT_NODE);
- if (ctdb->vnn == (uint32_t)-1) {
- DEBUG(0,(__location__ " Failed to get ctdb vnn\n"));
+ /* get our pnn */
+ ctdb->pnn = ctdb_ctrl_getvnn(ctdb, timeval_current_ofs(3, 0), CTDB_CURRENT_NODE);
+ if (ctdb->pnn == (uint32_t)-1) {
+ DEBUG(0,(__location__ " Failed to get ctdb pnn\n"));
talloc_free(ctdb);
return NULL;
}
diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h
index 251c7dd75a6..df3141a2669 100644
--- a/ctdb/include/ctdb_private.h
+++ b/ctdb/include/ctdb_private.h
@@ -331,7 +331,7 @@ struct ctdb_context {
char *node_list_file;
char *recovery_lock_file;
int recovery_lock_fd;
- uint32_t vnn; /* our own vnn */
+ uint32_t pnn; /* our own pnn */
uint32_t num_nodes;
uint32_t num_connected;
unsigned flags;
diff --git a/ctdb/server/ctdb_call.c b/ctdb/server/ctdb_call.c
index b448fe01434..a71bf7f5371 100644
--- a/ctdb/server/ctdb_call.c
+++ b/ctdb/server/ctdb_call.c
@@ -104,7 +104,7 @@ static void ctdb_call_send_redirect(struct ctdb_context *ctdb,
{
uint32_t lmaster = ctdb_lmaster(ctdb, &key);
- if (ctdb->vnn == lmaster) {
+ if (ctdb->pnn == lmaster) {
c->hdr.destnode = header->dmaster;
} else if ((c->hopcount % ctdb->tunable.max_redirect_count) == 0) {
c->hdr.destnode = lmaster;
@@ -133,7 +133,7 @@ static void ctdb_send_dmaster_reply(struct ctdb_db_context *ctdb_db,
int ret, len;
TALLOC_CTX *tmp_ctx;
- if (ctdb->vnn != ctdb_lmaster(ctdb, &key)) {
+ if (ctdb->pnn != ctdb_lmaster(ctdb, &key)) {
DEBUG(0,(__location__ " Caller is not lmaster!\n"));
return;
}
@@ -186,7 +186,7 @@ static void ctdb_call_send_dmaster(struct ctdb_db_context *ctdb_db,
int len;
uint32_t lmaster = ctdb_lmaster(ctdb, key);
- if (lmaster == ctdb->vnn) {
+ if (lmaster == ctdb->pnn) {
ctdb_send_dmaster_reply(ctdb_db, header, *key, *data,
c->hdr.srcnode, c->hdr.reqid);
return;
@@ -231,11 +231,11 @@ static void ctdb_become_dmaster(struct ctdb_db_context *ctdb_db,
struct ctdb_context *ctdb = ctdb_db->ctdb;
struct ctdb_ltdb_header header;
- DEBUG(2,("vnn %u dmaster response %08x\n", ctdb->vnn, ctdb_hash(&key)));
+ DEBUG(2,("vnn %u dmaster response %08x\n", ctdb->pnn, ctdb_hash(&key)));
ZERO_STRUCT(header);
header.rsn = rsn + 1;
- header.dmaster = ctdb->vnn;
+ header.dmaster = ctdb->pnn;
if (ctdb_ltdb_store(ctdb_db, key, &header, data) != 0) {
ctdb_fatal(ctdb, "ctdb_reply_dmaster store failed\n");
@@ -246,8 +246,8 @@ static void ctdb_become_dmaster(struct ctdb_db_context *ctdb_db,
state = ctdb_reqid_find(ctdb, hdr->reqid, struct ctdb_call_state);
if (state == NULL) {
- DEBUG(0,("vnn %u Invalid reqid %u in ctdb_become_dmaster from node %u\n",
- ctdb->vnn, hdr->reqid, hdr->srcnode));
+ DEBUG(0,("pnn %u Invalid reqid %u in ctdb_become_dmaster from node %u\n",
+ ctdb->pnn, hdr->reqid, hdr->srcnode));
ctdb_ltdb_unlock(ctdb_db, key);
return;
}
@@ -259,7 +259,7 @@ static void ctdb_become_dmaster(struct ctdb_db_context *ctdb_db,
return;
}
- ctdb_call_local(ctdb_db, &state->call, &header, state, &data, ctdb->vnn);
+ ctdb_call_local(ctdb_db, &state->call, &header, state, &data, ctdb->pnn);
ctdb_ltdb_unlock(ctdb_db, state->call.key);
@@ -310,20 +310,20 @@ void ctdb_request_dmaster(struct ctdb_context *ctdb, struct ctdb_req_header *hdr
return;
}
- if (ctdb_lmaster(ctdb, &key) != ctdb->vnn) {
- DEBUG(0,("vnn %u dmaster request to non-lmaster lmaster=%u gen=%u curgen=%u\n",
- ctdb->vnn, ctdb_lmaster(ctdb, &key),
+ if (ctdb_lmaster(ctdb, &key) != ctdb->pnn) {
+ DEBUG(0,("pnn %u dmaster request to non-lmaster lmaster=%u gen=%u curgen=%u\n",
+ ctdb->pnn, ctdb_lmaster(ctdb, &key),
hdr->generation, ctdb->vnn_map->generation));
ctdb_fatal(ctdb, "ctdb_req_dmaster to non-lmaster");
}
- DEBUG(2,("vnn %u dmaster request on %08x for %u from %u\n",
- ctdb->vnn, ctdb_hash(&key), c->dmaster, c->hdr.srcnode));
+ DEBUG(2,("pnn %u dmaster request on %08x for %u from %u\n",
+ ctdb->pnn, ctdb_hash(&key), c->dmaster, c->hdr.srcnode));
/* its a protocol error if the sending node is not the current dmaster */
if (header.dmaster != hdr->srcnode) {
- DEBUG(0,("vnn %u dmaster request non-master %u dmaster=%u key %08x dbid 0x%08x gen=%u curgen=%u\n",
- ctdb->vnn, hdr->srcnode, header.dmaster, ctdb_hash(&key),
+ DEBUG(0,("pnn %u dmaster request non-master %u dmaster=%u key %08x dbid 0x%08x gen=%u curgen=%u\n",
+ ctdb->pnn, hdr->srcnode, header.dmaster, ctdb_hash(&key),
ctdb_db->db_id, hdr->generation, ctdb->vnn_map->generation));
ctdb_fatal(ctdb, "ctdb_req_dmaster from non-master");
return;
@@ -334,7 +334,7 @@ void ctdb_request_dmaster(struct ctdb_context *ctdb, struct ctdb_req_header *hdr
/* check if the new dmaster is the lmaster, in which case we
skip the dmaster reply */
- if (c->dmaster == ctdb->vnn) {
+ if (c->dmaster == ctdb->pnn) {
ctdb_become_dmaster(ctdb_db, hdr, key, data, c->rsn);
} else {
ctdb_send_dmaster_reply(ctdb_db, &header, key, data, c->dmaster, hdr->reqid);
@@ -387,7 +387,7 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
/* if we are not the dmaster, then send a redirect to the
requesting node */
- if (header.dmaster != ctdb->vnn) {
+ if (header.dmaster != ctdb->pnn) {
talloc_free(data.dptr);
ctdb_call_send_redirect(ctdb, call.key, c, &header);
ctdb_ltdb_unlock(ctdb_db, call.key);
@@ -402,12 +402,12 @@ void ctdb_request_call(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
then give them the record
or if the node requested an immediate migration
*/
- if ( c->hdr.srcnode != ctdb->vnn &&
+ if ( c->hdr.srcnode != ctdb->pnn &&
((header.laccessor == c->hdr.srcnode
&& header.lacount >= ctdb->tunable.max_lacount)
|| (c->flags & CTDB_IMMEDIATE_MIGRATION)) ) {
- DEBUG(2,("vnn %u starting migration of %08x to %u\n",
- ctdb->vnn, ctdb_hash(&call.key), c->hdr.srcnode));
+ DEBUG(2,("pnn %u starting migration of %08x to %u\n",
+ ctdb->pnn, ctdb_hash(&call.key), c->hdr.srcnode));
ctdb_call_send_dmaster(ctdb_db, c, &header, &call.key, &data);
talloc_free(data.dptr);
ctdb_ltdb_unlock(ctdb_db, call.key);
@@ -520,8 +520,8 @@ void ctdb_reply_error(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
state = ctdb_reqid_find(ctdb, hdr->reqid, struct ctdb_call_state);
if (state == NULL) {
- DEBUG(0,("vnn %u Invalid reqid %u in ctdb_reply_error\n",
- ctdb->vnn, hdr->reqid));
+ DEBUG(0,("pnn %u Invalid reqid %u in ctdb_reply_error\n",
+ ctdb->pnn, hdr->reqid));
return;
}
@@ -570,7 +570,7 @@ static void ctdb_call_resend(struct ctdb_call_state *state)
state->c->hdr.generation = state->generation;
/* send the packet to ourselves, it will be redirected appropriately */
- state->c->hdr.destnode = ctdb->vnn;
+ state->c->hdr.destnode = ctdb->pnn;
ctdb_queue_packet(ctdb, &state->c->hdr);
DEBUG(0,("resent ctdb_call\n"));
@@ -625,7 +625,7 @@ struct ctdb_call_state *ctdb_call_local_send(struct ctdb_db_context *ctdb_db,
state->call = *call;
state->ctdb_db = ctdb_db;
- ret = ctdb_call_local(ctdb_db, &state->call, header, state, data, ctdb->vnn);
+ ret = ctdb_call_local(ctdb_db, &state->call, header, state, data, ctdb->pnn);
event_add_timed(ctdb->ev, state, timeval_zero(), call_local_trigger, state);
diff --git a/ctdb/server/ctdb_control.c b/ctdb/server/ctdb_control.c
index deecdd44627..09276cd3de4 100644
--- a/ctdb/server/ctdb_control.c
+++ b/ctdb/server/ctdb_control.c
@@ -142,7 +142,7 @@ static int32_t ctdb_control_dispatch(struct ctdb_context *ctdb,
return getpid();
case CTDB_CONTROL_GET_VNN:
- return ctdb->vnn;
+ return ctdb->pnn;
case CTDB_CONTROL_PING:
CHECK_CONTROL_DATA_SIZE(0);
@@ -394,7 +394,7 @@ void ctdb_reply_control(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
state = ctdb_reqid_find(ctdb, hdr->reqid, struct ctdb_control_state);
if (state == NULL) {
DEBUG(0,("vnn %u Invalid reqid %u in ctdb_reply_control\n",
- ctdb->vnn, hdr->reqid));
+ ctdb->pnn, hdr->reqid));
return;
}
diff --git a/ctdb/server/ctdb_daemon.c b/ctdb/server/ctdb_daemon.c
index 6f09acea17b..f487434a9bb 100644
--- a/ctdb/server/ctdb_daemon.c
+++ b/ctdb/server/ctdb_daemon.c
@@ -55,7 +55,7 @@ static void flag_change_handler(struct ctdb_context *ctdb, uint64_t srvid,
DEBUG(2,("Node flags for node %u are now 0x%x\n", c->vnn, ctdb->nodes[c->vnn]->flags));
/* make sure we don't hold any IPs when we shouldn't */
- if (c->vnn == ctdb->vnn &&
+ if (c->vnn == ctdb->pnn &&
(ctdb->nodes[c->vnn]->flags & (NODE_FLAGS_INACTIVE|NODE_FLAGS_BANNED))) {
ctdb_release_all_ips(ctdb);
}
@@ -407,7 +407,7 @@ static void daemon_request_call_from_client(struct ctdb_client *client,
call->call_data.dsize = c->calldatalen;
call->flags = c->flags;
- if (header.dmaster == ctdb->vnn) {
+ if (header.dmaster == ctdb->pnn) {
state = ctdb_call_local_send(ctdb_db, call, &header, &data);
} else {
state = ctdb_daemon_call_send_remote(ctdb_db, call, &header);
@@ -712,7 +712,7 @@ struct ctdb_req_header *_ctdb_transport_allocate(struct ctdb_context *ctdb,
hdr->ctdb_magic = CTDB_MAGIC;
hdr->ctdb_version = CTDB_VERSION;
hdr->generation = ctdb->vnn_map->generation;
- hdr->srcnode = ctdb->vnn;
+ hdr->srcnode = ctdb->pnn;
return hdr;
}
@@ -800,7 +800,7 @@ static void daemon_request_control_from_client(struct ctdb_client *client,
TALLOC_CTX *tmp_ctx = talloc_new(client);
if (c->hdr.destnode == CTDB_CURRENT_NODE) {
- c->hdr.destnode = client->ctdb->vnn;
+ c->hdr.destnode = client->ctdb->pnn;
}
state = talloc(client, struct daemon_control_state);
@@ -917,7 +917,7 @@ int ctdb_daemon_send_message(struct ctdb_context *ctdb, uint32_t vnn,
int len;
/* see if this is a message to ourselves */
- if (vnn == ctdb->vnn) {
+ if (vnn == ctdb->pnn) {
return ctdb_local_message(ctdb, srvid, data);
}
diff --git a/ctdb/server/ctdb_ltdb_server.c b/ctdb/server/ctdb_ltdb_server.c
index d1e83a5fefb..5097481bd0a 100644
--- a/ctdb/server/ctdb_ltdb_server.c
+++ b/ctdb/server/ctdb_ltdb_server.c
@@ -194,7 +194,7 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
{
const char *db_name = (const char *)indata.dptr;
struct ctdb_db_context *ctdb_db, *tmp_db;
- struct ctdb_node *node = ctdb->nodes[ctdb->vnn];
+ struct ctdb_node *node = ctdb->nodes[ctdb->pnn];
int ret;
/* If the node is inactive it is not part of the cluster
@@ -254,7 +254,7 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
/* open the database */
ctdb_db->db_path = talloc_asprintf(ctdb_db, "%s/%s.%u",
ctdb->db_directory,
- db_name, ctdb->vnn);
+ db_name, ctdb->pnn);
ctdb_db->ltdb = tdb_wrap_open(ctdb, ctdb_db->db_path,
ctdb->tunable.database_hash_size,
@@ -308,7 +308,7 @@ int32_t ctdb_control_db_attach(struct ctdb_context *ctdb, TDB_DATA indata,
int32_t ctdb_ltdb_update_seqnum(struct ctdb_context *ctdb, uint32_t db_id, uint32_t srcnode)
{
struct ctdb_db_context *ctdb_db;
- if (srcnode == ctdb->vnn) {
+ if (srcnode == ctdb->pnn) {
/* don't update ourselves! */
return 0;
}
diff --git a/ctdb/server/ctdb_monitor.c b/ctdb/server/ctdb_monitor.c
index e56b525279d..7f7e3c7cff5 100644
--- a/ctdb/server/ctdb_monitor.c
+++ b/ctdb/server/ctdb_monitor.c
@@ -43,7 +43,7 @@ static void ctdb_check_for_dead_nodes(struct event_context *ev, struct timed_eve
/* send a keepalive to all other nodes, unless */
for (i=0;i<ctdb->num_nodes;i++) {
struct ctdb_node *node = ctdb->nodes[i];
- if (node->pnn == ctdb->vnn) {
+ if (node->pnn == ctdb->pnn) {
continue;
}
@@ -95,7 +95,7 @@ static void ctdb_check_health(struct event_context *ev, struct timed_event *te,
*/
static void ctdb_health_callback(struct ctdb_context *ctdb, int status, void *p)
{
- struct ctdb_node *node = ctdb->nodes[ctdb->vnn];
+ struct ctdb_node *node = ctdb->nodes[ctdb->pnn];
TDB_DATA data;
struct ctdb_node_flag_change c;
@@ -103,7 +103,7 @@ static void ctdb_health_callback(struct ctdb_context *ctdb, int status, void *p)
timeval_current_ofs(ctdb->tunable.monitor_interval, 0),
ctdb_check_health, ctdb);
- c.vnn = ctdb->vnn;
+ c.vnn = ctdb->pnn;
c.old_flags = node->flags;
if (status != 0 && !(node->flags & NODE_FLAGS_UNHEALTHY)) {
@@ -111,7 +111,7 @@ static void ctdb_health_callback(struct ctdb_context *ctdb, int status, void *p)
node->flags |= NODE_FLAGS_UNHEALTHY;
} else if (status == 0 && (node->flags & NODE_FLAGS_UNHEALTHY)) {
DEBUG(0,("monitor event OK - node re-enabled\n"));
- ctdb->nodes[ctdb->vnn]->flags &= ~NODE_FLAGS_UNHEALTHY;
+ ctdb->nodes[ctdb->pnn]->flags &= ~NODE_FLAGS_UNHEALTHY;
} else {
/* no change */
return;
@@ -193,7 +193,7 @@ int32_t ctdb_control_modflags(struct ctdb_context *ctdb, TDB_DATA indata)
struct ctdb_node_modflags *m = (struct ctdb_node_modflags *)indata.dptr;
TDB_DATA data;
struct ctdb_node_flag_change c;
- struct ctdb_node *node = ctdb->nodes[ctdb->vnn];
+ struct ctdb_node *node = ctdb->nodes[ctdb->pnn];
uint32_t old_flags = node->flags;
node->flags |= m->set;
@@ -204,10 +204,10 @@ int32_t ctdb_control_modflags(struct ctdb_context *ctdb, TDB_DATA indata)
return 0;
}
- DEBUG(0, ("Control modflags on node %u - flags now 0x%x\n", ctdb->vnn, node->flags));
+ DEBUG(0, ("Control modflags on node %u - flags now 0x%x\n", ctdb->pnn, node->flags));
/* if we have been banned, go into recovery mode */
- c.vnn = ctdb->vnn;
+ c.vnn = ctdb->pnn;
c.old_flags = old_flags;
c.new_flags = node->flags;
diff --git a/ctdb/server/ctdb_recover.c b/ctdb/server/ctdb_recover.c
index f639ee47ec2..a07f5235026 100644
--- a/ctdb/server/ctdb_recover.c
+++ b/ctdb/server/ctdb_recover.c
@@ -330,7 +330,7 @@ int32_t ctdb_control_push_db(struct ctdb_context *ctdb, TDB_DATA indata)
/* The check for dmaster gives priority to the dmaster
if the rsn values are equal */
if (header.rsn < hdr->rsn ||
- (header.dmaster != ctdb->vnn && header.rsn == hdr->rsn)) {
+ (header.dmaster != ctdb->pnn && header.rsn == hdr->rsn)) {
ret = ctdb_ltdb_store(ctdb_db, key, hdr, data);
if (ret != 0) {
DEBUG(0, (__location__ " Unable to store record\n"));
diff --git a/ctdb/server/ctdb_recoverd.c b/ctdb/server/ctdb_recoverd.c
index c1a2a866f5b..a8097a6387f 100644
--- a/ctdb/server/ctdb_recoverd.c
+++ b/ctdb/server/ctdb_recoverd.c
@@ -95,7 +95,7 @@ static void ctdb_ban_node(struct ctdb_recoverd *rec, uint32_t vnn, uint32_t ban_
return;
}
- if (vnn == ctdb->vnn) {
+ if (vnn == ctdb->pnn) {
DEBUG(0,("self ban - lowering our election priority\n"));
/* banning ourselves - lower our election priority */
rec->priority_time = timeval_current();
@@ -626,7 +626,7 @@ static void ban_handler(struct ctdb_context *ctdb, uint64_t srvid,
return;
}
- if (recmaster != ctdb->vnn) {
+ if (recmaster != ctdb->pnn) {
DEBUG(0,("We are not the recmaster - ignoring ban request\n"));
talloc_free(mem_ctx);
return;
@@ -664,7 +664,7 @@ static void unban_handler(struct ctdb_context *ctdb, uint64_t srvid,
return;
}
- if (recmaster != ctdb->vnn) {
+ if (recmaster != ctdb->pnn) {
DEBUG(0,("We are not the recmaster - ignoring unban request\n"));
talloc_free(mem_ctx);
return;
@@ -959,7 +959,7 @@ static void ctdb_election_data(struct ctdb_recoverd *rec, struct election_messag
ZERO_STRUCTP(em);
- em->vnn = rec->ctdb->vnn;
+ em->vnn = rec->ctdb->pnn;
em->priority_time = rec->priority_time;
ret = ctdb_ctrl_getnodemap(ctdb, CONTROL_TIMEOUT(), CTDB_CURRENT_NODE, rec, &nodemap);
@@ -1088,7 +1088,7 @@ static void election_handler(struct ctdb_context *ctdb, uint64_t srvid,
}
/* release the recmaster lock */
- if (em->vnn != ctdb->vnn &&
+ if (em->vnn != ctdb->pnn &&
ctdb->recovery_lock_fd != -1) {
close(ctdb->recovery_lock_fd);
ctdb->recovery_lock_fd = -1;
@@ -1201,7 +1201,7 @@ static void monitor_handler(struct ctdb_context *ctdb, uint64_t srvid,
}
if (ret == 0 &&
- ctdb->recovery_master == ctdb->vnn &&
+ ctdb->recovery_master == ctdb->pnn &&
ctdb->recovery_mode == CTDB_RECOVERY_NORMAL &&
ctdb->vnn_list) {
/* Only do the takeover run if the perm disabled or unhealthy
@@ -1645,7 +1645,7 @@ again:
if (vnnmap->size != num_active) {
DEBUG(0, (__location__ " The vnnmap count is different from the number of active nodes. %u vs %u\n",
vnnmap->size, num_active));
- do_recovery(rec, mem_ctx, vnn, num_active, nodemap, vnnmap, ctdb->vnn);
+ do_recovery(rec, mem_ctx, vnn, num_active, nodemap, vnnmap, ctdb->pnn);
goto again;
}
diff --git a/ctdb/server/ctdb_server.c b/ctdb/server/ctdb_server.c
index 240e71a257b..8dabcd595d9 100644
--- a/ctdb/server/ctdb_server.c
+++ b/ctdb/server/ctdb_server.c
@@ -112,7 +112,7 @@ static int ctdb_add_node(struct ctdb_context *ctdb, char *nstr)
if (ctdb->address.address &&
ctdb_same_address(&ctdb->address, &node->address)) {
- ctdb->vnn = node->pnn;
+ ctdb->pnn = node->pnn;
node->flags &= ~NODE_FLAGS_DISCONNECTED;
}
@@ -226,7 +226,7 @@ void ctdb_input_pkt(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
case CTDB_REQ_DMASTER:
case CTDB_REPLY_DMASTER:
/* we dont allow these calls when banned */
- if (ctdb->nodes[ctdb->vnn]->flags & NODE_FLAGS_BANNED) {
+ if (ctdb->nodes[ctdb->pnn]->flags & NODE_FLAGS_BANNED) {
DEBUG(0,(__location__ " ctdb operation %u"
" request %u"
" length %u from node %u to %u while node"
@@ -463,7 +463,7 @@ void ctdb_queue_packet(struct ctdb_context *ctdb, struct ctdb_req_header *hdr)
node = ctdb->nodes[hdr->destnode];
- if (hdr->destnode == ctdb->vnn) {
+ if (hdr->destnode == ctdb->pnn) {
ctdb_defer_packet(ctdb, hdr);
} else {
node->tx_cnt++;
diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c
index d042ba75b3a..eecd8b67618 100644
--- a/ctdb/server/ctdb_takeover.c
+++ b/ctdb/server/ctdb_takeover.c
@@ -302,7 +302,7 @@ static void release_ip_callback(struct ctdb_context *ctdb, int status,
data.dptr = (uint8_t *)ip;
data.dsize = strlen(ip)+1;
- ctdb_daemon_send_message(ctdb, ctdb->vnn, CTDB_SRVID_RELEASE_IP, data);
+ ctdb_daemon_send_message(ctdb, ctdb->pnn, CTDB_SRVID_RELEASE_IP, data);
/* kill clients that have registered with this IP */
release_kill_clients(ctdb, state->sin->sin_addr);
@@ -1513,7 +1513,7 @@ static void ctdb_update_tcp_tickles(struct event_context *ev,
/* we only send out updates for public addresses that
we have taken over
*/
- if (ctdb->vnn != vnn->pnn) {
+ if (ctdb->pnn != vnn->pnn) {
continue;
}
/* We only send out the updates if we need to */
diff --git a/ctdb/server/ctdb_traverse.c b/ctdb/server/ctdb_traverse.c
index d44c27401a7..da303eb34fa 100644
--- a/ctdb/server/ctdb_traverse.c
+++ b/ctdb/server/ctdb_traverse.c
@@ -91,7 +91,7 @@ static int ctdb_traverse_local_fn(struct tdb_context *tdb, TDB_DATA key, TDB_DAT
/* filter out non-authoritative and zero-length records */
hdr = (struct ctdb_ltdb_header *)data.dptr;
if (data.dsize <= sizeof(struct ctdb_ltdb_header) ||
- hdr->dmaster != h->ctdb_db->ctdb->vnn) {
+ hdr->dmaster != h->ctdb_db->ctdb->pnn) {
return 0;
}
@@ -241,7 +241,7 @@ static struct ctdb_traverse_all_handle *ctdb_daemon_traverse_all(struct ctdb_db_
r.db_id = ctdb_db->db_id;
r.reqid = state->reqid;
- r.vnn = ctdb->vnn;
+ r.vnn = ctdb->pnn;
data.dptr = (uint8_t *)&r;
data.dsize = sizeof(r);
diff --git a/ctdb/server/ctdbd.c b/ctdb/server/ctdbd.c
index 9c9cc394251..4083d1539cb 100644
--- a/ctdb/server/ctdbd.c
+++ b/ctdb/server/ctdbd.c
@@ -214,8 +214,8 @@ int main(int argc, const char *argv[])
/* useful default logfile */
if (ctdb->logfile == NULL) {
- char *name = talloc_asprintf(ctdb, "%s/log.ctdb.vnn%u",
- VARDIR, ctdb->vnn);
+ char *name = talloc_asprintf(ctdb, "%s/log.ctdb.pnn%u",
+ VARDIR, ctdb->pnn);
ctdb_set_logfile(ctdb, name);
talloc_free(name);
}
diff --git a/ctdb/tcp/tcp_connect.c b/ctdb/tcp/tcp_connect.c
index 0b0f35abb13..8beb490ca0c 100644
--- a/ctdb/tcp/tcp_connect.c
+++ b/ctdb/tcp/tcp_connect.c
@@ -286,12 +286,12 @@ static int ctdb_tcp_listen_automatic(struct ctdb_context *ctdb)
ctdb->name = talloc_asprintf(ctdb, "%s:%u",
ctdb->address.address,
ctdb->address.port);
- ctdb->vnn = ctdb->nodes[i]->pnn;
+ ctdb->pnn = ctdb->nodes[i]->pnn;
ctdb->nodes[i]->flags &= ~NODE_FLAGS_DISCONNECTED;
- DEBUG(1,("ctdb chose network address %s:%u vnn %u\n",
+ DEBUG(1,("ctdb chose network address %s:%u pnn %u\n",
ctdb->address.address,
ctdb->address.port,
- ctdb->vnn));
+ ctdb->pnn));
if (listen(ctcp->listen_fd, 10) == -1) {
goto failed;