cockroach icon indicating copy to clipboard operation
cockroach copied to clipboard

roachprod: fix `roachprod init`.

Open renatolabs opened this issue 2 years ago • 1 comments

When a cluster is started with the --skip-init option, the caller can run roachprod init at any time to initialize the cluster. Unfortunately, the code used to initialize the cluster was duplicated: one copy existed in the start path, and another in the init path. Since the latter is used far less frequently, it had a bug that went unnoticed: it hardcoded the first node index as 0, when node indices start at 1.

This commit fixes the issue by updating the constant and sharing code between init and start.

Fixes #88226.

Release note: None

renatolabs avatar Sep 22 '22 21:09 renatolabs

This change is Reviewable

cockroach-teamcity avatar Sep 22 '22 21:09 cockroach-teamcity

bors r=srosenberg,erikgrinaker

TFTR!

renatolabs avatar Sep 23 '22 13:09 renatolabs

Build succeeded:

craig[bot] avatar Sep 23 '22 14:09 craig[bot]

I think this change might have had an unintended side effect - we no longer set the test license, which causes failures like #88665.

yuzefovich avatar Sep 25 '22 18:09 yuzefovich