{"action":"created","issue":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/65475","repository_url":"https://api.github.com/repos/kubernetes/kubernetes","labels_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/65475/labels{/name}","comments_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/65475/comments","events_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/65475/events","html_url":"https://github.com/kubernetes/kubernetes/issues/65475","id":335796166,"node_id":"MDU6SXNzdWUzMzU3OTYxNjY=","number":65475,"title":"\"kubectl cp\" with no arguments causes a panic","user":{"login":"gjcarneiro","id":2197096,"node_id":"MDQ6VXNlcjIxOTcwOTY=","avatar_url":"https://avatars2.githubusercontent.com/u/2197096?v=4","gravatar_id":"","url":"https://api.github.com/users/gjcarneiro","html_url":"https://github.com/gjcarneiro","followers_url":"https://api.github.com/users/gjcarneiro/followers","following_url":"https://api.github.com/users/gjcarneiro/following{/other_user}","gists_url":"https://api.github.com/users/gjcarneiro/gists{/gist_id}","starred_url":"https://api.github.com/users/gjcarneiro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gjcarneiro/subscriptions","organizations_url":"https://api.github.com/users/gjcarneiro/orgs","repos_url":"https://api.github.com/users/gjcarneiro/repos","events_url":"https://api.github.com/users/gjcarneiro/events{/privacy}","received_events_url":"https://api.github.com/users/gjcarneiro/received_events","type":"User","site_admin":false},"labels":[{"id":105146071,"node_id":"MDU6TGFiZWwxMDUxNDYwNzE=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/kind/bug","name":"kind/bug","color":"e11d21","default":false},{"id":450823910,"node_id":"MDU6TGFiZWw0NTA4MjM5MTA=","url":"https://api.github.com/repos/kubernetes/kubernetes/labels/sig/cli","name":"sig/cli","color":"d2b48c","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-06-26T12:28:19Z","updated_at":"2018-06-26T12:47:51Z","closed_at":null,"author_association":"NONE","body":"<!-- This form is for bug reports and feature requests ONLY!\r\n\r\nIf you're looking for help check [Stack Overflow](https://stackoverflow.com/questions/tagged/kubernetes) and the [troubleshooting guide](https://kubernetes.io/docs/tasks/debug-application-cluster/troubleshooting/).\r\n\r\nIf the matter is security related, please disclose it privately via https://kubernetes.io/security/.\r\n-->\r\n\r\n**Is this a BUG REPORT or FEATURE REQUEST?**:\r\n\r\n> Uncomment only one, leave it on its own line:\r\n>\r\n/kind bug\r\n> /kind feature\r\n\r\n\r\n**What happened**:\r\n\r\n```\r\n# kubectl cp\r\npanic: runtime error: index out of range\r\n\r\ngoroutine 1 [running]:\r\nk8s.io/kubernetes/pkg/kubectl/cmd.(*CopyOptions).Run(0xc4201b1420, 0x2420990, 0x0, 0x0, 0x0, 0x0)\r\n\t/workspace/anago-v1.11.0-beta.2.141+8745ea56e3f1f3/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubectl/cmd/cp.go:167 +0x483\r\nk8s.io/kubernetes/pkg/kubectl/cmd.NewCmdCp.func1(0xc420a47b80, 0x2420990, 0x0, 0x0)\r\n\t/workspace/anago-v1.11.0-beta.2.141+8745ea56e3f1f3/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/pkg/kubectl/cmd/cp.go:96 +0x93\r\nk8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).execute(0xc420a47b80, 0x2420990, 0x0, 0x0, 0xc420a47b80, 0x2420990)\r\n\t/workspace/anago-v1.11.0-beta.2.141+8745ea56e3f1f3/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:760 +0x2c1\r\nk8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).ExecuteC(0xc42036e280, 0xc4206423c0, 0x12a05f200, 0xc420a15ee8)\r\n\t/workspace/anago-v1.11.0-beta.2.141+8745ea56e3f1f3/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:846 +0x30a\r\nk8s.io/kubernetes/vendor/github.com/spf13/cobra.(*Command).Execute(0xc42036e280, 0x17ecbe0, 0x2402060)\r\n\t/workspace/anago-v1.11.0-beta.2.141+8745ea56e3f1f3/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/vendor/github.com/spf13/cobra/command.go:794 +0x2b\r\nmain.main()\r\n\t/workspace/anago-v1.11.0-beta.2.141+8745ea56e3f1f3/src/k8s.io/kubernetes/_output/dockerized/go/src/k8s.io/kubernetes/cmd/kubectl/kubectl.go:50 +0x196\r\n```\r\n\r\n**What you expected to happen**:\r\n\r\nI think `kubectl cp` should just show the help or something?\r\n\r\n**How to reproduce it (as minimally and precisely as possible)**:\r\n\r\n`kubectl cp`\r\n\r\n**Anything else we need to know?**:\r\n\r\n**Environment**:\r\n- Kubernetes version (use `kubectl version`): `Client Version: version.Info{Major:\"1\", Minor:\"11+\", GitVersion:\"v1.11.0-rc.1\", GitCommit:\"8745ea56e3f1f3ad20050c1762eb6ba6f7786675\", GitTreeState:\"clean\", BuildDate:\"2018-06-21T00:01:04Z\", GoVersion:\"go1.10.2\", Compiler:\"gc\", Platform:\"linux/amd64\"}`\r\n\r\n- Cloud provider or hardware configuration:\r\n- OS (e.g. from /etc/os-release): ubuntu 16.04 amd64\r\n- Kernel (e.g. `uname -a`): `Linux hex-32c1-pm 4.4.0-122-generic #146-Ubuntu SMP Mon Apr 23 15:34:04 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux`\r\n- Install tools:\r\n- Others:\r\n"},"comment":{"url":"https://api.github.com/repos/kubernetes/kubernetes/issues/comments/400295194","html_url":"https://github.com/kubernetes/kubernetes/issues/65475#issuecomment-400295194","issue_url":"https://api.github.com/repos/kubernetes/kubernetes/issues/65475","id":400295194,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMDI5NTE5NA==","user":{"login":"daixiang0","id":26538619,"node_id":"MDQ6VXNlcjI2NTM4NjE5","avatar_url":"https://avatars2.githubusercontent.com/u/26538619?v=4","gravatar_id":"","url":"https://api.github.com/users/daixiang0","html_url":"https://github.com/daixiang0","followers_url":"https://api.github.com/users/daixiang0/followers","following_url":"https://api.github.com/users/daixiang0/following{/other_user}","gists_url":"https://api.github.com/users/daixiang0/gists{/gist_id}","starred_url":"https://api.github.com/users/daixiang0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/daixiang0/subscriptions","organizations_url":"https://api.github.com/users/daixiang0/orgs","repos_url":"https://api.github.com/users/daixiang0/repos","events_url":"https://api.github.com/users/daixiang0/events{/privacy}","received_events_url":"https://api.github.com/users/daixiang0/received_events","type":"User","site_admin":false},"created_at":"2018-06-26T12:47:51Z","updated_at":"2018-06-26T12:47:51Z","author_association":"NONE","body":"It has fixed in higher version:\r\n```\r\n[root@dx-app deploy]# kubectl cp\r\nerror: \r\nexpected 'cp <file-spec-src> <file-spec-dest> [-c container]'.\r\n<file-spec> is:\r\n[namespace/]pod-name:/file/path for a remote file\r\n/file/path for a local file\r\nSee 'kubectl cp -h' for help and examples.\r\n[root@dx-app deploy]# kubectl version\r\nClient Version: version.Info{Major:\"1\", Minor:\"9\", GitVersion:\"v1.9.7\", GitCommit:\"dd5e1a2978fd0b97d9b78e1564398aeea7e7fe92\", GitTreeState:\"clean\", BuildDate:\"2018-04-19T00:05:56Z\", GoVersion:\"go1.9.3\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\nServer Version: version.Info{Major:\"1\", Minor:\"9\", GitVersion:\"v1.9.7\", GitCommit:\"dd5e1a2978fd0b97d9b78e1564398aeea7e7fe92\", GitTreeState:\"clean\", BuildDate:\"2018-04-18T23:58:35Z\", GoVersion:\"go1.9.3\", Compiler:\"gc\", Platform:\"linux/amd64\"}\r\n```"}}
{"actor":{"display_login":"daixiang0"}}