Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add cockroach nodelocal upload docs #6871

Merged
merged 2 commits into from Mar 25, 2020
Merged

Add cockroach nodelocal upload docs #6871

merged 2 commits into from Mar 25, 2020

Conversation

lnhsingh
Copy link
Contributor

@lnhsingh lnhsingh commented Mar 19, 2020

Changes:

  • Added cockroach-nodelocal-upload.md, which explains the new command
  • Added cockroach nodelocal upload to the sidebar nav
  • Added cockroach nodelocal upload to cockroach-commands.md
  • Updated existing nodelocal URI examples / notes to include a nodeID, which is now required

Closes #6010, #6788.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

@lnhsingh lnhsingh requested review from dt and mwang1026 March 23, 2020 21:54
@lnhsingh lnhsingh marked this pull request as ready for review March 23, 2020 21:55
@@ -30,6 +30,7 @@ Command | Usage
[`cockroach debug zip`](cockroach-debug-zip.html) | Generate a `.zip` file that can help Cockroach Labs troubleshoot issues with your cluster.
[`cockroach debug merge-logs`](cockroach-debug-merge-logs.html) | Merge multiple log files from different machines into a single stream.
[`cockroach workload`](cockroach-workload.html) | Run a built-in load generator against a cluster.
[`cockroach nodelocal upload`](cockroach-nodelocal-upload.html) | <span class="version-tag">New in v20.1:</span> Upload a file to a node's local file system.
Copy link
Member

Choose a reason for hiding this comment

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

maybe "Upload a file to the external-IO-dir on a node's...". Just want to get out ahead of the security concerns this feature might immediately raise if someone didn't know that restriction was in place.

toc: true
---

<span class="version-tag">New in v20.1:</span> The `cockroach nodelocal upload` [command](cockroach-commands.html) uploads a file to a node's (the gateway node, by default) local file system.
Copy link
Member

Choose a reason for hiding this comment

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

ditto above -- i'm include right away that it is uploading to the external io dir in the introduction. I know it is a detail and that it is covered in the next paragraph, but arbitrary file access is scary and without that "node's local filesystem" makes it sounds like it is wide open. Someone might panic here instead of reading the details.

@@ -0,0 +1,90 @@
---
Copy link
Member

Choose a reason for hiding this comment

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

the user must have the admin role, and the node they're uploading to much not have external-io disabled.

@@ -100,7 +100,7 @@ To import a local file, you have the following options:
- Option 2. Make the file accessible from each local node's store:
1. Create an `extern` directory on each node's store. The pathname will differ depending on the [`--store` flag passed to `cockroach start` (if any)](cockroach-start.html#general), but will look something like `/path/to/cockroach-data/extern/`.
Copy link
Member

Choose a reason for hiding this comment

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

the "on each node" part goes away as does step 2, but in fact, i think we could just say to to use cockroach nodelocal upload data.sql (or manually place the file in the extern directory).

@@ -100,7 +100,7 @@ To import a local file, you have the following options:
- Option 2. Make the file accessible from each local node's store:
1. Create an `extern` directory on each node's store. The pathname will differ depending on the [`--store` flag passed to `cockroach start` (if any)](cockroach-start.html#general), but will look something like `/path/to/cockroach-data/extern/`.
2. Copy the file to each node's `extern` directory.
Copy link
Member

Choose a reason for hiding this comment

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

only to node 1 now, since that is where the URI points in the next step.

Copy link
Contributor Author

@lnhsingh lnhsingh left a comment

Choose a reason for hiding this comment

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

TFTR!

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


v20.1/cockroach-commands.md, line 33 at r1 (raw file):

Previously, dt (David Taylor) wrote…

maybe "Upload a file to the external-IO-dir on a node's...". Just want to get out ahead of the security concerns this feature might immediately raise if someone didn't know that restriction was in place.

Done.


v20.1/cockroach-nodelocal-upload.md, line 1 at r1 (raw file):

Previously, dt (David Taylor) wrote…

the user must have the admin role, and the node they're uploading to much not have external-io disabled.

Done.


v20.1/cockroach-nodelocal-upload.md, line 7 at r1 (raw file):

Previously, dt (David Taylor) wrote…

ditto above -- i'm include right away that it is uploading to the external io dir in the introduction. I know it is a detail and that it is covered in the next paragraph, but arbitrary file access is scary and without that "node's local filesystem" makes it sounds like it is wide open. Someone might panic here instead of reading the details.

Done.


v20.1/import-into.md, line 101 at r1 (raw file):

Previously, dt (David Taylor) wrote…

the "on each node" part goes away as does step 2, but in fact, i think we could just say to to use cockroach nodelocal upload data.sql (or manually place the file in the extern directory).

Done.


v20.1/import-into.md, line 102 at r1 (raw file):

Previously, dt (David Taylor) wrote…

only to node 1 now, since that is where the URI points in the next step.

Done.

@ericharmeling ericharmeling requested a review from dt March 24, 2020 20:09
Copy link
Contributor

@ericharmeling ericharmeling left a comment

Choose a reason for hiding this comment

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

LGTM

Reviewed 4 of 7 files at r1, 3 of 3 files at r2.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @dt and @mwang1026)

@lnhsingh lnhsingh merged commit 60d94b3 into master Mar 25, 2020
@lnhsingh lnhsingh deleted the nodelocal-upload branch March 25, 2020 00:17
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.

Enable single-node nodelocal:// storage
4 participants