Manpage of LIBCLUSTER
Section: OpenSSI Prog Manual (3ssi)
Updated: 27 October 2003
clusternode_setinfo - sets the state of a node
int clusternode_setinfo(clusternode_t nodenum,
int action, int sizeof(clusternode_info_t),
cc [flag ...] file -lcluster [library ...]
clusternode_setinfo allows the appropriately privileged caller to
set the state of a node in the cluster. Set the node_state field of
the structure, then call this function to set the state of the
nodenum node to the new value.
The nodeinfo structure is not updated as a result of this call.
The state change must be one of the following
COMINGUP to UP
UP to SHUTDOWN
UP to GOINGDOWN
SHUTDOWN to UP
SHUTDOWN to GOINGDOWN
UCLEANUP to DOWN
COMINGUP to KCLEANUP
UP to KCLEANUP
SHUTDOWN to KCLEANUP
GOINGDOWN to KCLEANUP
For details about node states and transitions, see the cluster(8ssi)
The details of the argument to clusternode_setinfo are:
The number of the node to change. This value must be within the range
of 1 and the value returned by cluster_maxnodes(3ssi).
This value must be CLUSTERNODE_SETSTATE, which indicates that the
state is to be changed to the new state placed in the node_state
field of the nodeinfo structure. Currently, the only action allowed
is the change of state.
A pointer to a structure of type clusternode_info_t. To affect a
change of state, you must first set the node_state field of the
structure to the target value.
When action is CLUSTERNODE_SETSTATE, the caller is appropriately
privileged, and the state change is valid, clusternode_setinfo
returns 0. Otherwise, clusternode_setinfo returns -1 and sets
errno to one of the following:
One of the following conditions exist:
- The nodeinfo parameter is invalid
- The node_state field of the nodeinfo structure is not a valid state to which the specified node can transition.
- The specified action is invalid.
- The specified node number is not in the within the range of 1 and the value returned by cluster_maxnodes(3ssi).
The caller is not appropriately privileged to perform the specified action.
This document was created by man2html,
using the manual pages.
Time: 21:59:39 GMT, May 19, 2004