> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackshift.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Maintenance mode

> Use maintenance as a safety control before upgrades or disruptive host changes.

<Tip>
  **Live.** This area is documented as current, user-reliable behavior.
</Tip>

## Goal

Keep nodes out of the scheduler when you are about to perform risky host-level work.

## Prerequisites

* A connected node

## Workflow

<Steps>
  <Step>
    Enter maintenance before upgrades or host maintenance.
  </Step>

  <Step>
    Keep the node in maintenance until health and heartbeat are clean again.
  </Step>

  <Step>
    Exit maintenance only when you want the node schedulable again.
  </Step>
</Steps>

## What maintenance does

Draining a node puts it into maintenance, which takes it out of the scheduler so no new workloads are placed on it. It is the safety control to reach for before an agent upgrade or any disruptive host-level work.

## Drain and activate

* Drain: move the node into maintenance — it stops receiving new placements.
* Activate: bring the node back to a schedulable state once it is healthy again.
* Maintenance stops new placement; it does not automatically evacuate workloads already running on the node, so move stateful workloads deliberately if the host work is destructive.

## When to use it

* Before upgrading the node agent.
* Before host-level maintenance (kernel updates, disk work, reboots).
* When a node is misbehaving and you want to stop it taking new work while you investigate.

## Expected result

<Check>
  Node lifecycle work happens with fewer accidental scheduling side effects.
</Check>

## Related guides

<CardGroup cols={2}>
  <Card title="Upgrade the agent" href="/nodes/upgrade-agent">
    Use the maintenance-first path to move an existing node to a newer agent version.
  </Card>

  <Card title="Node health, diagnostics, and deletion" href="/nodes/node-health-diagnostics-and-deletion">
    Read node diagnostics correctly and understand when deletion is safe or blocked.
  </Card>

  <Card title="Node overview" href="/nodes/node-overview">
    What a node is, what the agent does, and what node health means in StackShift.
  </Card>
</CardGroup>
