Sun Microsystems Logo
Products and Services
 
Support and Training
 
 

A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X  Y  Z  
 
Program Interfacecmm_member_setqualif(3CMM)


NAME

 cmm_member_setqualif - give a new level of qualification to a node

SYNOPSIS

 
cc [ flag... ] file...  -lcgha_cmm  -lrt
 
#include <cmm.h>
cmm_error_t cmm_member_setqualif(cmm_nodeid_t const nodeid, cmm_qualif_t const new_qualif);

DESCRIPTION

The cmm_member_setqualif() function assigns a new qualification level to a node. A qualification level is only meaningful for a node with the administrative attribute CMM_ELIGIBLE_MEMBER in the sflag field of the cmm_member_t structure. See the Netra High Availability Suite Foundation Services 2.1 6/03 CMM Programming Guide for further information on the cmm_member_t structure.

PARAMETERS

The cmm_member_setqualif() function takes the following parameters:

nodeid

Specifies the ID of the node whose qualification level is to be changed.

new_qualif

Specifies the new level of qualification assigned to the node.

EXTENDED DESCRIPTION

The cmm_member_setqualif() function can only be called from the master node. If an attempt is made to call this function from a node other than the master, a CMM_EPERM error is returned.

The nodeid given to the cmm_member_setqualif() function must be that of a node with the CMM_ELIGIBLE_MEMBER attribute. Changing the qualification level of a node in the cluster that does not have this attribute generates a CMM_EINVAL returned status. Changing the qualification level of a node with the CMM_OUT_OF_CLUSTER state will be successful as it is impossible to know whether or not the node is eligible. If the nodeid given to this function as a parameter is that of the master node, a failover occurs and a MASTER_DEMOTED notification is sent. CMM_ENOCLUSTER is returned until a new master is elected.

The new_qualif parameter given to the cmm_member_setqualif() function is one of the following parameters:

CMM_QUALIFIED_MEMBER

The current node can take any role.

CMM_DISQUALIFIED_MEMBER

The current node cannot participate in a master or a vice-master election.

CMM_SYNCHRO_READY

The node's disks are synchronized; the vice-master node can become master if necessary. Only meaningful for eligible nodes. A user application should not set this flags. CRFS is in charge of setting them and changing them may disrupt the cluster.

CMM_SYNCHRO_NEEDED

The node's disks are not synchronized; the vice-master node can not become master if necessary. Only meaningful for eligible nodes. A user application should not set this flags. CRFS is in charge of setting them and changing them may disrupt the cluster.

The cmm_member_setqualif call is asynchronous; the call's action is not fully completed when the call returns. If a second cmm_member_setqualif call is made to disqualify the master while the first call is still executing but before the master is demoted, both calls return CMM_OK, even though the master is in the process of being demoted. The result is not affected by the second call.

After a cmm_member_setqualif call, for a short period of time the cluster has no master, until the vice-master becomes the new master. Any call to the Cluster Membership Manger (CMM) Application Programming Interface (API) function in this short period of time will return CMM_ENOCLUSTER.

Necessary notifications are sent according to the impact of this call, as described in the Netra High Availability Suite Foundation Services 2.1 6/03 CMM Programming Guide.

The value of sflag on the indicated node is immediately updated when a change in the cluster state occurs, so a call to cmm_member_getinfo(3CMM) will reflect the change.

RETURN VALUES

The cmm_member_setqualif() function returns one of the following errors:

CMM_EBUSY

The CMM API server is temporarily out of resources to respond to the requested operation. The recommended action is to wait a short time and retry the operation. The length of the waiting must be decided by the user, depending on the application's characteristics.

CMM_ECONN

No nhcmmd is currently accessible in the local node.

CMM_EINVAL

Invalid parameter. Either the nodeid is not that of a master-eligible node or new_qualif is incorrect.

CMM_ENOCLUSTER

The calling node is not yet in a cluster.

CMM_ENOTSUP

An unexpected service error occurred.

CMM_EPERM

Permission denied. The function was not called from the master node.

CMM_ETIMEDOUT

The call timeout expired before the action was completed.

CMM_OK

Operation succeeds.

ATTRIBUTES

Various attributes must be considered.

See attributes(5) for descriptions of the attributes described in the following table:

ATTRIBUTE TYPEATTRIBUTE VALUE
ArchitectureSPARC
AvailabilitySUNWnhcmd
Interface StabilityEvolving
MT-LevelMT-Safe
Cancel-SafetyDeferred-Cancel-Safe Asynchronous-Cancel-Unsafe

SEE ALSO

Intro(3CMM), cmm_member_getinfo(3CMM), cmm_mastership_release(3CMM), cmm_membership_remove(3CMM)


Netra HAS FS 2.1Go To TopLast Changed September 2004