crowbar_framework/app/models/ceilometer_service.rb
# If the ceilometer-server role has a cluster assigned, we want to
# make sure that the cluster contains at least three nodes. MongoDB HA
# requires it; otherwise the Replica Set wouldn't be able to elect a
# primary.
If the ceilometer-server role has a cluster assigned, we want to
make sure that the cluster contains at least three nodes. MongoDB HA
requires it; otherwise the Replica Set wouldn't be able to elect a
primary.
If the ceilometer - server role has a cluster assigned we want to make sure that the cluster contains at least three nodes . MongoDB HA requires it ; otherwise the Replica Set wouldn ' t be able to elect a primary .
def validate_minimum_three_nodes_in_cluster(proposal)
    servers = proposal["deployment"][@bc_name]["elements"]["ceilometer-server"]
    use_mongodb = proposal["attributes"][@bc_name]["use_mongodb"]
    if use_mongodb && servers.length == 1 && is_cluster?(servers[0])
      nodes, failures = expand_nodes_for_all servers
      @logger.debug("validate_minimum_three_nodes_in_cluster: skipping "\
        "items that we failed to expand: #{failures.join(", ")}"
        ) unless failures.nil? || failures.empty?
      validation_error(
        "The cluster assigned to the ceilometer-server "\
        "role should have at least 3 nodes, but it only has #{nodes.count}."
        ) if nodes.length < 3
    end
  end
def validate_minimum_three_nodes_in_cluster ( proposal ) servers = proposal [ "deployment" ] [ @bc_name ] [ "elements" ] [ "ceilometer-server" ] use_mongodb = proposal [ "attributes" ] [ @bc_name ] [ "use_mongodb" ] if use_mongodb && servers . length == 1 && is_cluster? ( servers [ 0 ] ) nodes , failures = expand_nodes_for_all servers @logger . debug ( "validate_minimum_three_nodes_in_cluster: skipping " "items that we failed to expand: #{failures.join(", ")}" ) unless failures . nil? || failures . empty? validation_error ( "The cluster assigned to the ceilometer-server " "role should have at least 3 nodes, but it only has #{nodes.count}." ) if nodes . length < 3 end end
If the ceilometer-server role has a cluster assigned, we want to
make sure that the cluster contains at least three nodes.
If the ceilometer - server role has a cluster assigned we want to make sure that the cluster contains at least three nodes .
proposal