Skip to content

fix(k8s): volume move cannot copy a claim off a cordoned node #5305

Closed

Description

@dan-petty

Problem Description

devops k8s volume move gives the source copy pod only the tolerations of the workload pod (src/devops_cli/k8s/volume_move.py:427-428). A workload pod usually has no toleration for node.kubernetes.io/unschedulable. _node_of (volume_move.py:515) checks availability only for the target node. Thus a move from a cordoned node passes the plan, but its copy pod stays Pending. A cordon is the usual reason to move a claim off a node.

Motivating case. The Open WebUI pod open-webui-0, a gateway client, has been Pending since 2026-11-12T15:03:56Z. Its local-path volume (reclaim policy Retain) has node affinity to a GPU worker that is cordoned since 2026-11-06T05:28:48Z for the crash investigation (#3785, dan-petty/homelab#356). A reboot of that node on 2026-11-12 recreated the pod. k8s/llm/values-open-webui.yaml:105-111 keeps the pod off the control-plane node. Thus no node is left for the pod. The Service open-webui has 0 endpoints, so the Ingress open-webui-ingress has no backend. The Argo CD Application open-webui is Progressing since 2026-11-10T07:19:02Z. This is not a LiteLLM setting.

The owner chooses one of these options:

  1. Uncordon the node.
  2. Move the claim with devops k8s volume move llm/open-webui --to-node <worker>. Today this needs a short uncordon first and a new cordon after the move. This issue removes the need for the uncordon.
  3. Make a new claim and lose the data. Back up first (see feat(k8s): back up the other app volumes off their node #4767).

Do not add a toleration for the unschedulable taint to Open WebUI itself, because it defeats the cordon.

Reproduction Steps

  1. Cordon a worker node that holds a local-path claim of a StatefulSet. The workload pod must have no toleration for the unschedulable taint.
  2. Run devops k8s volume move <namespace>/<claim> --plan, then devops k8s volume move <namespace>/<claim> --to-node <other-worker>.

Expected vs Actual Behavior

Expected: the copy pod starts on the cordoned source node with a read-only mount, and the move completes.

Actual (from the code): the copy pod has no toleration for the unschedulable taint, and the scheduler does not place it. Today the Open WebUI claim is on a cordoned GPU worker, and the Open WebUI pod has been Pending since 2026-11-12. The only ways out are an uncordon, which the crash investigation does not want, or data loss.

Environment Diagnostics

  • DevOps CLI Version: 0.124.0
  • Execution Environment: homelab Kubernetes cluster, local-path storage class

Logs, Traces, or Terminal Output

# src/devops_cli/k8s/volume_move.py:420-432
spec["tolerations"] = list(plan.source_tolerations)   # the only tolerations of the source copy pod
# The Open WebUI pod has only the not-ready and unreachable NoExecute tolerations.
# Pending pod event (2026-11-13):
0/4 nodes are available: 1 node(s) didn't match Pod's node affinity/selector, 1 node(s) were unschedulable, 2 node(s) didn't match PersistentVolume's node affinity
# Not run live: the finding comes from a read-only investigation.

Proposed Fix

Add a toleration node.kubernetes.io/unschedulable:NoSchedule (operator Exists) to the source copy pod in _copy_pod_manifest (src/devops_cli/k8s/volume_move.py:420-432). The kube-scheduler NodeUnschedulable filter admits a pod that tolerates this taint. The source mount is read-only, so the copy pod does no harm on a cordoned node. Add a unit test that the source copy manifest has the toleration and that a plan from a cordoned node passes. Prove it live with a test claim on a cordoned worker.

Acceptance Criteria

  • A unit test shows that the source copy pod manifest has the toleration node.kubernetes.io/unschedulable (operator Exists, effect NoSchedule), and that the target copy pod does not change.
  • A unit test shows that a plan from a cordoned source node passes.
  • uv run devops ci fail-to-pass --base origin/main shows that the new tests fail on the base.
  • Live proof: a test claim on a cordoned worker moves to another worker, and the source node stays cordoned during the move.
  • The workload pod gets no new toleration.

Activity

  1. added
    source/agent
    type/bug
    scope/k8s
    status/new
    value/medium
    effort/low
    on Nov 13, 2026
  2. dan-petty commented on Nov 13, 2026

    @dan-petty
    OwnerAuthor
  3. added
    priority/p2-medium
    on Nov 13, 2026
  4. added
    status/in-progress
    status/in-review
    and removed
    status/new
    status/in-progress
    on Nov 15, 2026
  5. removed
    status/in-review
    on Nov 15, 2026
  6. devops-cli-service commented on Nov 15, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-15 16:55 UTC

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    effort/lowpriority/p2-mediumscope/k8ssource/agenttype/bugvalue/medium

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions