-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cli: new command 'start-single-node'
Suggested/requested by @bdarnell: > There are currently two ways to initialize a cluster: Starting the first node without a --join flag, or starting all nodes with --join flags and running a separate cockroach init command. This redundancy is confusing (our docs use both methods without explaining the difference) and it's easy to accidentally initialize a new cluster by restarting your first node with the wrong flags. (This could have catastrophic consequences in 1.1 because data from the two clusters could get mixed. We've added safeguards against this in 2.0 but it's still an easy way to break things.) > I think that we should deprecate this implicit initialization mode and make the --join flag mandatory when starting a node (and therefore the init command would be mandatory too). To avoid adding too much complexity to single-node clusters, I propose a new `cockroach start-single-node` command to perform the start and init combination that is today implicit in the absence of a --join flag. > This would have a side benefit that we would know when the user intends to keep the cluster as a single node instead of adding more later. The `start-single-node` command could therefore set the replication factor to 1 to disable the "underreplicated ranges" warning. This patch implements the new `start-single-node` command as follows: - the new command does not accept `--join`. - it attempts to set the replication factor to 1 upon starting up. Meanwhile `cockroach start` is changed to produce a deprecation warning if `--join` is not specified. Release note (cli change): a new command `cockroach start-single-node` is introduced to start single-node clusters with replication disabled. Release note (cli change): using `cockroach start` without `--join` is now deprecated and this mode of execution will be removed in a later version of CockroachDB. Consider using `cockroach start-single-node` instead or combine `cockroach start` with `cockroach init`.
- Loading branch information
Showing
21 changed files
with
191 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.