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.