anchor.diff:              reply_text(Req, Errors1, 400);
           {false, Params} ->
               Timeout = proplists:get_value(timeout, Params),
  -            MaxNodes = proplists:get_value(maxNodes, Params),
  +            %% maxCount will not be set for CE and pre-upgrade so use the
  +            %% default.
  +            MaxCount = proplists:get_value(maxCount, Params,
  +                                           ?DEFAULT_EVENTS_ALLOWED),
               Extras = proplists:get_value(extras, Params),
  -            auto_failover:enable(Timeout, MaxNodes, Extras),
  +            auto_failover:enable(Timeout, MaxCount, Extras),
               %% TODO: Audit the extras?
  -            ns_audit:enable_auto_failover(Req, Timeout, MaxNodes),
  +            ns_audit:enable_auto_failover(Req, Timeout, MaxCount),
               reply(Req, 200);
           {true, {error, Errors}} ->
               reply_json(Req, {struct, [{errors, {struct, Errors}}]}, 200);
  
positive.code: -define(DEFAULT_DATA_DISK_ISSUES_TIMEPERIOD, 120). %% seconds
  
  -define(FAILOVER_SERVER_GROUP_CONFIG_KEY, failover_server_group).
  
  handle_settings_get(Req) ->
      {value, Config} = ns_config:search(ns_config:get(), auto_failover_cfg),
  
negative.code:     %% Infact, 5.0 and earlier, the auto_failover:make_persistent()
      %% code inadvertently removed max_nodes from the config when auto-failover
      %% was enabled.
      New2 = lists:keystore(?MAX_EVENTS_CONFIG_KEY, 1, New1,
                            {?MAX_EVENTS_CONFIG_KEY, ?DEFAULT_EVENTS_ALLOWED}),
      New3 = lists:keydelete(max_nodes, 1, New2),
      New = lists:keystore(failed_over_server_groups, 1, New3,
                           {failed_over_server_groups, []}),
  