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

remove tar error message #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

lampnick
Copy link
Owner

@lampnick lampnick commented Jul 4, 2019

when you use this comand:kubectl cp kube-system/etcd-master:/usr/local/bin/etcdctl /etcdctl,it will return "tar: removing leading '/' from member names" message.Because tar default use relative path.And It's run BusyBox,does't support "-P" option. So I remove the prefix of "/".

Nick-Mac:kubectl nick$ ./kubectl --kubeconfig=/Users/nick/gocode/src/k8s.io/kubernetes/cmd/kube-scheduler/admin.conf --v=4 cp kube-system/etcd-master:/usr/local/bin/etcdctl /Users/nick/Downloads/etcdctl
tar: invalid option -- P
BusyBox v1.29.3 (2018-10-01 22:37:18 UTC) multi-call binary.

Usage: tar c|x|t [-zJjahmvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE] [--exclude PATTERN]... [FILE]...

Create, extract, or list files from a tar file

        c       Create
        x       Extract
        t       List
        -f FILE Name of TARFILE ('-' for stdin/out)
        -C DIR  Change to DIR before operation
        -v      Verbose
        -O      Extract to stdout
        -m      Don't restore mtime
        -o      Don't restore user:group
        -k      Don't replace existing files
        -z      (De)compress using gzip
        -J      (De)compress using xz
        -j      (De)compress using bzip2
        -a      (De)compress using lzma
        -h      Follow symlinks
        -T FILE File with names to include
        -X FILE File with glob patterns to exclude
        --exclude PATTERN       Glob pattern to exclude
F0704 12:16:26.917437   45945 helpers.go:114] command terminated with exit code 1

/kind bug

What this PR does / why we need it:

Which issue(s) this PR fixes:

Fixes kubernetes#79764

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

remove tar error message

when you use this comand:kubectl cp kube-system/etcd-master:/usr/local/bin/etcdctl /etcdctl,it will return "tar: removing leading '/' from member names" message.Because tar default use relative path.And It's run BusyBox,does't support "-P" option. So I remove the prefix of "/".
```
Nick-Mac:kubectl nick$ ./kubectl --kubeconfig=/Users/nick/gocode/src/k8s.io/kubernetes/cmd/kube-scheduler/admin.conf --v=4 cp kube-system/etcd-master:/usr/local/bin/etcdctl /Users/nick/Downloads/etcdctl
tar: invalid option -- P
BusyBox v1.29.3 (2018-10-01 22:37:18 UTC) multi-call binary.

Usage: tar c|x|t [-zJjahmvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE] [--exclude PATTERN]... [FILE]...

Create, extract, or list files from a tar file

        c       Create
        x       Extract
        t       List
        -f FILE Name of TARFILE ('-' for stdin/out)
        -C DIR  Change to DIR before operation
        -v      Verbose
        -O      Extract to stdout
        -m      Don't restore mtime
        -o      Don't restore user:group
        -k      Don't replace existing files
        -z      (De)compress using gzip
        -J      (De)compress using xz
        -j      (De)compress using bzip2
        -a      (De)compress using lzma
        -h      Follow symlinks
        -T FILE File with names to include
        -X FILE File with glob patterns to exclude
        --exclude PATTERN       Glob pattern to exclude
F0704 12:16:26.917437   45945 helpers.go:114] command terminated with exit code 1

```
> /kind bug

<!--  Thanks for sending a pull request!  Here are some tips for you:

1. If this is your first time, please read our contributor guidelines: https://git.k8s.io/community/contributors/guide#your-first-contribution and developer guide https://git.k8s.io/community/contributors/devel/development.md#development-guide
2. Please label this pull request according to what type of issue you are addressing, especially if this is a release targeted pull request. For reference on required PR/issue labels, read here:
https://git.k8s.io/community/contributors/devel/sig-release/release.md#issuepr-kind-label
3. Ensure you have added or ran the appropriate tests for your PR: https://git.k8s.io/community/contributors/devel/sig-testing/testing.md
4. If you want *faster* PR reviews, read how: https://git.k8s.io/community/contributors/guide/pull-requests.md#best-practices-for-faster-reviews
5. Follow the instructions for writing a release note: https://git.k8s.io/community/contributors/guide/release-notes.md
6. If the PR is unfinished, see how to mark it: https://git.k8s.io/community/contributors/guide/pull-requests.md#marking-unfinished-pull-requests
-->


**What this PR does / why we need it**:

**Which issue(s) this PR fixes**:
<!--
*Automatically closes linked issue when PR is merged.
Usage: `Fixes #<issue number>`, or `Fixes (paste link of issue)`.
_If PR is about `failing-tests or flakes`, please post the related issues/tests in a comment and do not use `Fixes`_*
-->
Fixes kubernetes#79764

**Special notes for your reviewer**:

**Does this PR introduce a user-facing change?**:
<!--
If no, just write "NONE" in the release-note block below.
If yes, a release note is required:
Enter your extended release note in the block below. If the PR requires additional action from users switching to the new release, include the string "action required".
-->
```release-note
remove tar error message
```
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.

kubectl cp kube-system/etcd-master:/usr/local/bin/etcdctl /etcdctl
1 participant