-
Notifications
You must be signed in to change notification settings - Fork 4.1k
cli,kv: no guaranteed state switch from DECOMMISSIONING to DECOMMISSIONED if node decommission stops early #94430
Description
Filing the issue on behalf of @mdlinville and @a-entin
Describe the problem
If EITHER
- the user ran the
cockroach node decommission --wait=allcommand and then interrupted it (e.g. ctrl+c);
OR - the user ran
cockroach node decommission --wait=none.
In that case, the flip from "DECOMMISSIONING" to "DECOMMISSIONED" will not happen.
The reason for that is that the state flip is effected by the CLI program at the end. Only the CLI (or its underlying API call) is able to finalize the "decommissioned" state. So if you interrupt the command, or do --wait=none, it will only flip to "decommissioned" when you run the CLI program again after decommissioning has done all its work.
Expected behavior
The state flip from "DECOMMISSIONING" to "DECOMMISSIONED" should be done automatically by the cluster even when the CLI Command is stopped before decommissioning completes.
Context:
Slack thread https://cockroachlabs.slack.com/archives/C01PHNMUFLN/p1670361351636919
Environment:
- CockroachDB version v22.2
Jira issue: CRDB-22888