github.com/Ilhicas/nomad@v1.0.4-0.20210304152020-e86851182bc3/website/content/docs/commands/deployment/fail.mdx (about)

     1  ---
     2  layout: docs
     3  page_title: 'Commands: deployment fail'
     4  sidebar_title: fail
     5  description: |
     6    The deployment fail command is used to manually fail a deployment.
     7  ---
     8  
     9  # Command: deployment fail
    10  
    11  The `deployment fail` command is used to mark a deployment as failed. Failing a
    12  deployment will stop the placement of new allocations as part of rolling
    13  deployment and if the job is configured to auto revert, the job will attempt to
    14  roll back to a stable version.
    15  
    16  ## Usage
    17  
    18  ```plaintext
    19  nomad deployment fail [options] <deployment id>
    20  ```
    21  
    22  The `deployment fail` command requires a single argument, a deployment ID or
    23  prefix.
    24  
    25  When ACLs are enabled, this command requires a token with the `submit-job`
    26  and `read-job` capabilities for the deployment's namespace.
    27  
    28  ## General Options
    29  
    30  @include 'general_options.mdx'
    31  
    32  ## Fail Options
    33  
    34  - `-detach`: Return immediately instead of monitoring. A new evaluation ID
    35    will be output, which can be used to examine the evaluation using the
    36    [eval status] command.
    37  
    38  - `-verbose`: Show full information.
    39  
    40  ## Examples
    41  
    42  Manually mark an ongoing deployment as failed:
    43  
    44  ```shell-session
    45  $ nomad deployment fail 8990cfbc
    46  Deployment "8990cfbc-28c0-cb28-ca31-856cf691b987" failed
    47  
    48  ==> Monitoring evaluation "a2d97ad5"
    49      Evaluation triggered by job "example"
    50      Evaluation within deployment: "8990cfbc"
    51      Evaluation status changed: "pending" -> "complete"
    52  ==> Evaluation "a2d97ad5" finished with status "complete"
    53  
    54  $ nomad deployment status 8990cfbc
    55  ID          = 8990cfbc
    56  Job ID      = example
    57  Job Version = 2
    58  Status      = failed
    59  Description = Deployment marked as failed
    60  
    61  Deployed
    62  Task Group  Desired  Placed  Healthy  Unhealthy
    63  cache       3        2       1        0
    64  ```
    65  
    66  [eval status]: /docs/commands/eval-status