Bug 1572149
| Summary: | `oc cp` with non-existent container or pod should prompt container or pod not found when copying from pod | ||
|---|---|---|---|
| Product: | OpenShift Container Platform | Reporter: | Xingxing Xia <xxia> |
| Component: | oc | Assignee: | Maciej Szulik <maszulik> |
| Status: | CLOSED ERRATA | QA Contact: | Xingxing Xia <xxia> |
| Severity: | low | Docs Contact: | |
| Priority: | medium | ||
| Version: | 3.10.0 | CC: | aos-bugs, eparis, hasha, jokerman, mmccomas |
| Target Milestone: | --- | ||
| Target Release: | 4.2.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | No Doc Update | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2019-10-16 06:27:40 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
|
Description
Xingxing Xia
2018-04-26 09:38:05 UTC
Similar when pod is not existent: $ oc cp pod.yaml ruby-ex-1-bdc9m-typo:/tmp Error from server (NotFound): pods "ruby-ex-1-bdc9m-typo" not found $ oc cp ruby-ex-1-bdc9m-typo:/etc/hosts ./local/ error: etc/hosts no such file or directory Similiar when operate clusteradmin's pod with normal user: [hasha@mypc cucushift]$ oc cp default/docker-registry-phf5b:/etc/hosts . error: etc/hosts no such file or directory This was merged long time ago but never got properly moved, moving to qa to verify. Verified in oc version: GitVersion:"v4.2.0", GitCommit:"1904cc55f", GitTreeState:"clean", BuildDate:"2019-08-28T02:28:30Z" [xxia@fedora29 my]$ oc cp -c abc mysql-1-78msw:/etc/hosts ./ Error from server (BadRequest): container abc is not valid for pod mysql-1-78msw [xxia@fedora29 my]$ oc cp -c abc pod.yaml mysql-1-78msw:/tmp Error from server (BadRequest): container abc is not valid for pod mysql-1-78msw [xxia@fedora29 my]$ oc cp ruby-ex-1-bdc9m-typo:/etc/hosts ./local/ Error from server (NotFound): pods "ruby-ex-1-bdc9m-typo" not found Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2019:2922 |