Expand the client async framework so that it can take a callback function.
authorRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 6 May 2008 05:42:59 +0000 (15:42 +1000)
committerRonnie Sahlberg <ronniesahlberg@gmail.com>
Tue, 6 May 2008 05:42:59 +0000 (15:42 +1000)
commit92b61cd7d53321d2fbe3eab7f0290e233e47ee9f
treeae19da87e3072ab9b8f12d0466fe4ae820fe8d05
parent2c23959616ef1db2ae07172eba72ef313ccba0ed
Expand the client async framework so that it can take a callback function.
This allows us to use the async framework also for controls that return
outdata.

Add a "capabilities" field to the ctdb_node structure. This field is
only initialized and kept valid inside the recovery daemon context and not
inside the main ctdb daemon.

change the GET_CAPABILITIES control to return the capabilities in outdata instead of in the res return variable.

When performing a recovery inside the recovery daemon, read the capabilities from all connected nodes and update the ctdb->nodes list of nodes.
when building the new vnnmap after the database rebuild in recovery, do not include any nodes which lack the LMASTER capability in the new vnnmap.
Unless there are no available connected node that sports the LMASTER capability in which case we let the local node (recmaster) take on the lmaster role temporarily (i.e. become a member of the vnnmap list)

(This used to be ctdb commit 0f1883c69c689b28b0c04148774840b2c4081df6)
ctdb/client/ctdb_client.c
ctdb/include/ctdb_private.h
ctdb/server/ctdb_control.c
ctdb/server/ctdb_recover.c
ctdb/server/ctdb_recoverd.c
ctdb/tools/ctdb.c