Lines Matching defs:node

42  * It runs on every node and provides the following rpc services:
56 * On every node only one of those xxx_2 functions can be active at the
64 * One node (the initiator)
95 * slave node is done with this message.
115 * - sends them back to the initiating node thru a call to
131 * Number of outstanding messages that were initiated by this node.
141 /* RPC clients for every set and every node and their protecting locks */
159 /* Stuff to describe the global status of the commd on one node */
196 md_mnnode_desc *node = (md_mnnode_desc *)data;
198 return (clnt_create_timed(node->nd_priv_ic, MDMN_COMMD, TWO, "tcp",
225 "on node %d when processing message type %d\n", nid, type);
228 "Inconsistent return value from node %d when processing "
465 * mdmn_is_node_dead checks to see if a node is dead using
467 * If unable to contact SunCuster the node is assumed to be alive.
469 * 1 - node is dead
470 * 0 - node is alive
473 mdmn_is_node_dead(md_mnnode_desc *node)
483 if (strcmp(node->nd_nodename, mynode()) == 0)
486 size = strlen(fmt) + strlen(node->nd_nodename) + 1;
489 (void) strlcat(cmd, node->nd_nodename, size);
591 * If the rpc client for this node has not been setup for any set, we do it now.
593 * Returns 0 on success (node found in set, rpc client setup)
595 * -2 if node not part of set
602 md_mnnode_desc *node;
636 /* first we have to find the node name for this node id */
637 for (node = sd->sd_nodelist; node; node = node->nd_next) {
638 if (node->nd_nodeid == nid)
639 break; /* we found our node in this set */
643 if (node == (md_mnnode_desc *)NULL) {
645 "FATAL: node %d not found in set %d\n", nid, setno);
651 node->nd_nodename ? node->nd_nodename : "NULL", node->nd_flags);
653 /* Did this node join the diskset? */
654 if ((node->nd_flags & MD_MN_NODE_OWN) == 0) {
656 node->nd_nodename ? node->nd_nodename : "NULL", setno);
661 /* if clnt_create has not been done for that node, do it now */
666 * While trying to create a connection to a node,
667 * periodically check to see if the node has been marked
671 * to a dead node) can lead to large delays and/or failures
677 node->nd_nodename, mdmn_clnt_create,
678 (void *) node, MD_CLNT_CREATE_SUBTIMEOUT, &ep);
679 /* Is the node dead? */
680 if (mdmn_is_node_dead(node) == 1) {
682 "rpc.mdcommd: no client for dead node %s\n",
683 node->nd_nodename);
690 clnt_pcreateerror(node->nd_nodename);
694 /* this node has the license to send */
696 add_license(node);
712 * Checks if the client for this set/node combination is already setup
755 md_mnnode_desc *node;
910 * this node didn't join yet the diskset, better don't do anything
918 for (node = sd->sd_nodelist; node != NULL; node = node->nd_next) {
920 nid = node->nd_nodeid;
923 "setting up: node=%s, priv_ic=%s, flags=0x%x\n",
924 node->nd_nodename ? node->nd_nodename : "NULL",
925 node->nd_priv_ic ? node->nd_priv_ic : "NULL",
926 node->nd_flags);
928 if ((node->nd_flags & MD_MN_NODE_OWN) == 0) {
931 node->nd_nodename ? node->nd_nodename : "NULL",
938 commd_debug(MD_MMV_INIT, "init: already: node=%s\n",
939 node->nd_nodename ? node->nd_nodename : "NULL");
944 * While trying to create a connection to a node,
945 * periodically check to see if the node has been marked
949 * to a dead node) can lead to large delays and/or failures
955 node->nd_nodename, mdmn_clnt_create,
956 (void *) node, MD_CLNT_CREATE_SUBTIMEOUT, &ep);
957 /* Is the node dead? */
958 if (mdmn_is_node_dead(node) == 1) {
960 "rpc.mdcommd: no client for dead node %s\n",
961 node->nd_nodename);
968 clnt_pcreateerror(node->nd_nodename);
970 * If we cannot connect to a single node
971 * (maybe because it is down) we mark this node as not
972 * owned and continue with the next node in the list.
976 node->nd_flags &= ~MD_MN_NODE_OWN;
980 node->nd_nodename);
984 node->nd_nodename);
987 /* this node has the license to send */
989 add_license(node);
995 commd_debug(MD_MMV_INIT, "init: done: node=%s\n",
996 node->nd_nodename ? node->nd_nodename : "NULL");
1240 * do_send_message(msg, node)
1242 * Send a message to a given node and wait for a acknowledgment, that the
1243 * message has arrived on the remote node.
1253 do_send_message(md_mn_msg_t *msg, md_mnnode_desc *node)
1267 nid = node->nd_nodeid;
1294 * take this node out of our considerations.
1300 node->nd_flags &= ~MD_MN_NODE_OWN;
1304 node->nd_nodename);
1307 MSGID_ELEMS(msg->msg_msgid), node->nd_nodename);
1360 * If the class is locked on the other node, keep trying.
1402 * When we are here, we have sent the message to the other node and
1403 * we know that node has accepted it.
1407 * If we timeout, it is likely that this is because the node has
1479 md_mnnode_desc *node;
1647 * send message to node until that succeeds
1660 node = NULL;
1739 for (node = set_descriptor[setno]->sd_nodelist; node;
1740 node = node->nd_next) {
1741 md_mn_nodeid_t nid = node->nd_nodeid;
1744 if (node == set_descriptor[setno]->sd_mn_masternode) {
1748 /* If this node didn't join the disk set, ignore it */
1749 if ((node->nd_flags & MD_MN_NODE_OWN) == 0) {
1761 * Register the node that is addressed,
1772 err = do_send_message(cmsg, node);
1787 continue; /* send to next node */
1800 * this node failed
1818 break; /* out of node loop first */
1820 /* send msg to the next node */
1827 * Message processed on remote node.
1829 * result is different on this node from the result
1841 * processed on the remote node.
1845 * This means: If a message fails on no node,
1863 break; /* out of node loop */
1865 continue; /* try next node */
2183 * Check that the issuing node is a legitimate one (i.e. is licensed to send
2328 /* is this rpc request coming from the local node? */
2430 /* is this rpc request coming from a licensed node? */
2564 /* is this rpc request coming from a licensed node? */
2584 * we are on the initiating node and we wakeup the original
2674 /* is this rpc request coming from a licensed node? */
2774 /* is this rpc request coming from the local node ? */
2830 /* is this rpc request coming from the local node ? */
2902 * MDMNE_NOT_JOINED if the set is not yet initialized on this node
2926 /* is this rpc request coming from the local node ? */
3018 * MDMNE_NOT_JOINED if the set is not yet initialized on this node
3038 /* is this rpc request coming from the local node ? */
3127 md_mnnode_desc *node;
3137 /* is this rpc request coming from the local node ? */
3159 for (node = set_descriptor[setno]->sd_nodelist; node;
3160 node = node->nd_next) {
3163 * shortly, and this node is guaranteed to be
3170 if (node == set_descriptor[setno]->sd_mn_mynode)
3172 mdmn_clnt_destroy(client[setno][node->nd_nodeid]);
3173 if (client[setno][node->nd_nodeid] != (CLIENT *)NULL) {
3174 client[setno][node->nd_nodeid] = (CLIENT *)NULL;
3212 /* is this rpc request coming from the local node ? */