cockroachdb / cockroachdb/cockroach

cli,kv: no guaranteed state switch from DECOMMISSIONING to DECOMMISSIONED if `node decommission` stops early

Open
#94,430 3 comments 0 reactions 0 assignees View on GitHub
A-kv-distribution C-bug docs-done docs-known-limitation T-kv
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Filing the issue on behalf of @mdlinville and @a-entin
**Describe the problem**

If EITHER
1) the user ran the `cockroach node decommission --wait=all` command and then interrupted it (e.g. ctrl+c);
OR
2) 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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.