anchor.diff:      ?cluster_debug("Leaving cluster", []),
       timer:sleep(1000),
   
  +    create_marker(start_marker_path()),
       remove_marker(leave_marker_path()),
  +
       {ok, _} = ns_server_cluster_sup:start_ns_server(),
       ns_ports_setup:restart_memcached(),
  +
  +    remove_marker(start_marker_path()),
  +
  +    {noreply, State};
  +handle_cast(retry_start_after_leave, State) ->
  +    case ns_server_cluster_sup:start_ns_server() of
  +        {ok, _} ->
  +            ok;
  +        {error, running} ->
  +            ?log_warning("ns_server is already running. Ignoring."),
  +            ok;
  +        Other ->
  +            exit({failed_to_start_ns_server_after_leave, Other})
  +    end,
  +
  +    ns_ports_setup:restart_memcached(),
  +
  +    remove_marker(start_marker_path()),
  +
       {noreply, State}.
  -
   
   
   handle_info(Msg, State) ->
  
positive.code:             %% to terminate ns_server_sup is going to cause deadlock
              gen_server:cast(self(), leave);
          false ->
              ok
      end,
      {ok, #state{}}.
  
  
negative.code: 
  leave_marker_path() ->
      path_config:component_path(data, "leave_marker").
  
  start_marker_path() ->
      path_config:component_path(data, "start_marker").
  