<commit_before>Preparation: paasta_tools and yelpsoa-configs
=========================================================

paasta_tools reads configuration about services from several YAML
files in `soa-configs <soa_configs.html>`_:

marathon-[clustername].yaml
---------------------------

e.g. ``marathon-norcal-prod.yaml``, ``marathon-mesosstage.yaml``. The
clustername is usually the same as the ``superregion`` in which the cluster
lives (``norcal-prod``), but not always (``mesosstage``). It MUST be all
lowercase. (non alphanumeric lowercase characters are ignored)

The yaml where marathon jobs are actually defined.

Top level keys are instancenames, e.g. ``main`` and ``canary``. Each
instance MAY have:

  * ``cpus``: Number of CPUs an instance needs. Defaults to .25. CPUs in Mesos
    are "shares" and represent a minimal amount of a CPU to share with a task.
    A task can burst to use any available free CPU, but is guaranteed to get
    the CPU shares specified.

  * ``mem``: Memory (in MB) an instance needs. Defaults to 1024 (1GB).

  * ``instances``: Marathon will attempt to run this many instances of the Service

  * ``nerve_ns``: Specifies that this namespace should be routed to by another
    namespace in SmartStack. In SmartStack, each service has difference pools
    of backend servers that are listening on a particul port. In PaaSTA we call
    these "Nerve Namespaces". By default, the Namespace assigned to a particular
    instance in PaaSTA has the *same name*, so the ``main`` instance will correspond
    to the ``main`` Nerve namespace defined in ``smartstack.yaml``. This ``nerve_ns``
    option allows users to make particular instances appear under an *alternative*
    namespace. For example ``canary`` instances can have ``nerve_ns: main`` to route
    their traffic to the same pool as the other ``main`` instances.

  * ``bounce_method``: Controls the bounce method; see `bounce_lib <bounce_lib.html>`_

  * ``bounce_method_params``: A dictionary of parameters for the specified bounce_method.

    * ``check_haproxy``: Boolean indicating if PaaSTA should check the local
      haproxy to make sure this task has been registered and discovered
      (Defaults to ``True`` if service is in SmartStack)

    * ``min_task_uptime``: Minimum number of seconds that a task must be
      running before we consider it healthy (Disabled by default)

  * ``drain_method``: Controls the drain method; see `drain_lib
    <drain_lib.html>`_. Defaults to ``noop`` for instances that are not in
    Smartstack, or ``hacheck`` if they are.
<commit_msg>Expand docs on what happens on oom conditions<commit_after>Preparation: paasta_tools and yelpsoa-configs
=========================================================

paasta_tools reads configuration about services from several YAML
files in `soa-configs <soa_configs.html>`_:

marathon-[clustername].yaml
---------------------------

e.g. ``marathon-norcal-prod.yaml``, ``marathon-mesosstage.yaml``. The
clustername is usually the same as the ``superregion`` in which the cluster
lives (``norcal-prod``), but not always (``mesosstage``). It MUST be all
lowercase. (non alphanumeric lowercase characters are ignored)

The yaml where marathon jobs are actually defined.

Top level keys are instancenames, e.g. ``main`` and ``canary``. Each
instance MAY have:

  * ``cpus``: Number of CPUs an instance needs. Defaults to .25. CPUs in Mesos
    are "shares" and represent a minimal amount of a CPU to share with a task.
    A task can burst to use any available free CPU, but is guaranteed to get
    the CPU shares specified.

  * ``mem``: Memory (in MB) an instance needs. Defaults to 1024 (1GB). In Mesos
    memory is constrained to the specified limit, and tasks will reach out-of-memory
    (OOM) conditions if they attempt to exceed these limits, and then be killed.
    There is currently not way to detect if this condition is met, other than a
    ``TASK_FAILED`` message.

  * ``instances``: Marathon will attempt to run this many instances of the Service

  * ``nerve_ns``: Specifies that this namespace should be routed to by another
    namespace in SmartStack. In SmartStack, each service has difference pools
    of backend servers that are listening on a particul port. In PaaSTA we call
    these "Nerve Namespaces". By default, the Namespace assigned to a particular
    instance in PaaSTA has the *same name*, so the ``main`` instance will correspond
    to the ``main`` Nerve namespace defined in ``smartstack.yaml``. This ``nerve_ns``
    option allows users to make particular instances appear under an *alternative*
    namespace. For example ``canary`` instances can have ``nerve_ns: main`` to route
    their traffic to the same pool as the other ``main`` instances.

  * ``bounce_method``: Controls the bounce method; see `bounce_lib <bounce_lib.html>`_

  * ``bounce_method_params``: A dictionary of parameters for the specified bounce_method.

    * ``check_haproxy``: Boolean indicating if PaaSTA should check the local
      haproxy to make sure this task has been registered and discovered
      (Defaults to ``True`` if service is in SmartStack)

    * ``min_task_uptime``: Minimum number of seconds that a task must be
      running before we consider it healthy (Disabled by default)

  * ``drain_method``: Controls the drain method; see `drain_lib
    <drain_lib.html>`_. Defaults to ``noop`` for instances that are not in
    Smartstack, or ``hacheck`` if they are.

{'fraction_non_alphanumeric': 0.11117196056955093, 'fraction_numerical': 0.002555677254472435, 'mean_word_length': 3.9899817850637525, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5807949', 'n_tokens_mistral': 1548, 'n_tokens_neox': 1463, 'n_words': 711}