BACK
Manpage of LIBCLUSTER

LIBCLUSTER

Section: OpenSSI Prog Manual (3ssi)
Updated: 27 October 2003

 

NAME

clusternode_setinfo - sets the state of a node  

SYNOPSIS

#include <sys/cluster.h>

int clusternode_setinfo(clusternode_t nodenum,
                        int action, int sizeof(clusternode_info_t),
                        clusternode_info_t *nodeinfo);

cc [flag ...] file -lcluster [library ...]
 

DESCRIPTION

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) manual page.

The details of the argument to clusternode_setinfo are:

nodenum
The number of the node to change. This value must be within the range of 1 and the value returned by cluster_maxnodes(3ssi).
action
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.
nodeinfo
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.
 

RETURN 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:
EINVAL

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).
EPERM

The caller is not appropriately privileged to perform the specified action.
 

SEE ALSO

cluster(8ssi), cluster_detailed_transition(3ssi), cluster_maxnodes(3ssi), cluster_membership(3ssi), cluster_name(3ssi), cluster_ssiconfig(3ssi), cluster_transition(3ssi), clusternode_avail(3ssi), clusternode_info(3ssi), clusternode_num(3ssi)


This document was created by man2html, using the manual pages.
Time: 21:59:39 GMT, May 19, 2004