{"action":"created","issue":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11007","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11007/labels{/name}","comments_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11007/comments","events_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11007/events","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/11007","id":94121354,"number":11007,"title":"Fix reporting of Reason in Kubelet","user":{"login":"bgrant0607","id":7725777,"avatar_url":"https://avatars.githubusercontent.com/u/7725777?v=3","gravatar_id":"","url":"https://api.github.com/users/bgrant0607","html_url":"https://github.com/bgrant0607","followers_url":"https://api.github.com/users/bgrant0607/followers","following_url":"https://api.github.com/users/bgrant0607/following{/other_user}","gists_url":"https://api.github.com/users/bgrant0607/gists{/gist_id}","starred_url":"https://api.github.com/users/bgrant0607/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgrant0607/subscriptions","organizations_url":"https://api.github.com/users/bgrant0607/orgs","repos_url":"https://api.github.com/users/bgrant0607/repos","events_url":"https://api.github.com/users/bgrant0607/events{/privacy}","received_events_url":"https://api.github.com/users/bgrant0607/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/component/kubelet","name":"component/kubelet","color":"0052cc"},{"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/node","name":"team/node","color":"d2b48c"},{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/labels/team/UX","name":"team/UX","color":"d2b48c"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones/11","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/milestones/v1.0-post","labels_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/milestones/11/labels","id":1035380,"number":11,"title":"v1.0-post","description":"Things that are triaged and decided not for inclusion to v1.0","creator":{"login":"brendandburns","id":5751682,"avatar_url":"https://avatars.githubusercontent.com/u/5751682?v=3","gravatar_id":"","url":"https://api.github.com/users/brendandburns","html_url":"https://github.com/brendandburns","followers_url":"https://api.github.com/users/brendandburns/followers","following_url":"https://api.github.com/users/brendandburns/following{/other_user}","gists_url":"https://api.github.com/users/brendandburns/gists{/gist_id}","starred_url":"https://api.github.com/users/brendandburns/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendandburns/subscriptions","organizations_url":"https://api.github.com/users/brendandburns/orgs","repos_url":"https://api.github.com/users/brendandburns/repos","events_url":"https://api.github.com/users/brendandburns/events{/privacy}","received_events_url":"https://api.github.com/users/brendandburns/received_events","type":"User","site_admin":false},"open_issues":410,"closed_issues":76,"state":"open","created_at":"2015-03-23T22:54:17Z","updated_at":"2015-07-09T19:31:10Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2015-07-09T18:39:07Z","updated_at":"2015-07-09T19:56:44Z","closed_at":null,"body":"First of all, Reason (everywhere in the API) is intended to be a concise, single-world, CamelCase categorization of the status. However, Kubelet is producing phrases, which more properly belong in a Message field. For example:\r\nhttps://github.com/GoogleCloudPlatform/kubernetes/blob/7bb9cdf660a00e231d9dcd1a7c9c5985399fb977/pkg/kubelet/dockertools/manager.go#L458\r\n```\r\n\t\t\t\tReason: fmt.Sprintf(\"Image: %s is ready, container is creating\", image),\r\n```\r\n\r\nSecondly, important cases are somehow being dropped. Here's an example of a single-container pod, where the container must be Waiting, probably during image pull:\r\n```bash\r\n$ kubectl get pods\r\nNAME          READY     STATUS    RESTARTS   AGE\r\nhello-world   0/1       Running   0          7s\r\n```\r\nkubectl get pods shouldn't say \"Running\" for pods whose images aren't pulled.\r\n\r\nNot sure if the reason is being clobbered or something else is happening:\r\nhttps://github.com/GoogleCloudPlatform/kubernetes/blob/7bb9cdf660a00e231d9dcd1a7c9c5985399fb977/pkg/kubelet/dockertools/manager.go#L469\r\n\r\nI wouldn't 100% rule out kubectl, but the logic there is pretty straightforward.\r\n\r\ncc @andronat "},"comment":{"url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/comments/120127523","html_url":"https://github.com/GoogleCloudPlatform/kubernetes/issues/11007#issuecomment-120127523","issue_url":"https://api.github.com/repos/GoogleCloudPlatform/kubernetes/issues/11007","id":120127523,"user":{"login":"yujuhong","id":10524058,"avatar_url":"https://avatars.githubusercontent.com/u/10524058?v=3","gravatar_id":"","url":"https://api.github.com/users/yujuhong","html_url":"https://github.com/yujuhong","followers_url":"https://api.github.com/users/yujuhong/followers","following_url":"https://api.github.com/users/yujuhong/following{/other_user}","gists_url":"https://api.github.com/users/yujuhong/gists{/gist_id}","starred_url":"https://api.github.com/users/yujuhong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/yujuhong/subscriptions","organizations_url":"https://api.github.com/users/yujuhong/orgs","repos_url":"https://api.github.com/users/yujuhong/repos","events_url":"https://api.github.com/users/yujuhong/events{/privacy}","received_events_url":"https://api.github.com/users/yujuhong/received_events","type":"User","site_admin":false},"created_at":"2015-07-09T19:56:44Z","updated_at":"2015-07-09T19:56:44Z","body":"> First of all, Reason (everywhere in the API) is intended to be a concise, single-world, CamelCase categorization of the status. However, Kubelet is producing phrases, which more properly belong in a Message field\r\n\r\nThe [PodStatus.Reason](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/api/v1/types.go#L903) needs to be a single CamelCase word. However, all [ContainerState](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/api/v1/types.go#L748)s, and a couple of other \"Reason\" fields only requires the reason to be \"(brief)\". E.g., \r\n[PersistentVolumeStatus](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/api/v1/types.go#L287),  and [NodeCondition](https://github.com/GoogleCloudPlatform/kubernetes/blob/master/pkg/api/v1/types.go#L1323)\r\n\r\nkubectl uses PodStatus.Reason if it exists, and falls back to looking at the Reason in the container state. That's why sometimes kubectl returns long reasons.\r\nWe can fix this by making all \"Reason\" CamelCase, but many of them do not have a \"Message\" field. We'd either have to add more \"Message\" fields or compromise on the clarity. \r\n\r\n> Secondly, important cases are somehow being dropped. Here's an example of a single-container pod, where the container must be Waiting, probably during image pull:\r\n\r\nIf the image hasn't be pulled, kubelet should not report `Running`. This would be a bug. Do you have other information that indicate the pod may be waiting for the image to pull?\r\n\r\nOn the other hand, I don't see why this pod *must* be in the pending/waiting state.\r\n- \"Running\" means that the all containers have been started for the pod.\r\n- \"Ready\" means the container has passed the readiness check.\r\n\r\nA pod can be in the \"Running\" state even though containers do not pass readiness checks (yet).\r\n\r\nThere are other cases where a ready container would appear not ready (while the pod is \"Running\"): \r\n 1. If the `InitialDelaySeconds` of the readiness check is set to non-zero, the container would stay not ready until the delay has passed.\r\n 2. After kubelet starts the containers, it does not immediately perform the readiness check. Thus the containers would stay unready until the next sync. We can consider performing the extra probe to eliminate the at most 10 second delay.\r\n\r\n"}}