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

Implement target node option for cp command #11304

Merged
merged 1 commit into from
May 14, 2021

Conversation

daehyeok
Copy link
Contributor

@daehyeok daehyeok commented May 6, 2021

fixes #11146

before

Copy the specified file into minikube, it will be saved at path <target file absolute path> in your minikube.
Example Command : "minikube cp a.txt /home/docker/b.txt"

Usage:
  minikube cp <source file path> <target file absolute path> [flags] [options]

Use "minikube options" for a list of global command-line options (applies to all commands).

after

Copy the specified file into minikube, it will be saved at path <target file absolute path> in your minikube.
Example Command : "minikube cp a.txt /home/docker/b.txt"
                  "minikube cp a.txt minikube-m02:/home/docker/b.txt"

Usage:
  minikube cp <source file path> <target node name>:<target file absolute path> [flags] [options]

Use "minikube options" for a list of global command-line options (applies to all commands).

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label May 6, 2021
@k8s-ci-robot
Copy link
Contributor

Hi @daehyeok. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label May 6, 2021
@k8s-ci-robot k8s-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label May 6, 2021
@minikube-bot
Copy link
Collaborator

Can one of the admins verify this patch?

@daehyeok daehyeok force-pushed the copy_node branch 2 times, most recently from 11cbd91 to 8d14e1d Compare May 6, 2021 06:00
@daehyeok daehyeok changed the title Implement -n/--node option for cp command Implement target node option for cp command May 6, 2021
Copy link
Contributor

@ilya-zuyev ilya-zuyev left a comment

Choose a reason for hiding this comment

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

':' can be a part of filepath

➜  minikube git:(master) ✗ out/minikube ssh -- sudo mkdir "/tmp/bar:"
➜  minikube git:(master) ✗ out/minikube cp foo /tmp/bar:/foo         
➜  minikube git:(master) ✗ out/minikube ssh -- ls '/tmp/bar:/'      
foo
➜  minikube git:(copy_node) ✗ out/minikube ssh -- sudo mkdir "/tmp/bar:"
➜  minikube git:(copy_node) ✗ out/minikube cp foo /tmp/bar:/foo    

X Exiting due to GUEST_NODE_RETRIEVE: Node /tmp/bar does not exist.

May be it's better to add a new cli key, --target-node or something like this

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 6, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 6, 2021
@daehyeok daehyeok requested a review from ilya-zuyev May 6, 2021 23:45
@daehyeok
Copy link
Contributor Author

daehyeok commented May 6, 2021

@ilya-zuyev oops. changed to extract node name only when destPath is not a absolute path(not start with '/').
We only allowed absolute path for remote destination, so file with ':' character will be not a problem.
and if we use another flag for node name, we will need another flag for #11296 in future.

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: daehyeok, ilya-zuyev

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 7, 2021
@ilya-zuyev
Copy link
Contributor

/ok-to-test

@k8s-ci-robot k8s-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 7, 2021
@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11304) |
+----------------+----------+---------------------+
| minikube start | 49.6s    | 51.6s               |
| enable ingress | 36.7s    | 35.9s               |
+----------------+----------+---------------------+

Times for minikube start: 53.5s 46.9s 52.3s 47.8s 47.6s
Times for minikube (PR 11304) start: 55.2s 48.8s 51.5s 48.5s 53.9s

Times for minikube ingress: 34.7s 35.3s 42.3s 36.3s 34.8s
Times for minikube (PR 11304) ingress: 35.3s 35.7s 36.2s 37.4s 34.8s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11304) |
+----------------+----------+---------------------+
| minikube start | 21.5s    | 21.5s               |
| enable ingress | 34.4s    | 34.6s               |
+----------------+----------+---------------------+

Times for minikube ingress: 35.0s 30.0s 34.0s 37.0s 36.0s
Times for minikube (PR 11304) ingress: 32.0s 34.5s 34.0s 38.0s 34.5s

Times for minikube start: 22.2s 21.8s 22.1s 21.4s 20.3s
Times for minikube (PR 11304) start: 21.4s 21.0s 21.8s 21.4s 21.8s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11304) |
+----------------+----------+---------------------+
| minikube start | 44.6s    | 44.9s               |
| enable ingress |          |                     |
+----------------+----------+---------------------+

Times for minikube start: 44.4s 47.8s 43.6s 43.4s 43.9s
Times for minikube (PR 11304) start: 43.4s 43.2s 46.7s 44.4s 46.9s

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 12, 2021
@k8s-ci-robot k8s-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label May 13, 2021
@k8s-ci-robot
Copy link
Contributor

@daehyeok: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
pull-minikube-build 7c2e963 link /test pull-minikube-build

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@minikube-pr-bot
Copy link

kvm2 driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11304) |
+----------------+----------+---------------------+
| minikube start | 51.5s    | 48.9s               |
| enable ingress | 44.5s    | 40.5s               |
+----------------+----------+---------------------+

Times for minikube start: 57.0s 48.7s 50.7s 53.0s 48.0s
Times for minikube (PR 11304) start: 47.8s 50.2s 49.7s 47.6s 49.0s

Times for minikube ingress: 73.3s 39.9s 36.7s 33.8s 38.8s
Times for minikube (PR 11304) ingress: 35.7s 44.2s 49.4s 34.3s 38.8s

docker driver with docker runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11304) |
+----------------+----------+---------------------+
| minikube start | 22.0s    | 21.7s               |
| enable ingress | 69.0s    | 62.9s               |
+----------------+----------+---------------------+

Times for minikube start: 22.9s 22.3s 21.3s 21.8s 21.7s
Times for minikube (PR 11304) start: 21.2s 22.0s 21.9s 21.7s 21.7s

Times for minikube ingress: 28.0s 29.5s 80.0s 29.5s 178.0s
Times for minikube (PR 11304) ingress: 27.5s 109.5s 31.5s 87.0s 59.0s

docker driver with containerd runtime

+----------------+----------+---------------------+
|    COMMAND     | MINIKUBE | MINIKUBE (PR 11304) |
+----------------+----------+---------------------+
| minikube start | 42.4s    | 44.8s               |
| enable ingress |          |                     |
+----------------+----------+---------------------+

Times for minikube start: 31.1s 46.9s 43.5s 43.0s 47.4s
Times for minikube (PR 11304) start: 47.1s 43.2s 47.0s 43.2s 43.4s

@ilya-zuyev ilya-zuyev merged commit 2a2ffeb into kubernetes:master May 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

minikube cp missing -n
5 participants