Skip to content

cli: Add connect command stub#60636

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
itsbilal:add-connect-command
Feb 18, 2021
Merged

cli: Add connect command stub#60636
craig[bot] merged 1 commit intocockroachdb:masterfrom
itsbilal:add-connect-command

Conversation

@itsbilal
Copy link
Copy Markdown
Contributor

@itsbilal itsbilal commented Feb 16, 2021

Adds a new command stub, connect, with relevant args of
--certs-dir, --init-token, and list of peers. Implementation
code for this command is yet to come, and the command is not hooked
up to the outer cockroach command yet.

Very first part of #60632.

Release note: None.
Epic: CRDB-6663

@itsbilal itsbilal requested review from aaron-crl and knz February 16, 2021 22:51
@itsbilal itsbilal requested a review from a team as a code owner February 16, 2021 22:51
@itsbilal itsbilal self-assigned this Feb 16, 2021
@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown

@aaron-crl aaron-crl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @itsbilal and @knz)


pkg/cli/flags.go, line 479 at r1 (raw file):

		f := connectCmd.Flags()
		stringFlag(f, &baseCfg.SSLCertsDir, cliflags.CertsDir)
		stringFlag(f, &baseCfg.InitToken, cliflags.InitToken)

Do we need to add a join list here too?

Copy link
Copy Markdown
Contributor Author

@itsbilal itsbilal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @aaron-crl and @knz)


pkg/cli/flags.go, line 479 at r1 (raw file):

Previously, aaron-crl wrote…

Do we need to add a join list here too?

Nope, that'd go into the args functional argument in the runConnect function itself, as it's a positional argument.

Copy link
Copy Markdown

@aaron-crl aaron-crl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @itsbilal and @knz)


pkg/cli/flags.go, line 479 at r1 (raw file):

Previously, itsbilal (Bilal Akhtar) wrote…

Nope, that'd go into the args functional argument in the runConnect function itself, as it's a positional argument.

I thought this was a flagged command for start (which was what I was emulating)?

Either way, :lgtm: to get things rolling.

@itsbilal itsbilal force-pushed the add-connect-command branch 2 times, most recently from b48d6ef to 91ba8a0 Compare February 17, 2021 17:15
Copy link
Copy Markdown
Contributor

@knz knz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 5 of 5 files at r1, 1 of 1 files at r2.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @aaron-crl)


pkg/cli/flags.go, line 479 at r1 (raw file):

Previously, aaron-crl wrote…

I thought this was a flagged command for start (which was what I was emulating)?

Either way, :lgtm: to get things rolling.

I'll be with aaron on this one and think it will make sense to share the relevant args with start, to ease the teaching of this.
(this will include --join but also, as I surmised yesterday, --listen-addr and --advertise-addr and the corresponding sql/http addrs later. But you can leave the addr part to me)

Copy link
Copy Markdown
Contributor Author

@itsbilal itsbilal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TFTR!

bors r+

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @aaron-crl and @knz)


pkg/cli/flags.go, line 479 at r1 (raw file):

Previously, aaron-crl wrote…

I thought this was a flagged command for start (which was what I was emulating)?

Either way, :lgtm: to get things rolling.

It's a separate command altogether - not a part of start. But we can structure the underlying functions so they can also be called from runStart easily.

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Feb 17, 2021

This PR was included in a batch that was canceled, it will be automatically retried

@itsbilal
Copy link
Copy Markdown
Contributor Author

Don't think this got auto-retried, so:

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Feb 17, 2021

Already running a review

@itsbilal itsbilal force-pushed the add-connect-command branch from 91ba8a0 to 1487af5 Compare February 17, 2021 21:25
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Feb 17, 2021

Canceled.

Copy link
Copy Markdown
Contributor Author

@itsbilal itsbilal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As this PR got held up by bors anyway, I decided to incorporate the feedback to standardize flags with start.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @aaron-crl and @knz)


pkg/cli/flags.go, line 479 at r1 (raw file):

Previously, itsbilal (Bilal Akhtar) wrote…

It's a separate command altogether - not a part of start. But we can structure the underlying functions so they can also be called from runStart easily.

Done. It's now a JoinList now, behind the same type of flags as start. Also added --listen-addr.

Copy link
Copy Markdown

@aaron-crl aaron-crl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: with the updates.

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @knz)

Copy link
Copy Markdown
Contributor Author

@itsbilal itsbilal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TFTR!

bors r=aaron-crl

Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @knz)

aaron-crl pushed a commit to aaron-crl/cockroach that referenced this pull request Feb 17, 2021
…tion

security: added helper functions to support automatic certificate generation

This doesn't do anything yet but will be updated to trigger off:
cockroachdb#60636 when it lands.

Release note: None
Adds a new command stub, `connect`, with relevant args of
`--certs-dir`, `--init-token`, `--listen-addr`, `--join` (same as start).
Implementation code for this command is yet to come, and the command is not
hooked up to the outer `cockroach` command yet.

Very first part of cockroachdb#60632.

Release note: None.
@itsbilal itsbilal force-pushed the add-connect-command branch from 1487af5 to 2b4c93c Compare February 17, 2021 21:58
@craig
Copy link
Copy Markdown
Contributor

craig bot commented Feb 17, 2021

Canceled.

@itsbilal
Copy link
Copy Markdown
Contributor Author

bors r=aaron-crl

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Feb 18, 2021

Build failed (retrying...):

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Feb 18, 2021

Build succeeded:

@craig craig bot merged commit 9171f18 into cockroachdb:master Feb 18, 2021
itsbilal pushed a commit to itsbilal/cockroach that referenced this pull request Feb 19, 2021
…tion

security: added helper functions to support automatic certificate generation

This doesn't do anything yet but will be updated to trigger off:
cockroachdb#60636 when it lands.

Release note: None
itsbilal pushed a commit to itsbilal/cockroach that referenced this pull request Feb 19, 2021
…tion

security: added helper functions to support automatic certificate generation

This doesn't do anything yet but will be updated to trigger off:
cockroachdb#60636 when it lands.

Release note: None
aaron-crl pushed a commit to aaron-crl/cockroach that referenced this pull request Feb 21, 2021
…tion

server: added utility function for bundling init certs
server: added init function that uses a recieved bundle to provision a node
security: added helper functions to support automatic certificate generation
security: added ClientCAKeyPath helper to align with ClientCACertPath

This is part of cockroachdb#60632 and provides functions for cockroachdb#60636.

Release note: None
aaron-crl pushed a commit to aaron-crl/cockroach that referenced this pull request Feb 21, 2021
…tion

server: added utility function for bundling init certs
server: added init function that uses a recieved bundle to provision a node
security: added helper functions to support automatic certificate generation
security: added ClientCAKeyPath helper to align with ClientCACertPath

This is part of cockroachdb#60632 and provides functions for cockroachdb#60636.

Release note: None
aaron-crl pushed a commit to aaron-crl/cockroach that referenced this pull request Feb 22, 2021
…tion

server: added utility function for bundling init certs
server: added init function that uses a recieved bundle to provision a node
security: added helper functions to support automatic certificate generation
security: added ClientCAKeyPath helper to align with ClientCACertPath

This is part of cockroachdb#60632 and provides functions for cockroachdb#60636.

Release note: None
craig bot pushed a commit that referenced this pull request Feb 22, 2021
60705: server: added initial cert utilities for automatic cert generation r=knz a=aaron-crl

security: added helper functions to support automatic certificate generation

This doesn't do anything yet but will be updated to trigger off:
#60636 when it lands.

This is part of the work supporting #60632

Release note: None

Co-authored-by: Aaron Blum <aaron@cockroachlabs.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants