-
Notifications
You must be signed in to change notification settings - Fork 990
kubectl drain --disable-eviction --dry-run=server hangs indefinitely #1830
Copy link
Copy link
Open
Labels
area/kubectlkind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.sig/cliCategorizes an issue or PR as relevant to SIG CLI.Categorizes an issue or PR as relevant to SIG CLI.
Description
What happened:
kubectl drain --disable-eviction --dry-run=server target-node hangs indefinitely when there are pods on the target node.
What you expected to happen:
The command should complete immediately without hanging, as it does with --dry-run=client or without --disable-eviction.
How to reproduce it (as minimally and precisely as possible):
# With kind multi-node cluster
kubectl apply -f pod.yaml (any pod manifest)
kubectl drain kind-worker --disable-eviction --ignore-daemonsets --dry-run=server
# Hangs here indefinitelyAnything else we need to know?:
I think it appears that the deletePods path (used when --disable-eviction is set) enters waitForDelete after sending the dry-run delete request, waiting for pods that are never actually removed.
Environment:
- Kubernetes version: v1.35
- OS: Linux
/sig cli
/kind bug
/area kubectl
/assign
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area/kubectlkind/bugCategorizes issue or PR as related to a bug.Categorizes issue or PR as related to a bug.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.sig/cliCategorizes an issue or PR as relevant to SIG CLI.Categorizes an issue or PR as relevant to SIG CLI.