{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/5074","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/5074/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/5074/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/5074/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/5074","id":59880775,"number":5074,"title":"Panic in kubectl running `kubectl label`","user":{"login":"a-robinson","id":7085343,"avatar_url":"https://avatars.githubusercontent.com/u/7085343?v=3","gravatar_id":"","url":"https://api.github.com/users/a-robinson","html_url":"https://github.com/a-robinson","followers_url":"https://api.github.com/users/a-robinson/followers","following_url":"https://api.github.com/users/a-robinson/following{/other_user}","gists_url":"https://api.github.com/users/a-robinson/gists{/gist_id}","starred_url":"https://api.github.com/users/a-robinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-robinson/subscriptions","organizations_url":"https://api.github.com/users/a-robinson/orgs","repos_url":"https://api.github.com/users/a-robinson/repos","events_url":"https://api.github.com/users/a-robinson/events{/privacy}","received_events_url":"https://api.github.com/users/a-robinson/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/component/client","name":"component/client","color":"0052cc"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/kind/bug","name":"kind/bug","color":"ff0000"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/priority/P1","name":"priority/P1","color":"eb6420"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/team/UX","name":"team/UX","color":"d2b48c"}],"state":"closed","locked":false,"assignee":{"login":"a-robinson","id":7085343,"avatar_url":"https://avatars.githubusercontent.com/u/7085343?v=3","gravatar_id":"","url":"https://api.github.com/users/a-robinson","html_url":"https://github.com/a-robinson","followers_url":"https://api.github.com/users/a-robinson/followers","following_url":"https://api.github.com/users/a-robinson/following{/other_user}","gists_url":"https://api.github.com/users/a-robinson/gists{/gist_id}","starred_url":"https://api.github.com/users/a-robinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-robinson/subscriptions","organizations_url":"https://api.github.com/users/a-robinson/orgs","repos_url":"https://api.github.com/users/a-robinson/repos","events_url":"https://api.github.com/users/a-robinson/events{/privacy}","received_events_url":"https://api.github.com/users/a-robinson/received_events","type":"User","site_admin":false},"milestone":null,"comments":1,"created_at":"2015-03-04T23:35:53Z","updated_at":"2015-03-04T23:42:21Z","closed_at":"2015-03-04T23:42:21Z","body":"Reported [on the google-containers@ mailing list](https://groups.google.com/forum/#!topic/google-containers/vtfCcANGyCQ):\r\n\r\n```\r\nHi all,\r\n\r\nI'm following the instructions here to attach a label to a node.  The node currently doesn't have any labels and crashes when adding a label with ERROR: panic: assignment to entry in nil map.  Looking at pkg/kubectl/cmd/label.go, it seems that the combination of no labels and overwrite disabled causes the access to meta.Labels in validateNoOverwrites to fail.  I then tried adding the --overwrite flag when calling kubectl label nodes to bypass this and still had the same problem.  Any help would be appreciated!\r\n\r\nThanks,\r\nJosh\r\n\r\nBonus dump:\r\n$ gcloud preview container kubectl label --overwrite nodes k8s-example-node-1.c.e-sunlight-726.internal foo=bar\r\nERROR: panic: assignment to entry in nil map\r\n\r\ngoroutine 1 [running]:\r\ngithub.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd.labelFunc(0x7f9fd9f4c3c0, 0xc20809f0e0, 0xc208020101, 0xcd3660, 0x0, 0xc2080ddad0, 0x0, 0x0, 0x0, 0x0, ...)\r\n        /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/label.go:161 +0x234\r\ngithub.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd.func·022(0x7f9fd9f4c3c0, 0xc20809f0e0, 0x0, 0x0)\r\n        /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/label.go:76 +0x8f\r\ngithub.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd.updateObject(0x7f9fd9f4e8d0, 0xc2080fc370, 0xc208087880, 0x9db450, 0x7, 0x7fffd13a0ce7, 0x2c, 0xc2080bfc88, 0x0, 0x0, ...)\r\n        /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/label.go:102 +0x13e\r\ngithub.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd.func·023(0xc20809a6c0, 0xc2080942d0, 0x3, 0x9)\r\n        /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/pkg/kubectl/cmd/label.go:79 +0x4b3\r\ngithub.com/spf13/cobra.(*Command).execute(0xc20809a6c0, 0xc208092400, 0x9, 0x10, 0x0, 0x0)\r\n        /go/src/github.com/GoogleCloudPlatform/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/command.go:383 +0x38d\r\ngithub.com/spf13/cobra.(*Command).findAndExecute(0xc2080c8900, 0xc20800a010, 0xa, 0xa, 0x0, 0x0)\r\n        /go/src/github.com/GoogleCloudPlatform/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/command.go:350 +0xd4\r\ngithub.com/spf13/cobra.(*Command).Execute(0xc2080c8900, 0x0, 0x0)\r\n        /go/src/github.com/GoogleCloudPlatform/kubernetes/Godeps/_workspace/src/github.com/spf13/cobra/command.go:436 +0xab3\r\nmain.main()\r\n        /go/src/github.com/GoogleCloudPlatform/kubernetes/_output/dockerized/go/src/github.com/GoogleCloudPlatform/kubernetes/cmd/kubectl/kubectl.go:27 +0x81\r\n\r\ngoroutine 5 [chan receive]:\r\ngithub.com/golang/glog.(*loggingT).flushDaemon(0xcc9e60)\r\n        /go/src/github.com/GoogleCloudPlatform/kubernetes/Godeps/_workspace/src/github.com/golang/glog/glog.go:879 +0x78\r\ncreated by github.com/golang/glog.init·1\r\n        /go/src/github.com/GoogleCloudPlatform/kubernetes/Godeps/_workspace/src/github.com/golang/glog/glog.go:410 +0x2a7\r\n\r\ngoroutine 17 [syscall, locked to thread]:\r\nruntime.goexit()\r\n        /usr/src/go/src/runtime/asm_amd64.s:2232 +0x1\r\n\r\ngoroutine 7 [syscall]:\r\nos/signal.loop()\r\n        /usr/src/go/src/os/signal/signal_unix.go:21 +0x1f\r\ncreated by os/signal.init·1\r\n        /usr/src/go/src/os/signal/signal_unix.go:27 +0x35\r\n\r\ngoroutine 10 [runnable]:\r\nnet/http.(*persistConn).readLoop(0xc2081320b0)\r\n        /usr/src/go/src/net/http/transport.go:928 +0x9ce\r\ncreated by net/http.(*Transport).dialConn\r\n        /usr/src/go/src/net/http/transport.go:660 +0xc9f\r\n\r\ngoroutine 11 [select]:\r\nnet/http.(*persistConn).writeLoop(0xc2081320b0)\r\n        /usr/src/go/src/net/http/transport.go:945 +0x41d\r\ncreated by net/http.(*Transport).dialConn\r\n        /usr/src/go/src/net/http/transport.go:661 +0xcbc\r\n```"},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/77275704","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/5074#issuecomment-77275704","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/5074","id":77275704,"user":{"login":"a-robinson","id":7085343,"avatar_url":"https://avatars.githubusercontent.com/u/7085343?v=3","gravatar_id":"","url":"https://api.github.com/users/a-robinson","html_url":"https://github.com/a-robinson","followers_url":"https://api.github.com/users/a-robinson/followers","following_url":"https://api.github.com/users/a-robinson/following{/other_user}","gists_url":"https://api.github.com/users/a-robinson/gists{/gist_id}","starred_url":"https://api.github.com/users/a-robinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/a-robinson/subscriptions","organizations_url":"https://api.github.com/users/a-robinson/orgs","repos_url":"https://api.github.com/users/a-robinson/repos","events_url":"https://api.github.com/users/a-robinson/events{/privacy}","received_events_url":"https://api.github.com/users/a-robinson/received_events","type":"User","site_admin":false},"created_at":"2015-03-04T23:42:21Z","updated_at":"2015-03-04T23:42:21Z","body":"Looks like this was a bug in 0.11.0, but should be fixed in 0.12.0 due to #4311."}}