anchor.diff:                                   fun (X) ->
                                            X -- [RemoteNode]
                                    end),
  -            ns_config_rep:push();
  +            ns_config_rep:push(),
  +            ns_mnesia:delete_node(RemoteNode);
           true ->
               leave()
       end.
  
positive.code: -export([running/2, joining/2, leaving/2]).
  
  %% API
  -export([join/2, leave/0, leave/1, shun/1, log_joined/0,
          rename_node/2]).
  
  -export([alert_key/1]).
  
negative.code: 
  joining({exit, _Pid}, #joining_state{remote=RemoteNode, cookie=NewCookie}) ->
      error_logger:info_msg("ns_cluster: joining cluster. Child has exited.~n"),
      ns_mnesia:delete_schema(),
      timer:sleep(1000), % Sleep for a second to let things settle
      true = erlang:set_cookie(node(), NewCookie),
      %% Let's verify connectivity.
      Connected = net_kernel:connect_node(RemoteNode),
      ?log_info("Connection from ~p to ~p:  ~p",
                [node(), RemoteNode, Connected]),
      %% Add ourselves to nodes_wanted on the remote node after shutting
      %% down our own config server.
      case rpc:call(RemoteNode, ns_cluster, add_node, [node()]) of
          {badrpc, Crap} -> exit({badrpc, Crap});
          _ -> error_logger:info_msg("Remote config updated to add ~p to ~p~n",
                                     [node(), RemoteNode])
  