anchor.diff:  %% @end
   %%
   join_cluster(Nodes) ->
  -  Alive = filter_dead_nodes(Nodes),
  -  autocluster_log:debug("Joining existing cluster: ~p", [Alive]),
  -  application:stop(rabbit),
  -  mnesia:stop(),
  -  rabbit_mnesia:reset(),
  -  rabbit_mnesia:join_cluster(lists:nth(1, Alive), disc),
  -  mnesia:start(),
  -  rabbit:start(),
  -  autocluster_log:info("Cluster joined"),
  -  ok.
  +  case filter_dead_nodes(Nodes) of
  +    [] ->
  +      autocluster_log:warning("Can not communicate with cluster nodes: ~p",
  +        [Nodes]),
  +      ok;
  +    Alive ->
  +      autocluster_log:debug("Joining existing cluster: ~p", [Alive]),
  +      application:stop(rabbit),
  +      mnesia:stop(),
  +      rabbit_mnesia:reset(),
  +      rabbit_mnesia:join_cluster(lists:nth(1, Alive),
  +                                 autocluster_config:get(node_type)),
  +      mnesia:start(),
  +      rabbit:start(),
  +      autocluster_log:debug("Cluster joined"),
  +      ok
  +  end.
  
positive.code:   case Module:nodelist() of
      {ok, Nodes} ->
        case lists:member(node(), Nodes) of
          true  -> ok;
          false ->
            autocluster_log:info("Registering node with ~p", [Name]),
            case Module:register() of
              ok ->
                autocluster_log:debug("Registered node"),
                ok;
              {error, Reason} ->
                autocluster_log:error("Error registering node with ~p: ~p", [Name, Reason]),
                error
  
negative.code: %% @end
  %%
  filter_dead_nodes(Nodes) ->
    lists:filter(fun(N) -> net_adm:ping(N) =:= pong end, Nodes).
  
  
  %% @private
  