acs::Cluster method peer_nodes (protected)

 <instance of acs::Cluster[i]> peer_nodes dynamic_peers

Defined in packages/acs-tcl/tcl/cluster-procs.tcl

Determine the peer nodes of the server cluster. These are cluster nodes which will receive intra-server commands.

Parameters:
dynamic_peers (required)

Testcases:
No testcase defined.
Source code:
set :configured_cluster_hosts {}
set peer_nodes {}
foreach location [server_cluster_all_hosts] {
    #
    # Since the input can depend on erroneous user input,
    # use "try" to ease debugging.
    #
    try {
        :qualified_location $location
    } on ok {qualified_location} {
        lappend :configured_cluster_hosts $qualified_location
    } on error {errorMsg} {
        ns_log notice "ignore $location (:qualified_location returned $errorMsg)"
        continue
    }
    if {[:is_current_server $qualified_location]} {
        #array:log "$qualified_location is the current server"
        continue
    }
    #
    # For dynamic cluster peers, check the reachability
    #
    if {$qualified_location in $dynamic_peers
        && ![:reachable $qualified_location]
    } {
        ns_log warning "cluster node lost contact to dynamic cluster peer: $qualified_location"
        continue
    }

    lappend peer_nodes $qualified_location
}
#:log "final peer_nodes <$peer_nodes>"
return $peer_nodes
XQL Not present:
Generic, PostgreSQL, Oracle
[ hide source ] | [ make this the default ]
Show another procedure: