/* remember our own node flags */
rec->node_flags = nodemap->nodes[pnn].flags;
- /* update the capabilities for all nodes */
- ret = update_capabilities(ctdb, nodemap);
- if (ret != 0) {
- DEBUG(DEBUG_ERR, (__location__ " Unable to update node capabilities.\n"));
- return;
- }
-
/* check which node is the recovery master */
ret = ctdb_ctrl_getrecmaster(ctdb, mem_ctx, CONTROL_TIMEOUT(), pnn, &rec->recmaster);
if (ret != 0) {
return;
}
+ /* update the capabilities for all nodes */
+ ret = update_capabilities(ctdb, nodemap);
+ if (ret != 0) {
+ DEBUG(DEBUG_ERR, (__location__ " Unable to update node capabilities.\n"));
+ return;
+ }
+
/*
* if the current recmaster do not have CTDB_CAP_RECMASTER,
* but we have force an election and try to become the new